if (document.images)
{
  dot = new Image();
  dot.src = "../images/sp/qlsquare_over.gif";
  
  dotnav = new Image();
  dotnav.src = "../images/sp/navsquare_over.gif";
  
  spacer = new Image();
  spacer.src = "../images/sp/qlsquare.gif"
  
  spacernav = new Image();
  spacernav.src = "../images/sp/navsquare.gif"
  
  
}

function dotOn (imgName, imgKind) //dot on
{
 if(!imgKind)
   {
    var imgKind='';
   }
 if (document.images)
 {
   document[imgName].src = eval('dot' + imgKind +'.src');
 }
}

function dotOff(imgName, imgKind) // dot off
{
 if(!imgKind)
   {
    var imgKind='';
   }
 if (document.images)
 {
   document[imgName].src = eval('spacer' + imgKind +'.src') ;
 }
}

 if (document.images)
  {
     // active images
     producton = new Image();
     producton.src = "../images/sp/product_over.gif";
     whatsnewon = new Image();
     whatsnewon.src = "../images/sp/whatsnew_over.gif";
     customeron = new Image();
     customeron.src = "../images/sp/customer_over.gif";
     downloadon = new Image();
     downloadon.src = "../images/sp/download_over.gif";
     contacton = new Image();
     contacton.src = "../images/sp/contact_over.gif";
     distributoron = new Image();
     distributoron.src = "../images/sp/distributor_over.gif";
     abouton = new Image();
     abouton.src = "../images/sp/about_over.gif";
     homeon = new Image();
     homeon.src = "../images/sp/home_over.gif";
     
     
     // inactive images
     productoff = new Image();
     productoff.src = "../images/sp/product.gif";
     whatsnewoff = new Image();
     whatsnewoff.src = "../images/sp/whatsnew.gif";
     customeroff = new Image();
     customeroff.src = "../images/sp/customer.gif";
     downloadoff = new Image();
     downloadoff.src = "../images/sp/download.gif";
     contactoff = new Image();
     contactoff.src = "../images/sp/contact.gif";
     distributoroff = new Image();
     distributoroff.src = "../images/sp/distributor.gif";
     aboutoff = new Image();
     aboutoff.src = "../images/sp/about.gif";
     homeoff = new Image();
     homeoff.src = "../images/sp/home.gif";
     
   }
   
   // image on function
   function imgOn (imgName)
   {
     if (document.images)
     {
       document [imgName].src = eval (imgName + "on.src");
     }
   }
   
   // image off function
   function imgOff(imgName)
   {
     if (document.images)
     {
       document [imgName].src = eval (imgName + "off.src");
     }
   }
   
   function getRandomNumber(seed)
     {
      randomNum = Math.floor((Math.random() * seed));
      randomNum=randomNum+1;
      return randomNum;
     } 
     
   function imageRandomizer()
     {
      var colorImg=getRandomNumber(7)
      var bwImg1=colorImg
      while (bwImg1==colorImg)
        {
         bwImg1=getRandomNumber(7)
        }
      var bwImg2=bwImg1
      while ((bwImg2==colorImg)||(bwImg2==bwImg1))
        {
         bwImg2=getRandomNumber(7)
        }
      
      //window.status='color='+colorImg +', bw1=' + bwImg1  +', bw2=' + bwImg2
      
      document.color.src="../images/sp/randimg-color_" + colorImg +".jpg"
      document.bw1.src="../images/sp/randimg-bw_" + bwImg1 +".jpg"
      document.bw2.src="../images/sp/randimg-bw_" + bwImg2 +".jpg"
      
     }
     
  function popWindow(url, width, height, windowName, scrollb)
  {
    // default width and height for window
    if (!width) { width  = 439; }
    if (!height) { height = 325; }
    if (!scrollb) {scrollb = "yes"}
      // positioning of pop-up window
      { leftpos=0
        if (screen)
           {
            leftpos = screen.width-(width+230)
           }
      // default window name if not passed to function
      if (!windowName) { windowName = "Popup"; }
      wref = window.open (url, windowName,"toolbar=no,width=" + width + ",height=" + height + ",directories=no,status=no,scrollbars=" +scrollb + ",resizable=yes,menubar=no,top=50,left="+leftpos);
      wref.focus();
      }
    } 