

function layerOverOut(id,bgColor,Color) {
  //alert(id + ' ' + left + ' ' + top  + ' ' + visible  + ' ' + zindex);
  //alert(id);
   if (document.getElementByID){
    this.obj = document.getElementById(id).style;
  } else if (document.all)  {
    this.obj = document.all[id].style;
  } else if (document.layers) {
    this.obj = document.layers[id];
  } else if (!document.all && document.getElementById) {
   this.obj = document.getElementById(id).style;
  }
  
  this.obj.backgroundColor = bgColor;
  this.obj.color       = Color;
  //this.obj.z-index    = zindex;
  //this.obj.visibility = visible;
  
  return this.obj;
}



function ClearLayer(prevID) {
	var id = prevID;
   //if (document.getElementByID){
 //   this.obj = document.getElementById(id).style;
 // } else if (document.all)  {
 //   this.obj = document.all[id].style;
 // } else if (document.layers) {
 //   this.obj = document.layers[id];
 // } else if (!document.all && document.getElementById) {
//   this.obj = document.getElementById(id);

 //this.obj.visibility = "hidden";	  
 // this.obj.display = "none";
 // return this.obj;
// }	
   //alert("ID: " + id);
   var thisLevel = document.getElementById(id);
   //alert(thisLevel);
	thisLevel.style.display = "none";
   return thisLevel;
 }
 

function ShowLayer(ID) {
	//ClearPrevLayer(prevID);
	var id = ID;

 	 // if (document.getElementByID){
  // this.obj = document.getElementById(id).style;
  //} else if (document.all)  {
  //  this.obj = document.all[id].style;
  //} else if (document.layers) {
  //  this.obj = document.layers[id];
  //} else if (!document.all && document.getElementById) {
  // this.obj = document.getElementById(id);
 // }
  //this.obj.visibility = "visible";	
//  this.obj.display = "block";  
 // return this.obj;
 //}	
  var thisLevel = document.getElementById(id);
	if ( thisLevel.style.display == "none") {
		thisLevel.style.display = "block";
    	}
	//else {
		//ClearLayer(id);
		//}
   return thisLevel
	}
   
   
   function doWindowLoc(url) {
     
	   location.href = url;
}

function directionsWindow()
{
  plain_window = 

    window.open("directions.asp","plain","width=500,height=600,scrollbars=yes,resizable");
}

//from tdemo.js for Turbo Demo product demos
function isDemoOk()
{
     IsOk=true;
     bver=Math.round(parseFloat(navigator.appVersion) * 1000);
     if (navigator.appName.substring(0,8) == "Netscape")
     {
         if ((bver<5000) && (navigator.appVersion.indexOf("Mac")> 0))
             IsOk=false;
         else if (bver<4060)
             IsOk=false;
     }
	 if (navigator.appName.substring(0,9) == "Microsoft")
     {
         if(bver<4000)
             IsOk=false;
     }
     plugins=navigator.plugins;
     if (plugins!=null && IsOk==false)
     {
         for(i=0;i!=plugins.length;i++)
              if((plugins[i].name.indexOf("1.0")<0) && (plugins[i].name.indexOf("Java Plug-in")>=0))
                  IsOk=true;
     }
     return IsOk;
}

function openDemo(htmlFile,htmlWidth,htmlHeight)
{
var bua = navigator.userAgent;
alert("Found openDemo");
     s = 'resizable=0,toolbar=0,menubar=0,scrollbars=0,status=0,location=0,directory=0,width=350,height=200';
     if(!isDemoOk())
     {
          open("http://www.turbodemo.com/error.html",'',s);
     }
     else
     {

     if (bua.indexOf("Opera")!= -1) 
      {
          window.open(htmlFile+".htm",'','width='+htmlWidth+',height='+htmlHeight+',top=10,left=10');
      }
     else
      {
          window.open(htmlFile+".htm",'','width='+htmlWidth+',height='+htmlHeight+',top=10,left=10');
      }
 
     }
}