function makeBrowser(){
 this.ver=navigator.appVersion
 this.dom=document.getElementById?1:0
 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
 this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
 this.ie4=(document.all && !this.dom)?1:0;
 this.ns6=(this.dom && !document.all)?1:0;
 this.ns5=(this.dom && parseInt(this.ver) >= 5 && !this.ver.indexOf("Netscape6")) ?1:0;
 this.ns4=(document.layers && !this.dom)?1:0;
     this.opera = (navigator.userAgent.indexOf("Opera") != -1);
 if (this.ie6) this.ie5=true;
 this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ns6 || this.opera)
 return this
}
bw=new makeBrowser();

function buildTopMenuRubrikStr(inMenu_Link,inArrow,inPageUrl){
    theCount--;
    theLinkStr=inMenu_Link;
    theLinkArray=theLinkStr.split(">");
    if(theLinkArray[0].length<1){theLinkArray[0]='<a href=""';}
    theLinkStr=theLinkArray[0]+'><img src="'+inArrow+'" width="8" height="10" alt="" border="0"></a>';
    theHrefArray=theLinkArray[0].split("=");
    theHref=theHrefArray[1].substr(1,theHrefArray[1].length-2);
    if(theHref==inPageUrl){
    theBgColor="menuehighlight";
    }else{
        theBgColor="menue";
    }
} 
function buildBottomMenuRubrik(inMenu_Link,inArrow,inUrl){
        theCount--;
        theLinkStr=inMenu_Link;
        theLinkArray=theLinkStr.split(">");
         theLinkStr=theLinkArray[0]+'><img src="'+inArrow+'" width="7" height="10" alt="" border="0"></a></td>';
       theHrefArray=theLinkArray[0].split("=");
        theHref=theHrefArray[1].substr(1,theHrefArray[1].length-2);
        if(theHref==inUrl){
            theBgColor="menuelightbluehighlight";
        }else{
            theBgColor="menuebright";
        }
    }

function buildTopicMenuStr(inTopic_Link,inArrow,inUrl){
    theCount--;
    theLinkStr='<a href="'+inTopic_Link+'"><img src="'+inArrow+'" width="8" height="10" alt="" border="0"></a></td>';
        if(inTopic_Link==inUrl){
            theBgColor="menuehighlight";
        }else{
            theBgColor="menue";
        }
}
function buildProductsMenu(inMenu_Link,inArrow,inUrl,inText){
        theCount--;
  if(inMenu_Link==theFirstProduct & !bw.ns4){
            theBgColor="menueCAD8E7";
        }else{
            theBgColor="menuegrey";
        }
  theStr='';
  theStr+='<tr><td class="menue"><img src="'+transparent+'" width="4" height="1" alt="" border="0"></td><td class="menue"><img src="'+transparent+'" width="7" height="1" alt="" border="0"></td><td class="menue"><img src="'+transparent+'" width="150" height="1" alt="" border="0"></td><td class="menue"><img src="'+transparent+'" width="6" height="1" alt="" border="0"></td></tr>';
  theStr+='<tr class="'+theBgColor+'" id="pmTr1_'+theCount+'"><td colspan="4"><img src="'+transparent+'" width="170" height="2" alt="" border="0"></td></tr>';
  theStr+='<tr class="'+theBgColor+'" id="pmTr2_'+theCount+'"><td><img src="'+transparent+'" width="4" height="13" alt="" border="0"></td><td valign="top"><a href="javascript:changeFrameSrc(\''+inMenu_Link+'\','+theCount+')"><img src="'+inArrow+'" width="7" height="10" alt="" border="0"></a></td><td valign="top"><span class="sans11plainblue">';
  theStr+='<A href="javascript:changeFrameSrc(\''+inMenu_Link+'\','+theCount+')"><FONT class="sans11plainblue">'+inText+'</FONT></A></span></td><td><img src="'+transparent+'" width="6" height="1" alt="" border="0"></td></tr>';
  theStr+='<tr class="'+theBgColor+'" id="pmTr3_'+theCount+'"><td colspan="4"><img src="'+transparent+'" width="170" height="2" alt="" border="0"></td></tr>';
  if(theCount==0){theStr+='<tr><td class="menue"><img src="'+transparent+'" width="4" height="1" alt="" border="0"></td><td class="menue"><img src="'+transparent+'" width="7" height="1" alt="" border="0"></td><td class="menue"><img src="'+transparent+'" width="150" height="1" alt="" border="0"></td><td class="menue"><img src="'+transparent+'" width="6" height="1" alt="" border="0"></td></tr>';}
  document.write(theStr);
 }
function xxxchangeFrameSrc(inLink,inNr){
    if (bw.ns4){
       document.layers["inFrame"].src=inLink;
    }else{
        document.getElementById("inFrame").src=inLink;
       for(i=0;i<theProductAnz;i++){
           theBg=(i==inNr)?"#cad8e7":"#e8e8e8";           
		   document.getElementById("pmTr1_"+i).style.background=theBg;
           document.getElementById("pmTr2_"+i).style.background=theBg;
           document.getElementById("pmTr3_"+i).style.background=theBg;
      }    
    }

}
function changeFrameSrc(inLink,inNr){
    if (bw.ns4){
       document.layers["inFrame"].src=inLink;
    }else{
        document.getElementById("inFrame").src=inLink;
		if(!bw.ns6){
	       for(i=1;i<theProdArray.length;i++){
	           theBg=(theProdArray[i]==inLink)?"#cad8e7":"#e8e8e8";           
	     	document.getElementById(theProdArray[i]).style.background=theBg;
	         
	      }  
	  }  
    }
}
function setLayerSrc(){
  if (bw.ns4){
    if(document.layers["inFrame"]){
   document.layers["inFrame"].src=theProdArray[1];
   setLayerToImg("inFrame","layermark",170,8);
    }
  }
 }
function setLayerToImg(inSource,inDestination,inOffx,inOffy)
{
 if(bw.ns4){
    if (document.layers["inFrame"]){
      var pos = document.images[inDestination];
      document.layers[inSource].pageX = pos.x+inOffx;
     document.layers[inSource].pageY = pos.y+inOffy;
     document.layers[inSource].visibility = 'visible';
    }
 }
 }
 selfinstall();
 function selfinstall()
{
 // store window size for Netscape 4.x resize fix
 if (bw.ns4){
  ns_origWidth = innerWidth;
  ns_origHeight = innerHeight;
  window.onresize = netscapeResizeFix;
  //theTime=setTimeout("netscapeResizeFix()", 1000);
 }
}
function netscapeResizeFix ()
{ 
 if (typeof (ns_origWidth) != "number" || typeof (ns_origHeight) != "number"){
  theTime=setTimeout("netscapeResizeFix()", 1000); return;
 }
 if (innerWidth != ns_origWidth || innerHeight != ns_origHeight){ 
  location.reload();
 }else{
  theTime=setTimeout("netscapeResizeFix()", 1000);
 }
}
 
