function showSubArticle(id, iconname, iconshowsrc, iconhidesrc) {
	obj= getStyleObject(id);
	if (obj.display == "none") {
		obj.display= 'block';
		if (iconname !== undefined)
			document.images[iconname].src= iconshowsrc;
		return 1;
	}
	else {
		obj.display= 'none';
		if (iconname !== undefined)
			document.images[iconname].src= iconhidesrc;
		return 0;
	}
}

function expandSubArticle(id, iconname, iconshowsrc) {
	obj= getStyleObject(id);
	if (obj.display == "none") {
		obj.display= 'block';
		if (iconname !== undefined)
			document.images[iconname].src= iconshowsrc;
	}
}

function collapseSubArticle(id, iconname, iconhidesrc) {
	obj= getStyleObject(id);
	if (obj.display != "none") {
		obj.display= 'none';
		if (iconname !== undefined)
			document.images[iconname].src= iconhidesrc;
	}
}

function toggleStory(id, toShow) {
	obj= getStyleObject(id);
	obj2= getStyleObject(id+'.a');
	if (obj.display == "none") {
		if (toShow !== undefined && toShow == 0)
			return 0;
		obj.display= 'block';
		obj2.display= 'none';
		return 1;
	}
	else {
		if (toShow !== undefined && toShow != 0)
			return 1;
		obj.display= 'none';
		obj2.display= 'block';
		return 0;
	}
}

function renderPicture(id, url, id2, txt) {
	document.images[id].src= url;
	document.images[id].alt= txt;
	//
	obj= getDocObject(id2);
	obj.firstChild.nodeValue= txt;
}

function layoutLocalMenu(curitemlink, group, subcuritem) {
var items= new Array( 
	new Array("G-77 Home", "/index.html"),
	new Array("About the Group of 77", "/doc/"),
		new Array("<div class='localmenuitem2'>", "", "1"),
		new Array("About G-77", "", "1", "index.html"),
		new Array("Member States", "", "1", "members.html"),
		new Array("Presiding Countries", "", "1", "presiding.html"),
		new Array("Contact Information", "", "1", "contact.html"),
		new Array("</div>", "", "1"),
	new Array("Major Documents", "/doc/docs.html"),
	new Array("News Center", "/nc/"),
		new Array("<div class='localmenuitem2'>", "", "3"),
		new Array("News/Updates", "", "3", "/nc/"),
		new Array("Photo Gallery", "", "3", "/nc/photo/"),
		new Array("Press Releases", "", "3", "/nc/pressrelease/"),
		new Array("Press Conferences", "", "3", "/nc/pressconference/"),
		new Array("G-77 Journal", "", "3", "/nc/journal/"),
		new Array("</div>", "", "3"),
	new Array("Schedule of Meetings", "/doc/meetings.html"),
	new Array("Statements & Speeches", "/statement/"),
		new Array("<div class='localmenuitem2'>", "", "2"),
		new Array("2012", "", "2", "index.html"),
		new Array("2011", "", "2", "2011.html"),
		new Array("2010", "", "2", "2010.html"),
		new Array("2009", "", "2", "2009.html"),
		new Array("2008", "", "2", "2008.html"),
		new Array("2007", "", "2", "2007.html"),
		new Array("2006", "", "2", "2006.html"),
		new Array("2005", "", "2", "2005.html"),
		new Array("2004", "", "2", "2004.html"),
		new Array("2003", "", "2", "2003.html"),
		new Array("2002", "", "2", "2002.html"),
		new Array("2001", "", "2", "2001.html"),
		new Array("2000", "", "2", "2000.html"),
		new Array("1999", "", "2", "1999.html"),
		new Array("1998", "", "2", "1998.html"),
		new Array("1997", "", "2", "1997.html"),
		new Array("</div>", "", "2"),


	new Array("-", ""),
	new Array("Perez-Guerrero Trust Fund (PGTF)", "/pgtf/"),
	new Array("Global System of Trade Preferences (GSTP)", "http://www.unctadxi.org/gstp"),
	new Array("Consortium on Science, Technology and Innovation for the South (COSTIS)", "/costis/index.php"),
	new Array("-", ""),
	
	new Array("<span class='menuheader'>G-77 Chapters:</span>", ""),
	new Array("<div class='localmenuitem2'>", ""),
	new Array("Geneva Chapter", "/geneva/geneva.html"),
	new Array("Nairobi Chapter", "http://www.unon.org/g77/"),
	new Array("Paris Chapter", "/paris/index.html"),
	new Array("Rome Chapter", "/rome/"),
	new Array("Vienna Chapter", "/vienna/"),
	new Array("</div>", ""),
	new Array("-", ""),
	new Array("Group of 24", "http://www.g24.org/"),
	new Array("-", ""),
	new Array("Publications", "/doc/publications.html"),
	new Array("-", ""),
	new Array("Internship", "/doc/internship.html"),
	new Array("-", "")
);

	var issub;
	var st= '<div id="localmenuinner"><div class="localmenuitem">';
	for (i= 0; i < items.length; i++) {
		//* special group items?
		issub= 0;
		if (items[i].length > 2)
			if (group != null) {
				issub= 1;
				if (group != items[i][2]) continue;
			}
			else continue;

		if (items[i][0] == "-")
			st= st + '<span class="separator">&nbsp;</span>';
		else if (items[i][0].substr(0,1) == "<") 
			st= st + items[i][0];
		else {
			if (items[i][1] == curitemlink) 
				//st= st + '<a href="' + items[i][1] + '"><span class="curmenuitem">' + items[i][0] + '</span></a>';
				st= st + '<span class="curmenuitem"><a href="' + items[i][1] + '">' + items[i][0] + '</a></span>';
			else if (issub==1)
				if (items[i].length > 3 && items[i][3] == subcuritem)
					st= st + '<a href="' + items[i][1] + items[i][3] + '">' + '<img src="/global/arrow1.gif" border=0>' + items[i][0] + '</a>';
				else 
					st= st + '<a href="' + items[i][1] + items[i][3] + '">' + '<img src="/global/arrow1blank.gif" border=0>' + items[i][0] + '</a>';
			else
				st= st + '<a href="' + items[i][1] + '">' + items[i][0] + '</a>';
		}
	}
	st= st + '</div></div>';
	document.write(st);
	//window.clipboardData.setData('Text', st);
	st= "<img src='/global/none.gif' border='0' id='localmenuwidth'>";
	document.write(st);
}


