function ShowHide(object,hideothers){
	if(hideothers >0){
		//alert(hideothers);
		for(x=1; x < hideothers; x++){
			temp=hide('section'+x);
		}
	
	
	}
	
	
	
	if(document.getElementById(object).style.display == 'block'){
		hide(object);
	}else{
		show(object);
		//set bgcolor
		document.getElementById(object).style.backgroundColor='#006600';
	}


}


	 var cwin = null;
	 function openWin(theUrl, name, width, height, tools) {
	   cwin = window.open('', name,
	  tools+'width=' + width + ',height='+height);
	  if (cwin != null) {
	   if (cwin.opener == null)
	    cwin.opener = self;
	   cwin.location.href= theUrl;
	
	    cwin.focus();
	  }
	 }
	 function closeWin(theWin) {
	  theWin.close();
	 }


function show(object) 
  {
  if(navigator.vendor && navigator.vendor.indexOf("Apple") >=0){
  document.getElementById(object).style.display = 'inline-block';
  }else{
  document.getElementById(object).style.display = 'block';
  }
   
   document.getElementById(object).style.visibility = 'visible';
 
  }
           
 function hide(object) 
  {
  
   document.getElementById(object).style.display = 'none';
   document.getElementById(object).style.visibility = 'hidden';

  }


function ShowDn(num,nav,button,withwidget){
//alert(withwidget);
document.images[button].src=eval(nav+'_button_dn['+num+'].src');
if(withwidget !== ''){
//alert('fff'+withwidget+'ff');
	//document.images['widget0'].src= widget_dn[withwidget].src;
	document.images['widget' + num].src = widget_dn[withwidget].src;
}

}
function ShowUp(num,nav,button,withwidget){
document.images[button].src=eval(nav+'_button_up['+num+'].src');
if(withwidget  !== ''){
	document.images['widget' + num].src = widget_up[withwidget].src;
}
}

function ShowSub(menuid,status){
	if(document.getElementById(menuid)){
		nav_list = new Array('visitwhitefish','community');
		
		//hides all navs then shows the current one
		for(x=0;x < nav_list.length ;x++){
		
			if(document.getElementById(nav_list[x]+'nav')){
				subnav = document.getElementById(nav_list[x]+'nav');
				subnav.style.display='none';
			
			}
		}
		
				if(document.getElementById)
				{
					menu=document.getElementById(menuid);
					menu.style.display=(status)?'block':'none';
					menu.style.visibility=(status)?'visible':'hidden';
				}
		
		
	}
}


function ServiceItemChange(id,num,bgcolor,color){
if(document.getElementById(id)){
	//alert(document.getElementById(id+'a'));
	if(num){
		document.getElementById(id).style.backgroundColor=bgcolor;
			 document.getElementById(id).style.cursor = 'hand';
		if(document.getElementById(id+"a")){
			document.getElementById(id+"a").style.backgroundColor=bgcolor;
		 }
	
	}else{
		document.getElementById(id).style.backgroundColor=color;
			 document.getElementById(id).style.cursor = 'none';
		if(document.getElementById(id+"a")){
			document.getElementById(id+"a").style.backgroundColor=color;
		}
	
	}
	
}
}

function CalcPos(ishome){
nav_list = new Array('visitwhitefish','community','adventure','chamber');


	for(x=0;x < nav_list.length ;x++){
	
		//calculate the position of the subnavs
		subnav = document.getElementById(nav_list[x]+'nav');
		thespan = document.getElementById(nav_list[x]+'span');
	
	
	if(nav_list[x] == 'community' || nav_list[x] == 'chamber'){
		subnav.style.left=thespan.offsetLeft - 147;
		//objectdump(positioner);
	}else{
		subnav.style.left=thespan.offsetLeft-4;
	
	}
	
	if(ishome){
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.appVersion.indexOf("Win") != -1) ){
			subnav.style.top=thespan.offsetTop+1;
		}else if(navigator.vendor.indexOf("Apple") >=0){
			subnav.style.top=thespan.offsetTop+10;
		}else{
			subnav.style.top=thespan.offsetTop-20;
		}
	}
//subnav.style.top=thespan.style.top;

}



}
