////////////////////Please leave this notice//////////////////////
//                                                                //
//        Dynamic JS Menu 1.0                                        //
//        By Pat Libby (Libbypa@maine.rr.com)                        //
//        http://dragonsbane1.topcities.com                        //
//        It works only with IE5.0(++) and Netscape6.0(++)        //
//        Free to use!                                                //
//                                                                //
////////////////////Last modified 01-31-2003//////////////////////

//        Modify following four lines to customize your menu
var tdColor="#ffffff";                // menu item text color
var tdBgColor="#c71928";              // menu item background color
var hlColor="#ffffff";                // 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=250;
var ti=-1;
var oTd=new Object;
oTd=null;

function doMenu(td){
        clearTimeout(ti);
        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 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){
	if (strURL != 'nothing') parent.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+0)+"px;left:"+
                        (document.getElementById("tbl"+tt).offsetLeft+document.getElementById("td"+st).offsetWidth+0)+"px\">";
        }
        return (document.getElementById("mainmenu").offsetTop+document.getElementById("td"+st).offsetHeight+2)+"px;left:"+
                  (document.getElementById("mainmenu").offsetLeft+document.getElementById("td"+st).offsetLeft+10)+"px\">";
}

var sH="<table  width='100%'  class=\"menu\" id=\"mainmenu\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
var p=0;
var j=0;
while(eval("typeof(td_"+ ++j +")!=\"undefined\"")){
        // RJOD - 20030909 - Extra code not needed. Added empty 100% width cell to the string
        //// THIS CODE ADDED TO PREVENT MOUSEOVER COLOR CHANGE FOR DUMMY MENU 5 - REMOVE IF USING A MENU 5 FOR REAL
//        if (j==5){
//                sH+="<td id=\"td_"+j+"\" onmonkeyover=\"doMenu(this)\" onmonkeyout=\"ti=setTimeout('clearMenu()',md)\"";
//                sH+=(eval("typeof(url_"+j+")!=\"undefined\""))?" onmonkey=\"runMenu('"+eval("url_"+j)+"')\">":">";
//                sH+=eval("td_"+j)+"</td>";
//                if (eval("typeof(td_"+j+"_1)!=\"undefined\""))
//                        pT[p++]="_"+j;
//        }
//        else {
                sH+="<td id=\"td_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
		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;
//        }
}
var k = j;
j=8;
while(eval("typeof(sltd_"+ ++j +")!=\"undefined\"")){
        // RJOD - 20030909 - Extra code not needed. Added empty 100% width cell to the string
        //// THIS CODE ADDED TO PREVENT MOUSEOVER COLOR CHANGE FOR DUMMY MENU 5 - REMOVE IF USING A MENU 5 FOR REAL
//        if (j==5){
//                sH+="<td id=\"td_"+j+"\" onmonkeyover=\"doMenu(this)\" onmonkeyout=\"ti=setTimeout('clearMenu()',md)\"";
//                sH+=(eval("typeof(url_"+j+")!=\"undefined\""))?" onmonkey=\"runMenu('"+eval("url_"+j)+"')\">":">";
//                sH+=eval("td_"+j)+"</td>";
//                if (eval("typeof(td_"+j+"_1)!=\"undefined\""))
//                        pT[p++]="_"+j;
//        }
//        else {
		++k;
                sH+="<td id=\"td_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
                sH+=(eval("typeof(slurl_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("slurl_"+j)+"')\">":">";
                sH+=eval("sltd_"+j)+"</td>";
                if (eval("typeof(sltd_"+j+"_1)!=\"undefined\""))
                        pT[p++]="_"+j;
//        }
}
// rjod - 20030909 - Added empty Cell to string
//sH+="<td WIDTH=99%>&nbsp;</TD>";
sH+="</tr></table>";
document.write(sH);
for(var q=0;typeof(pT[q])!="undefined";q++){
	sT=pT[q];
        sH="";
        j=0;
        k=8;
        sH+="<table class=\"menu\" id=\"tbl"+sT+"\" cellspacing=\"0\" cellpadding=\"0\" style=\"top:"+getCoord(sT);
        if (eval("typeof(td"+sT+"_1)!=\"undefined\"")){
            while (eval("typeof(td"+sT+"_"+ ++j +")!=\"undefined\"")){
                sH+="<tr><td id=\"td"+sT+"_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
		sH+=(eval("typeof(url"+sT+"_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url"+sT+"_"+j)+"')\">":">";
                sH+=eval("td"+sT+"_"+j)+"</td></tr>";
                if (eval("typeof(td"+sT+"_"+j+"_1)!=\"undefined\""))
                        pT[p++]=sT+"_"+j;
            }
         } else {
            while (eval("typeof(sltd"+sT+"_"+ ++j +")!=\"undefined\"")){
                sH+="<tr><td id=\"td"+sT+"_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
		sH+=(eval("typeof(slurl"+sT+"_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("slurl"+sT+"_"+j)+"')\">":">";
                sH+=eval("sltd"+sT+"_"+j)+"</td></tr>";
                if (eval("typeof(sltd"+sT+"_"+j+"_1)!=\"undefined\""))
                        pT[p++]=sT+"_"+j;
            }
        }
        sH+="</table>";
	document.write(sH);
}
document.getElementById("mainmenu").style.visibility="visible";