

// ============
function Is ()
// ============
{ 
  var b 
  var n

  this.isNS = false
  this.isIE = false
  this.isOthers = false

  if (navigator.appName == "Netscape") this.isNS=true;
  else if (navigator.appName == "Microsoft Internet Explorer")  this.isIE=true;
  else this.isOthers = true;

 // *** BROWSER VERSION ***
 this.version=0

 if (this.isNS)
  {//1
   b=true
    //detect Netscape 4.77+
    if (navigator.userAgent.indexOf("Netscape6")!=-1)
     {//2
      temp=navigator.userAgent.split("Netscape6")
      n=parseFloat(temp[1])
      if (!isNaN(n))
       {//3
        this.version=n
        b=false
       }//3
     } 
    if (b)  
     {//4
        if (navigator.userAgent.indexOf("Netscape6/")!=-1) 
        { //5
         temp=navigator.userAgent.split("Netscape6/")
   	 n=parseFloat(temp[1])
         if (!isNaN(n))
          {
           this.version=n
           b=false 
          }
        } //5
      }//4
     
      //detect Netscape 4.7-
     if (b) this.version=parseFloat(navigator.appVersion)
      b=false
    
  }//1
 else 
 {
  if (this.isIE)
  {
  //detect IE5.x
   if (navigator.appVersion.indexOf("MSIE")!=-1){
     temp=navigator.appVersion.split("MSIE")
     n= parseFloat(temp[1])
     if (!isNaN(n))
     {
      this.version=n
      b=false 
     }
   }
  }
 }

  if (b) this.version=parseFloat(navigator.appVersion)

  this.x=window.screen.width
  this.y=window.screen.height


}


var is = new Is();

////////////////////////////////////////////////////////////////////////// 

 function LoadImage (img) 
 { 

  if (CanHandleImage())  
   {
    var a=new Image();    
    a.src=img;    
    return a;  
   }  
  else   
   return (null); 
}

// ========================
 function CanHandleImage () 
// ========================
 {  
  return ((is.isNS && (is.version >= 3)) ||         
          (is.isIE && (is.version >= 4))) 
 }


 
////////////////////////////////////////////////////////////////////////// 


 function ChangeImage (img1name, img2) 
 { if (CanHandleImage() && (img2 != null))  
   {   
    document[img1name].src=img2.src;  
   }
 }




//----------------------------------------------
function printWindow (msg)
//----------------------------------------------
{

 if(window.print != null )
  {
   if (window.focus != null)
    window.focus();
   window.print();
  }
  else
  {
   if (msg != "")
   { 
    alert(msg);
   }
  }

}

