var menushowing=false;
function ToggleMenu(bg)
{
	if(bg)menushowing=true;
	document.getElementById('DropDownLayer').style.display=menushowing?'none':''
	menushowing = !menushowing
	if (menushowing && navigator.userAgent.indexOf('MSIE 7')==-1)
		document.onmouseup = function(){setTimeout("ToggleMenu(1)",50); document.onmouseup=null;}
	if (!menushowing) MenuOff(0);
}

function MenuOn(which)
{
	document.getElementById('DDrow'+which).className=(which>0?"menurow ":"")+"gmenuhilite"
}

function MenuOff(which)
{
	if (which == pageselected+1 || menushowing && which==0) return
	document.getElementById('DDrow'+which).className=(which>0?"menurow":"");
}

function MenuActiv(which)
{
	document.location = arPages[which].file;
}

function page(f,g){this.file=f; this.gif=g; if (document.location.pathname.indexOf(f)!=-1) pageselected=i-1;}
var arPages=[],i=0,pageselected;
arPages[i++] = new page('app_guide_lm2.htm','butt-LM-2CT.gif');
arPages[i++] = new page('app_guide_lm1.htm','butt-LM-1CT.gif');
arPages[i++] = new page('app_guide_lmm.htm','butt-LMM.gif');
arPages[i++] = new page('app_guide_mm.htm','butt-MM.gif');
arPages[i++] = new page('app_guide_sm.htm','butt-SM.gif');

with(document)
{
	writeln('<table width="390" border="0" cellpadding="0" cellspacing="1" background="images/butt-back.gif" style="background-repeat: no-repeat;">')
	writeln('<tr>');
	writeln('<td width="367" height=22 id=DDrow0 style="background-repeat: no-repeat;cursor:hand;cursor:pointer;" onClick="ToggleMenu()" onMouseOver="MenuOn(0)" onMouseOut="MenuOff(0)"><img src="images/',arPages[pageselected].gif,'" name="DropDown"  id="DropDown"></td>');
	writeln('<td width="23" height=22 style="background-repeat: no-repeat;cursor:hand;cursor:pointer;" onClick="ToggleMenu()" onMouseOver="MenuOn(0)" onMouseOut="MenuOff(0)"><font style="font-size:7pt">&nbsp;</font></td>');
	writeln('</tr>');
	writeln('<tr>');
	writeln('<td colspan="2" background="" ><img src="../../images/spacer.gif" width="1" height="1"></td>');
	writeln('</tr>');
	writeln('</table>');
	writeln('<div id="DropDownLayer" style="display: none;" ><table width="388" border="0" cellpadding="0" cellspacing="0">');
	for(i=0; i<arPages.length; i++)
	{
		//if (document.location.pathname.indexOf(arPages[i].file)!=-1) pageselected=i;
		writeln('<TR><TD height="22" id=DDrow',i+1,' onClick="MenuActiv(',i,')" onMouseOver="MenuOn(',i+1,')" onMouseOut="MenuOff(',i+1,')" class="menurow',pageselected==i?' gmenuhilite':'','"><img src="images/',arPages[i].gif,'"  align="absmiddle"></td></TR>');
	}

	writeln('</table></div>');
}

