
//####################################################################################

//Browser test so early versions won't display
           bName = navigator.appName;
           bVer = parseInt(navigator.appVersion);
           if ((bName == "Netscape" && bVer >= 3) ||
           (bName == "Microsoft Internet Explorer" &&
           bVer >= 4)) br = "n3";
           else br = "n2";

           if (br== "n3") {

		   
//####################################################################################		   
		   
//Preload on & off Images
		   img1on         = new Image();              
           img1on.src   = "images/menu/menyer_on.gif";
           img1off        = new Image();               
           img1off.src   = "images/menu/menyer_off.gif";
           
           img2on       = new Image();              
           img2on.src   = "images/menu/klubbliv_on.gif";
           img2off        = new Image();               
           img2off.src   = "images/menu/klubbliv_off.gif";
		   
           img3on       = new Image();              
           img3on.src   = "images/menu/kurser_on.gif";
           img3off        = new Image();               
           img3off.src   = "images/menu/kurser_off.gif";
		   
           img4on       = new Image();              
           img4on.src   = "images/menu/nyheter_on.gif";
           img4off        = new Image();               
           img4off.src   = "images/menu/nyheter_off.gif";
		   
		   img5on         = new Image();              
           img5on.src   = "images/menu/catering_on.gif";
           img5off        = new Image();               
           img5off.src   = "images/menu/catering_off.gif";
		   
		   img6on         = new Image();              
           img6on.src   = "images/menu/vimmel_on.gif";
           img6off        = new Image();               
           img6off.src   = "images/menu/vimmel_off.gif";
		   
		   img7on         = new Image();              
           img7on.src   = "images/menu/historia_on.gif";
           img7off        = new Image();               
           img7off.src   = "images/menu/historia_off.gif";
		   
		   img8on         = new Image();              
           img8on.src   = "images/menu/go_vidare_on.gif";
           img8off        = new Image();               
           img8off.src   = "images/menu/go_vidare_off.gif";
		   
		   img9on         = new Image();              
           img9on.src   = "images/on.gif";
           img9off        = new Image();               
           img9off.src   = "images/off.gif";
		   
		   }
		   	   
//Function to replace 'off' image with 'on' image
           // Replace the off image with the on image
           function imgOn(imgName) {
           if (br== "n3") {
               document[imgName].src = eval(imgName+"on.src");
              //document["desc"].src = eval(imgName+"des.src");
              }
           }

//Function to replace 'off' image with 'on' image
// Replace the on image with the off image
           function imgOff(imgName) {
           if (br== "n3") {
              document[imgName].src = eval(imgName+"off.src");
			  }
	    	}

			
//####################################################################################
			
// Open Window function - Generic			
function open_window(url) {
oNewWindow  = 					window.open(url,"link",'toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=470,left=250,top=110');
}	

//####################################################################################			
				
// Print Frame Function
function myprint() {
window.parent.main.focus();
window.print();
}		



// Open Window function - Center
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}
function CloseNewWin(){if(win!=null && win.open)win.close()}
window.onfocus=CloseNewWin;
