var loaded = 0;

function PreLoad() {
	
if (document.images != null) {

clickme1 = new Image();
clickme1.src = "images/menu/home.gif";
clickme1o = new Image();
clickme1o.src = "images/menu/home-over.gif";
clickme2 = new Image();
clickme2.src = "images/menu/athletic.gif";
clickme2o = new Image();
clickme2o.src = "images/menu/athletic-over.gif";
clickme3 = new Image();
clickme3.src = "images/menu/residential.gif";
clickme3o = new Image();
clickme3o.src = "images/menu/residential-over.gif";
clickme4 = new Image();
clickme4.src = "images/menu/hints.gif";
clickme4o = new Image();
clickme4o.src = "images/menu/hints-over.gif";
clickme5 = new Image();
clickme5.src = "images/menu/maintenance.gif";
clickme5o = new Image();
clickme5o.src = "images/menu/maintenance-over.gif";
clickme6 = new Image();
clickme6.src = "images/menu/installation.gif";
clickme6o = new Image();
clickme6o.src = "images/menu/installation-over.gif";
clickme8 = new Image();
clickme8.src = "images/menu/contact.gif";
clickme8o = new Image();
clickme8o.src = "images/menu/contact-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
 }
}

var persistmenu="yes" //"yes" or "no"
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for current page only

if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
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 hideAllHints() {
 hideLayer('soil');
 hideLayer('install');
}

function hideAllInstall() {
 hideLayer('soil');
 hideLayer('prep');
 hideLayer('install');
}

function hideAllSpecs() {
 hideLayer('supreme');
 hideLayer('shade');
 hideLayer('sport');
 hideLayer('pro-sport');
 hideLayer('select');
 hideLayer('standard');
 hideLayer('easy-lawn');
 hideLayer('compare');
}


 function popupVid(status,url) {
 
 var adWidth = 320;
 var adHeight = 240;

  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=no,toolbar=no,directories=no,menubar=no,location=no");
 popup_window = popup;
 }
 } else {
 if(popup_window != null) popup_window.close();
 }
 }
