// preload navigation images:
function preloadImages() {
	
	about_on.src = "/images/nav/about_on.gif";
	about_off.src = "/images/nav/about_off.gif";
		
	care_on.src = "/images/nav/care_on.gif";
	care_off.src = "/images/nav/care_off.gif";
			
	support_on.src = "/images/nav/support_on.gif";
	support_off.src = "/images/nav/support_off.gif";
				
	newsevents_on.src = "/images/nav/newsevents_on.gif";
	newsevents_off.src = "/images/nav/newsevents_off.gif";
					
	golf_on.src = "/images/nav/golf_on.gif";
	golf_off.src = "/images/nav/golf_off.gif";
	
	contact_on.src = "/images/nav/contact_on.gif";
	contact_off.src = "/images/nav/contact_off.gif";
	
}

	if (document.images) {
   
   about_on = new Image();
   about_on.src = "/images/nav/about_on.gif";
   about_off = new Image();
   about_off.src = "/images/nav/about_off.gif";
      
   care_on = new Image();
   care_on.src = "/images/nav/care_on.gif";
   care_off = new Image();
   care_off.src = "/images/nav/care_off.gif";
   
   support_on = new Image();
   support_on.src = "/images/nav/support_on.gif";
   support_off = new Image();
   support_off.src = "/images/nav/support_off.gif";
   
   newsevents_on = new Image();
   newsevents_on.src = "/images/nav/newsevents_on.gif";
   newsevents_off = new Image();
   newsevents_off.src = "/images/nav/newsevents_off.gif";
   
   golf_on = new Image();
   golf_on.src = "/images/nav/golf_on.gif";
   golf_off = new Image();
   golf_off.src = "/images/nav/golf_off.gif";
   
   contact_on = new Image();
   contact_on.src = "/images/nav/contact_on.gif";
   contact_off = new Image();
   contact_off.src = "/images/nav/contact_off.gif";


	} 


function swapImage(imgName,newImage) {
   if (document.images) {
      eval('document.' + imgName + '.src = ' + newImage + '.src');
   }
}


function init(){

isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;

	
		if (isNS4){
		   layerRef = "document.layers";
		   styleSwitch="";
		}
		else if (isIE4) {
		   layerRef = "document.all";
		   styleSwitch=".style";
		}
		else if (isIE5 || isNS6) {
		   layerRef = "document.getElementById";
		   styleSwitch=".style";
		}		

		//wipeLeft('loadingBG');
		//hideLayer('header');
		//hideLayer('msg');
temp=0;
	}


//GENERAL FUNCTIONS
	function showLayer(layerName){

		clearTimeout(temp);

		var a = showLayer.arguments;
		for (i=0; i<a.length; i++) {
		
		//alert(layerRef+'("'+a[i]+'")'+'.style.visibility="visible"');
			if (isIE5 || isNS6) {
	   		eval(layerRef+'("'+a[i]+'")'+styleSwitch+'.visibility="visible"');
			}else{
			eval(layerRef+'["'+a[i]+'"]'+styleSwitch+'.visibility="visible"');
			}
		}

		temp=setTimeout('hideLayer("'+layerName+'")',3000);
	}
	

	function hideLayer(){
		var a = hideLayer.arguments;
		//alert(hideLayer.arguments);
  		for (i=0; i<a.length; i++) {
    	//alert(a[i]);
			if (isIE5 || isNS6) {
	   		eval(layerRef+'("'+a[i]+'")'+styleSwitch+'.visibility="hidden"');
			} else{
			eval(layerRef+'["'+a[i]+'"]'+styleSwitch+'.visibility="hidden"');
			}
		}
	}