
// CODED BY NATHAN HILL nathan@electricghost.com

var Net,myInterval,myOtherInterval,myOtherOtherInterval,count,infoLayer,thebrowser;

    			 // Code fork for Netscape 4.x
                if(document.layers) {
                        thebrowser = "net";
                }
                // Code fork for IE
                if(document.all) {
                        thebrowser = "ie";
                }
                // Code fork for Standards Compliant browsers (Netscape 6, IE6, Mozilla)
                if(document.getElementById) {
                        thebrowser = "ver6";
                }


function fixResize(){
if (thebrowser == "net")
location.reload();
}

// initialize images
if (document.images){

var on1 = new Image();
var on2 = new Image();
var on3 = new Image();
var on4 = new Image();
var on5 = new Image();
var on6 = new Image();
var on7 = new Image();
var on8 = new Image();
var on9 = new Image();
var on10 = new Image();
var on11 = new Image();
var on12 = new Image();
var on13 = new Image();
var on14 = new Image();
var on15 = new Image();
var on16 = new Image();
var on17 = new Image();
var on18 = new Image();
// first drop down menu graphics
on1.src = "graphics/menu/3_1_on.gif";
on2.src = "graphics/menu/3_2_on.gif";
on3.src = "graphics/menu/3_3_on.gif";
on4.src = "graphics/menu/3_4_on.gif";
on5.src = "graphics/menu/3_5_on.gif";
on6.src = "graphics/menu/3_6_on.gif";
// top graphics
on7.src = "graphics/menu/1_0_on.gif";
on8.src = "graphics/menu/2_0_on.gif";
on9.src = "graphics/menu/3_0_on.gif";
on10.src = "graphics/menu/4_0_on.gif";
on11.src = "graphics/menu/5_0_on.gif";
on12.src = "graphics/menu/6_0_on.gif";
on13.src = "graphics/menu/7_0_on.gif";
// second drop down menu graphics
on14.src = "graphics/menu/4_1_on.gif";
on15.src = "graphics/menu/4_2_on.gif";
on16.src = "graphics/menu/4_3_on.gif";
on17.src = "graphics/menu/4_4_on.gif";
on18.src = "graphics/menu/4_5_on.gif";

var off1 = new Image();
var off2 = new Image();
var off3 = new Image();
var off4 = new Image();
var off5 = new Image();
var off6 = new Image();
var off7 = new Image();
var off8 = new Image();
var off9 = new Image();
var off10 = new Image();
var off11 = new Image();
var off12 = new Image();
var off13 = new Image();
var off14 = new Image();
var off15 = new Image();
var off16 = new Image();
var off17 = new Image();
var off18 = new Image();
off1.src = "graphics/menu/3_1_off.gif";
off2.src = "graphics/menu/3_2_off.gif";
off3.src = "graphics/menu/3_3_off.gif";
off4.src = "graphics/menu/3_4_off.gif";
off5.src = "graphics/menu/3_5_off.gif";
off6.src = "graphics/menu/3_6_off.gif";
off7.src = "graphics/menu/1_0_off.gif";
off8.src = "graphics/menu/2_0_off.gif";
off9.src = "graphics/menu/3_0_off.gif";
off10.src = "graphics/menu/4_0_off.gif";
off11.src = "graphics/menu/5_0_off.gif";
off12.src = "graphics/menu/6_0_off.gif";
off13.src = "graphics/menu/7_0_off.gif";
off14.src = "graphics/menu/4_1_off.gif";
off15.src = "graphics/menu/4_2_off.gif";
off16.src = "graphics/menu/4_3_off.gif";
off17.src = "graphics/menu/4_4_off.gif";
off18.src = "graphics/menu/4_5_off.gif";
}


function makeObject(obj){
var theObj;
if (thebrowser == "net"){
  if (typeof obj == "string"){
  theObj = eval("document." + obj);
  } else {
  theObj = obj;
  }
} else {
  if (typeof obj == "string"){
  theObj = eval("document.all." + obj + ".style");
  } else {
  theObj = obj;
  }
}
return theObj;
}



function dissappear(){
if (thebrowser == "net"){
  document.menuoptions.visibility = "hidden";
} // ver 6 compliant browsers
 else if (thebrowser == "ver6"){
  document.getElementById("menuoptions").style.visibility = "hidden";
}
else{
  document.all.menuoptions.style.visibility = "hidden";
}
}


function dissappear2(){
if (thebrowser == "net"){
  document.menuoptions2.visibility = "hidden";
} // ver 6 compliant browsers
else if (thebrowser == "ver6"){
  document.getElementById("menuoptions2").style.visibility = "hidden";
}
else{
  document.all.menuoptions2.style.visibility = "hidden";
}
}


function menuRoll(menuDisplay, z){
  var theImage = "option" + z;
if (thebrowser == "net"){

  if (menuDisplay == "on"){
  clearTimeout(myOtherOtherInterval);
  dissappear2();
  document.menuoptions.visibility = "visible";
  clearTimeout(myOtherInterval);
  //
    if (document.images && z == 9){
	document[theImage].src = eval("on" + z + ".src");
	}
	//
  } else {
   //
    if (document.images && z == 9){
	document[theImage].src = eval("off" + z + ".src");
	}
	//
    myOtherInterval = setTimeout("dissappear()",800);
  }
  // ie
  
   // ver 6 compliant browsers
}else if (thebrowser == "ver6"){

  if (menuDisplay == "on"){
  clearTimeout(myOtherOtherInterval);
  dissappear2();
  document.getElementById("menuoptions").style.visibility = "visible";
  clearTimeout(myOtherInterval);
  //
    if (document.images){
	document[theImage].src = eval("on" + z + ".src");
	}
	//
  } else {
   //
    if (document.images){
	document[theImage].src = eval("off" + z + ".src");
	}
	//
    myOtherInterval = setTimeout("dissappear()",800);
  }
  
  
} else {
  if (menuDisplay == "on"){
  clearTimeout(myOtherOtherInterval);
  dissappear2();
  document.all.menuoptions.style.visibility = "visible";
  clearTimeout(myOtherInterval);
    if (document.images){
	document[theImage].src = eval("on" + z + ".src");
	}
  } else {
  
    if (document.images){
	document[theImage].src = eval("off" + z + ".src");
	}
    myOtherInterval = setTimeout("dissappear()",800);
  }
  
}
}

function menuRoll2(menuDisplay, z){
  var theImage = "option" + z;
if (thebrowser == "net"){

  if (menuDisplay == "on"){
  clearTimeout(myOtherInterval);
  dissappear();
  document.menuoptions2.visibility = "visible";
  clearTimeout(myOtherOtherInterval);
  //
    if (document.images && z == 10){
	document[theImage].src = eval("on" + z + ".src");
	}
	//
  } else {
  //
    if (document.images && z == 10){
	document[theImage].src = eval("off" + z + ".src");
	}
	//
    myOtherOtherInterval = setTimeout("dissappear2()",800);
  }
  
      // ver 6 compliant browsers
}else if (thebrowser == "ver6"){

  if (menuDisplay == "on"){
  clearTimeout(myOtherInterval);
  dissappear();
  document.getElementById("menuoptions2").style.visibility = "visible";
  clearTimeout(myOtherOtherInterval);
  //
    if (document.images){
	document[theImage].src = eval("on" + z + ".src");
	}
	//
  } else {
   //
    if (document.images){
	document[theImage].src = eval("off" + z + ".src");
	}
	//
    myOtherOtherInterval = setTimeout("dissappear2()",800);
  }
  
  
  
  // ie  
} else {
  if (menuDisplay == "on"){
  clearTimeout(myOtherInterval);
  dissappear();
  document.all.menuoptions2.style.visibility = "visible";
  clearTimeout(myOtherOtherInterval);
    if (document.images){
	document[theImage].src = eval("on" + z + ".src");
	}
  } else {
  
    if (document.images){
	document[theImage].src = eval("off" + z + ".src");
	}
    myOtherOtherInterval = setTimeout("dissappear2()",800);
  }
  
}
}

function simpleRoll(state, z){
  var theImage = "option" + z;
  if (state == "on") {
  document[theImage].src = eval("on" + z + ".src");
  clearTimeout(myOtherOtherInterval);
  clearTimeout(myOtherInterval);
  dissappear();
  dissappear2();
  } else {
  document[theImage].src = eval("off" + z + ".src");
  }
}
