/*****  PRELOAD IMAGES ******/
var isDOM=document.getElementById?1:0;
var isIE=document.all?1:0;
var isNS4=navigator.appName=='Netscape'&&!isDOM?1:0;

var preloaded = new Array(); 
 function preload_images() { 
     for (var i = 0; i < arguments.length; i++){ 
         preloaded[i] = document.createElement('img'); 
         preloaded[i].setAttribute('src',arguments[i]); 
     }; 
 }; 
 

 preload_images( 
	 'images/button-prod-bg.gif',
	 'images/button-prod-bg-on.gif',
	 'images/button-blue.gif',
	 'images/button-blue-on.gif',
	 'images/menu-bg-off.gif',
	 'images/menu-bg-on.gif',
	 'images/bottomRight-blacktab.gif',
	 'images/bottomRight-bluetab.gif',
	 'images/bottomRight-redtab.gif',
	 'images/btm-black.gif',
	 'images/btm-blue.gif',
	 'images/btm-red.gif',
	 'images/button-bg.gif',
	 'images/img-hdr-logo.gif',
	 'images/logo.gif',
	 'images/button-total-bg.gif',
	 'images/button-listgrey-bg.gif',
	 'images/button-uppdatera-bg.gif'
 );
 
 
/*****  GENERAL FUNCTIONS ******/

function rollOverBottom(value) {
	
	tab_blue = window.document.getElementById('mnuTabBlue');
	tab_red = window.document.getElementById('mnuTabRed');
	tab_black = window.document.getElementById('mnuTabBlack');	
	
	box_blue = window.document.getElementById('boxContentBlue');
	box_red = window.document.getElementById('boxContentRed');
	box_black = window.document.getElementById('boxContentBlack');
	
	switch (value) {
     case 'blue':				
				tab_blue.style.borderBottom = 'solid #08087e 1px';
				tab_red.style.borderBottom = 'solid #ffffff 1px';
				tab_black.style.borderBottom = 'solid #ffffff 1px';
				
				box_blue.style.display = 'block';
				box_red.style.display = 'none';
				box_black.style.display = 'none';
				return false;
		 break;
	
		 case 'red':
				tab_blue.style.borderBottom = 'solid #ffffff 1px';
				tab_red.style.borderBottom = 'solid #c70c0c 1px';
				tab_black.style.borderBottom = 'solid #ffffff 1px';
					
				box_blue.style.display = 'none';
				box_red.style.display = 'block';
				box_black.style.display = 'none';
				return false;
		 break;
		 
		 case 'black':
				tab_blue.style.borderBottom = 'solid #ffffff 1px';
				tab_red.style.borderBottom = 'solid #ffffff 1px';
				tab_black.style.borderBottom = 'solid #000000 1px';
				
				box_blue.style.display = 'none';
				box_red.style.display = 'none';
				box_black.style.display = 'block';
				return false;
		 break;
	}
	
	
}

function ChangePicture(img_path) {
	obj = window.document.getElementById('prodView');
	obj.src = img_path;
}

function switchClass(obj_id, obj_class) {
	
	obj = window.document.getElementById(obj_id);
	
	if ( obj.className == '' ) { obj.className = obj_class; return false; }
	if ( obj.className == obj_class) { obj.className = ''; return false; }	
}