
// CODED BY JASON MORRIS jasonmorris@telus.net

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 on7 = 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();
on7.src = "icons/aboutushbutton.jpg";
on9.src = "icons/productshbutton.jpg";
on10.src = "icons/pastprojhbutton.jpg";
on11.src = "icons/galleryhbutton.jpg";
on12.src = "icons/orderinghbutton.jpg";
on13.src = "icons/shippinghbutton.jpg";
on14.src = "icons/contactushbutton.jpg";
on15.src = "icons/dealersHbutton.jpg";

var off7 = 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();
off7.src = "icons/aboutusnbutton.jpg";
off9.src = "icons/Productsnbutton.jpg";
off10.src = "icons/pastprojnbutton.jpg";
off11.src = "icons/gallerynbutton.jpg";
off12.src = "icons/orderingnbutton.jpg";
off13.src = "icons/shippingnbutton.jpg";
off14.src = "icons/contactusnbutton.jpg";
off15.src = "icons/dealersnbutton.jpg";

}


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()",3000);
  }
  
  
} 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");
  }
}

