//	Modify following four lines to customize your menu
var tdColor="#ffffff";		// menu item text color
var tdBgColor="#000000";	// menu item background color
var hlColor="#ffcc00";		// highlight text color
var hlBgColor="#000000";	// highlight background color
//	After change, modify same values in your DropDown.css file

////////////////////DO NOT MODIFY BELOW HERE//////////////////////
var md=20;
var ti=-1;
var cc=-1;
var oTd=new Object;
oTd=null;

function doMenu(td){
	clearTimeout(ti);
	clearTimeout(cc);
	td.style.backgroundColor=hlBgColor;
	td.style.color=hlColor;
	var i;
	var sT="";
	var tda=new Array();
	tda=td.id.split("_");
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		for(i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			if(tdo[i]!=tda[i]){
				document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
				document.getElementById("td"+sT).style.color=tdColor;
				if(document.getElementById("tbl"+sT)!=null)
					document.getElementById("tbl"+sT).style.visibility="hidden";
				
			}	
		}			
	}
	oTd=td;
	sT="tbl";
	for(i=1;i<tda.length;i++)
		sT+="_"+tda[i];
	if(document.getElementById(sT)!=null)
		document.getElementById(sT).style.visibility="visible";
		

}

function closeMenu(id)
{
	document.getElementById("td"+id).style.color=tdColor;
 	document.getElementById("tbl"+id).style.visibility="hidden";
}

function clearMenu(){
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		var sT="";
		for(var i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
			document.getElementById("td"+sT).style.color=tdColor;
			if(document.getElementById("tbl"+sT)!=null)
				document.getElementById("tbl"+sT).style.visibility="hidden";
		}
		oTd=null;			
	}
}

function runMenu(strURL){
	location.href=strURL;
}

var tt="";
var sT="";
var pT=new Array();
var tA=new Array();

function getCoord(st){
	tA=st.split("_");
	if(tA.length>2){
		tA=tA.slice(0,-1);
		tt=tA.join("_");
		return (document.getElementById("tbl"+tt).offsetTop+document.getElementById("td"+st).offsetTop+4)+"px;left:"+
			(document.getElementById("tbl"+tt).offsetLeft+document.getElementById("td"+st).offsetWidth-2)+"px\">";
	}
	return (document.getElementById("mainmenu").offsetTop+document.getElementById("td"+st).offsetHeight-2)+"px;left:"+
		  (document.getElementById("mainmenu").offsetLeft+document.getElementById("td"+st).offsetLeft)+"px\">";
}

var sH="<div onmouseout='ti=setTimeout(\"clearMenu();\",md)'><table class=\"menu\" id=\"mainmenu\" cellspacing=\"0\"><tr>";
var p=0;
var j=0;
while(eval("typeof(td_"+ ++j +")!=\"undefined\"")){
	sH+="<td id=\"td_"+j+"\" style=\"padding-right: 15px; text-align: center;\" onmouseover=\"doMenu(this)\" ";
	sH+=(eval("typeof(url_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url_"+j)+"')\">":">";
	sH+=eval("td_"+j)+"</td>";
	if (eval("typeof(td_"+j+"_1)!=\"undefined\""))
		pT[p++]="_"+j;
}
sH+="</tr></table></div>";
document.write(sH);
for(var q=0;typeof(pT[q])!="undefined";q++){
	sT=pT[q];
	sH="";
	j=0;
	cf = 0;
	sH+="<div id=\"tbl"+sT+"\" class='menu' onmouseover=\"ccLayer='" + sT + "'; clearTimeout(ti); clearTimeout(cc); \" onmouseout=\"cc=setTimeout('closeMenu(ccLayer);',200);\" style=\"border: 0px solid green; background-color: #000000; position: absolute; visibility: hidden; padding: 6px 12px 6px 6px; top:"+getCoord(sT);
	while (eval("typeof(td"+sT+"_"+ ++j +")!=\"undefined\"")){
		sH+="<a class=\"link\" clearTimeout(ti); clearTimeout(cc); \" href=\""+eval("url"+sT+"_"+j)+"\">" + eval("td"+sT+"_"+j)+"</a><BR>";
		if (eval("typeof(td"+sT+"_"+j+"_1)!=\"undefined\""))
			pT[p++]=sT+"_"+j;
	}
	sH+="</table></div>";
	document.write(sH);
}
document.write('<style type="text/css">.link { color: #ffffff; line-height: 18px; background-color: #000000; font-family: arial; font-weight: bold; text-decoration: none; font-size: 12px; }</style>');
document.write('<style type="text/css">.link:hover { COLOR: #ffcc00; text-decoration: none; } </style>');
document.getElementById("mainmenu").style.visibility="visible";
document.getElementById("mainmenu").style.color="#ffffff";
document.getElementById("mainmenu").style.border="1px";
document.getElementById("mainmenu").style.backgroundColor="#000000";
document.getElementById("mainmenu").style.fontFamily="Arial";
document.getElementById("mainmenu").style.fontSize="13px";
document.getElementById("mainmenu").style.fontWeight="bold";
if ( !document.all ) { document.getElementById("mainmenu").style.letterSpacing=".5pt"; }
document.getElementById("mainmenu").style.paddingLeft="11px";
document.getElementById("mainmenu").style.paddingRight="11px";
document.getElementById("mainmenu").style.paddingTop="3px";
document.getElementById("mainmenu").style.paddingBottom="3px";


