function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // --- BROWSER VERSION ---
    this.major = parseInt(navigator.appVersion)
    this.minor = parseFloat(navigator.appVersion)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav2 = (this.nav && (this.major == 2))
    this.nav3 = (this.nav && (this.major == 3))
    this.nav4 = (this.nav && (this.major == 4))

    this.ie   = (agt.indexOf("msie") != -1)
    this.ie3  = (this.ie && (this.major == 2))
    this.ie4  = (this.ie && (this.major == 4))

    this.opera = (agt.indexOf("opera") != -1)
     
    this.nav4up = this.nav && (this.major >= 4)
    this.ie4up  = this.ie  && (this.major >= 4)

    this.v4up = ((this.nav4up) || (this.ie4up));
    this.nav6 = this.nav && (this.major >= 6)

}


var is = new Is();


<!--	Ladda stylesheet beroende på browser		 --> 
  if (is.nav) {
    document.write('<LINK REL="STYLESHEET" TYPE="text/css" HREF="../tns.css">');
  } else {
    document.write('<LINK REL="STYLESHEET" TYPE="text/css" HREF="../tie.css">');   
  }

<!--	Öppna fönster med parametrar			 --> 
function openWindow(theWindowName,dX,dY,canScroll,canResize,pX,pY) {
 var ourWindow=null;
 var ourWindowParams='width='+dX+',height='+dY+',scrollbars='+canScroll+',resizable='+canResize+',top='+pY+',left='+pX; 

 ourWindow = window.open('',theWindowName, ourWindowParams);

 if (ourWindow != null) {
  if (ourWindow.opener == null)
   ourWindow.opener = self;
 }
 return ourWindow; 
}

<!--	Redirect med URL och produktid			 --> 
function prodwindow(url) {
  this.productwindow = openWindow('productwindow','450','450','yes','no','300','300');
  this.productwindow.location.href = url; 
  this.productwindow.focus(); 
 }


