// JavaScript Document'
MenuItem = new Array();
// note useing alt 254 ofr split chr
//'Heading is X,0 format "id¦Display text"
//'Itemis X,1~X format is "link¦Display text,¦Stauts bar/Tooltip text"
MenuItem[0]=new Array()
MenuItem[0][0]="main¦Main"
	MenuItem[0][1]="subitem_main_news.htm¦News¦Current site news and information"

MenuItem[1]=new Array()
MenuItem[1][0]="zincgui¦ZiNcGUI"
	MenuItem[1][1]="subitem_zincgui_info.htm¦Information¦Description of ZiNcGUI"
	MenuItem[1][2]="subitem_zincgui_screenshots.htm¦Screen shots¦ZiNcGUI screen shots"
	
MenuItem[2]=new Array()
MenuItem[2][0]="download¦Downloads"
	MenuItem[2][1]="subitem_downloads_zincgui.htm¦ZiNcGUI¦Download ZiNcGUI"
	MenuItem[2][2]="subitem_downloads_zinc.htm¦ZiNc¦Lastest version of ZiNc"
	MenuItem[2][3]="subitem_downloads_otherfiles.htm¦Other ZiNc Files¦Misc ZiNc &amp; ZiNcGUI files"
	
	
MenuItem[3]=new Array()
MenuItem[3][0]="info¦Information"
	MenuItem[3][1]="subitem_info_contact.htm¦Contact details¦Contact details"
	MenuItem[3][2]="subitem_info_links.htm¦Links¦Various links"


function Menu(CollapseMenu,HideItem)
{


var nHeadingCount
document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0" >')
document.write('  <tr>   ')
document.write('		<td width="175" valign="top" > ')
document.write('            <table width="100%" border="0" cellspacing="1" bgcolor="#CCCCCC" >')
document.write('				<tr> ')
document.write('					<td width="100%" cellspacing="0"  bgcolor="#FFFFFF">  ')
document.write('						<div id="contextitems" class="item">')
 
var nCount=MenuItem.length
HideItem=HideItem +","

//document.write("Click on heading to display items<br>&nbsp;")
for(var i = 0; i <= nCount-1; i++){

	var inq = HideItem.indexOf(i + ',')
	//document.write(inq)
	if  (inq < 0)
	{
	
		var heading_array=MenuItem[i][0].split("¦")
		//document.write(heading_array[0])
		document.write('										<div id="'+heading_array[0]+'_s">')
		document.write('											<div class="menu" onkeydown="ExpandCollapseKeyboard('+heading_array[0]+');" onclick="ExpandCollapse('+heading_array[0]+');')
		document.write('											if ('+heading_array[0]+'.style.display == &quot;&quot;)')
		document.write('											{')
		document.write('												'+heading_array[0]+'_img_exp.style.display = &quot;&quot;;')
		document.write('												'+heading_array[0]+'_img_col.style.display = &quot;none&quot;;')
		document.write('											}')
		document.write('											else')
		document.write('											{')
		document.write('												'+heading_array[0]+'_img_exp.style.display = &quot;none&quot;;')
		document.write('												'+heading_array[0]+'_img_col.style.display = &quot;&quot;; ')
		document.write('											}"><img id="'+heading_array[0]+'_img_exp" src="images/arrow_show.gif" width="17" height="14"><img id="'+heading_array[0]+'_img_col" style="DISPLAY: none" src="images/arrow_hide.gif" onload="" width="17" height="14">'+heading_array[1]+'')
		document.write('											</div> ')
		document.write('											<div class="link" id="'+heading_array[0]+'">  ')
		
		var nItemCount=MenuItem[i].length
		for(var x = 1; x <= nItemCount-1; x++){
		var item_array=MenuItem[i][x].split("¦")
			document.write('												<li type=""><a class="fade" onmouseover="window.status=\''+item_array[2]+'\';return true" onmouseout="window.status=\'\';return true" href="'+item_array[0]+'" title="'+item_array[2]+'">'+item_array[1]+'</a><br></li>  ')
			}
		document.write('											</div>  ')
		document.write('										</div> ')
	}
}
document.write('										</div> ')
document.write('									</div>')
//document.write("Click on heading to display items")
document.write('						 		</td>')
document.write('							  </tr>')
document.write('						 </table>')

nCount=MenuItem.length
CollapseMenu=CollapseMenu +","

for(var n = 0; n <= nCount-1; n++){

	inq = CollapseMenu.indexOf(n + ',')
	if  (inq >= 0)
	{
		var Collaspe_array=MenuItem[n][0].split("¦")
		Collapse(Collaspe_array[0])
	}
}

}
function ExpandCollapse(e)
{
	if (e.style.display == "")
		e.style.display = "none";
	else
		e.style.display = "";
}
function ExpandCollapseKeyboard(e)
{
	if (event.keyCode == 33) //Page Up collapses
	{
		if (e.style.display == "")
			ExpandCollapse(e);
	}
	else if (event.keyCode == 34) //Page Down Expands
	{
		if (e.style.display == "none")
			ExpandCollapse(e);		
	}
}
function Collapse(e)
{
	document.all[e].style.display="none";
	document.all[e+'_img_exp'].style.display="none";
	document.all[e+'_img_col'].style.display="";
}
	
		
	