var type = "IE";	//Variable used to hold the browser name

function testbr()
{
   if (navigator.userAgent.indexOf("Opera")>=0)
  {
      //location.href="http://www.be-in-time.com/main_common/browser.html";
  }
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))
  {
      //var params = navigator.appVersion.split(";");
      //var params1 = params[2].split(")");
      //alert("Your browser:        " + navigator.appName + "\nBrowser version:   " + params[1] + "\nWindows version: " + params1[0] + "\n\n          Your system is ready to use \n WEB-BASED APPOINTMENT SCHEDULER");
  } 
  else 
  {
      if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 5 ))
      {
         //alert("Your browser:        " + " Netscape / Mozilla" + "\nBrowser version:   " + "NN7+ or MO1.4+" +  "\n\n          Your system is ready to use \n WEB-BASED APPOINTMENT SCHEDULER");
      }
      else
         location.href="http://www.eicsoft.com/browser.html";
   }		
}

//detects the capabilities of the browser
function BrowserSniffer()
{
   if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) type="OP";	//Opera
   else if (document.all) type="IE";														//Internet Explorer e.g. IE4 upwards
   else if (document.layers) type="NN";													//Netscape Communicator 4
   else if (!document.all && document.getElementById) type="MO";	              		//Mozila e.g. Netscape 6 upwards
   else type = "IE";
   //alert( "type:" + type); 
}

// Check whether IE4 or later.
var MS = navigator.appVersion.indexOf("MSIE");
window.isIE4 = (MS > 0) &&
               (parseInt(navigator.appVersion.substring(MS + 5, MS + 6)) 
               >= 4);

function getElement(obj_id)
{
   var el;

   if (type=="IE" ) {
      el = document.all[obj_id]; 
  }
  if (type=="NN") { 
  }
  if (type=="MO") {
      el = document.getElementById(obj_id);
  }
  if (type=="OP") {
      el = document.getElementById(obj_id);
  }
  return el;
}

testbr();

function StartOnLoad()
{
   BrowserSniffer();

   if (type=="IE" ) 
   {
     try {
       getElement("Img1").style.cursor="hand";
       getElement("Img2").style.cursor="hand";
       getElement("Img3").style.cursor="hand";
       getElement("Img4").style.cursor="hand";
       getElement("Img5").style.cursor="hand";

       getElement("Img6").style.cursor="hand";
       getElement("Img7").style.cursor="hand";
       getElement("Img8").style.cursor="hand";
       getElement("Img9").style.cursor="hand";
       getElement("Img10").style.cursor="hand";
       getElement("Img11").style.cursor="hand";
       getElement("Img12").style.cursor="hand";
    }
    catch(ex){} 
   }
   if (type=="NN") { 
   }
   if (type=="MO" || type=="OP") {
     try {
       getElement("Img1").style.cursor="pointer";
       getElement("Img2").style.cursor="pointer";
       getElement("Img3").style.cursor="pointer";
       getElement("Img4").style.cursor="pointer";
       getElement("Img5").style.cursor="pointer";

       getElement("Img6").style.cursor="pointer";
       getElement("Img7").style.cursor="pointer";
       getElement("Img8").style.cursor="pointer";
       getElement("Img9").style.cursor="pointer";
       getElement("Img10").style.cursor="pointer";
       getElement("Img11").style.cursor="pointer";
       getElement("Img12").style.cursor="pointer";
    }
    catch(ex){} 
   }

}

function tv(obj, path)
{
 //alert(obj.src);

 getElement("ImgMain").src = path;

 try {
   getElement("Img1").style.border = "1px solid #cdcdcd";
   getElement("Img2").style.border = "1px solid #cdcdcd";
   getElement("Img3").style.border = "1px solid #cdcdcd";
   getElement("Img4").style.border = "1px solid #cdcdcd";
   getElement("Img5").style.border = "1px solid #cdcdcd";

   getElement("Img6").style.border = "1px solid #cdcdcd";
   getElement("Img7").style.border = "1px solid #cdcdcd";
   getElement("Img8").style.border = "1px solid #cdcdcd";
   getElement("Img9").style.border = "1px solid #cdcdcd";
   getElement("Img10").style.border = "1px solid #cdcdcd";
   getElement("Img11").style.border = "1px solid #cdcdcd";
   getElement("Img12").style.border = "1px solid #cdcdcd";
 }
 catch(ex)
 {
    //alert("Exception");
 } 

 getElement(obj.name).style.border = "1px solid #FF6600";

/* document.all["ImgMain"].src = obj.src;
 document.all["Img1"].style.border = "2px solid #cdcdcd";
 document.all["Img2"].style.border = "2px solid #cdcdcd";
 document.all["Img3"].style.border = "2px solid #cdcdcd";
 document.all["Img4"].style.border = "2px solid #cdcdcd";
 document.all["Img5"].style.border = "2px solid #cdcdcd";
 document.all["Img6"].style.border = "2px solid #cdcdcd";
 document.all["Img7"].style.border = "2px solid #cdcdcd";
 document.all["Img8"].style.border = "2px solid #cdcdcd";
 document.all["Img9"].style.border = "2px solid #cdcdcd";
 document.all["Img10"].style.border = "2px solid #cdcdcd";
 document.all["Img11"].style.border = "2px solid #cdcdcd";
 document.all["Img12"].style.border = "2px solid #cdcdcd";

 document.all[obj.name].style.border = "2px solid #FF6600";*/
}

