var loaded = 0;
var BaseURL = "";

function PreLoad() {
	
if (document.images != null) {

clickme1 = new Image();
clickme1.src = BaseURL + "images/menu/inspections.gif";
clickme2 = new Image();
clickme2.src = BaseURL + "images/menu/inspections-over.gif";
clickme3 = new Image();
clickme3.src = BaseURL + "images/menu/about.gif";
clickme4 = new Image();
clickme4.src = BaseURL + "images/menu/about-over.gif";
clickme5 = new Image();
clickme5.src = BaseURL + "images/menu/contact.gif";
clickme6 = new Image();
clickme6.src = BaseURL + "images/menu/contact-over.gif";
clickme7 = new Image();
clickme7.src = BaseURL + "images/menu/home.gif";
clickme8 = new Image();
clickme8.src = BaseURL + "images/menu/home-over.gif";
clickme9 = new Image();
clickme9.src = BaseURL + "images/menu/reno.gif";
clickme10 = new Image();
clickme10.src = BaseURL + "images/menu/reno-over.gif";
clickme11 = new Image();
clickme11.src = BaseURL + "images/menu/blog.gif";
clickme12 = new Image();
clickme12.src = BaseURL + "images/menu/blog-over.gif";

}
	loaded = 1;
}

function hiLite(imgDocID,imgObjName) {
if (document.images !=null) {
 if (loaded)
  document.images[imgDocID].src = eval(imgObjName + ".src")
 }
}

function highlight(imgDocID,imgObjName) {
i = new Image();
i.src = imgObjName;
if (document.images != null) {
 if (loaded)
  document.images[imgDocID].src = i.src
 }
}

function popup(winName,URL,height,width) {
 var popup = window.open(URL,winName,"height=" + height + ",width=" + width + ",left=28,top=25,status=0,scrollbars=1,toolbar=0,directories=0,menubar=0,location=0");
 NewWindow = popup;
 NewWindow.focus();
}

function popup1(status,url) {
 
 var adWidth = 470;
 var adHeight = 400;

  if (screen) {
   var bottom = screen.availHeight;
   var right = screen.availWidth;
   var pos_x = parseInt((right- adWidth)/2) ;
   var pos_y = parseInt((bottom - adHeight)/2);
   } else {
   pos_x = 30;
   pos_y = 50;
  }
 
 if(status != 0) {
 if(popup != null) popup.focus(); 
 else { 
 var popup = open(url, "popup", "HEIGHT=" + adHeight + ",WIDTH=" + adWidth + ",left=" + pos_y + ",top=" + pos_y + ",status=1,scrollbars=yes,toolbar=no,directories=no,menubar=no,location=no,resizable=1");
 popup_window = popup;
 popup_window.focus();
 }
 } else {
 if(popup_window != null) popup_window.close();
 }
}

var check = false;

function init() {				//  alert ("Running Init");

if (document.layers) {				//  alert ("Running Netscape 4");

 layerRef="document.layers";
 styleSwitch="";
 visibleVar="show";
 agent ="ns4";

} else if (document.all) {			//  alert ("Running IE");

 layerRef="document.all";
 styleSwitch=".style";
 visibleVar="visible";
 agent ="ie";

} else if (document.getElementById) {		//  alert ("Running Netscape 6");

 layerRef="document.getElementByID";
 styleSwitch=".style";
 visibleVar="visible";
 agent="moz";

} else {					//  alert("Older than 4.0 browser.");

 agent="none";
 newbrowser = false;

}
						//  window.status='status bar text to go here';
check = true;
}

// Turn layers on and off

function showLayer(layerName) {

if (check) {
 if (agent=="none") {
  return;
 } else if (agent=="moz") {
  document.getElementById(layerName).style.visibility="visible";
  document.getElementById(layerName).style.display="";
 } else if (agent=="ie") {
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="block"');
 } else {
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="block"');
 }
} else {					// alert ("Please wait for the page to finish loading.");
 return;
}
}

function hideLayer(layerName) {

if (check) {
 if (agent=="none") {
  return;
 } else if (agent=="moz") {
  document.getElementById(layerName).style.visibility="hidden";
  document.getElementById(layerName).style.display="none";
 } else if (agent=="ie") {
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="none"');
 } else {
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="none"');
 }
} else {					//  alert ("Please wait for the page to finish loading.");
 return;
}
}

function hideAllemark() {
 hideLayer('subone');
}
