// JavaScript Document

a = navigator.appName;
b = parseInt(navigator.appVersion);
ok = "no";

if (a == "Netscape" && b >= 3)
 {
 ok = "yes";
 }
if (a == "Microsoft Internet Explorer" && b >= 4)
 {
 ok = "yes";
 }

if (ok == "yes")
 {
 Image1    = new Image(); Image1.src = "http://www.buyautomotive.com/media/aboutus.gif";
 Imagenew1 = new Image(); Imagenew1.src = "http://www.buyautomotive.com/media/aboutuson.gif";
 Image2    = new Image(); Image2.src = "http://www.buyautomotive.com/media/customerservice.gif";
 Imagenew2 = new Image(); Imagenew2.src = "http://www.buyautomotive.com/media/customerserviceon.gif";
 Image3    = new Image(); Image3.src = "http://www.buyautomotive.com/media/orderstatus.gif";
 Imagenew3 = new Image(); Imagenew3.src = "http://www.buyautomotive.com/media/orderstatuson.gif";
 Image4    = new Image(); Image4.src = "http://www.buyautomotive.com/media/faq.gif";
 Imagenew4 = new Image(); Imagenew4.src = "http://www.buyautomotive.com/media/faqon.gif";
 Image5    = new Image(); Image5.src = "http://www.buyautomotive.com/media/shoppingcart.gif";
 Imagenew5 = new Image(); Imagenew5.src = "http://www.buyautomotive.com/media/shoppingcarton.gif";
}

function changeImage(namesrc,imgname)
{
if (ok == "yes")
 {
 ChangeTo = eval(imgname+ ".src");
 document.images[namesrc].src = ChangeTo;
 }
}

function myRuler () 
{
 if (document.layers)
 {
  myHeight = window.innerHeight - 815;
  if (myHeight >= 1) 
  {
   document.write ('<img src="http://www.buyautomotive.com/media/spacer.gif" width="1" height="'+myHeight+'" name="ruler"><br>');
  }
 } 
 else 
 {
  document.write ('<img src="http://www.buyautomotive.com/media/spacer.gif" width="1" height="1" name="ruler"><br>');
  enlarge();
 }
}

function enlarge() 
{
 if (browserName == "Netscape" && document.getElementById ) 
 {
  myHeight = window.innerHeight - 815;
  if (myHeight >= 1) 
  {
   document.images['ruler'].height = myHeight;
  }
 }
 else if (document.all) 
 {
  myHeight = document.body.offsetHeight - 815;
  if (myHeight >= 1) 
  {
   document.images['ruler'].height = myHeight;
  }
 }
}
 
function openWindow(url) 
{ 
popupWin = window.open(url, 'openWin', "width=400, height=250, scrollbars=yes, resizable=yes"); 
} 