function toggle_bod(id)
{
	var ele = document.getElementById(id);
	var ele_a = document.getElementById("a_"+id);
	var ele_div = document.getElementById("div_"+id);
	//alert(ele);
	if(ele)
	{
		
		if(ele.className=="details")
		{
			ele.className = "details_show";
			ele_a.innerHTML = '<span class="close">Close</span>';
			ele_div.style.backgroundColor = "#F8FAE5";

		}
		else
		{
			ele.className = "details";
			ele_a.innerHTML = '<img src="/wmh/images/plus-open.gif" alt="Click here to expand" width="11" height="11" />';
			//ele_div.className = "white";
			ele_div.style.backgroundColor = "#FFFFFF";
		}
	
	}
	
}


function WindowPrint(){
	window.print();
}


// bookmark function
var urlAddress = self.location.href;
var pageName = document.title;

 function addToFavorites()
 {
  if (window.external)
  {
   window.external.AddFavorite(urlAddress,pageName)
  }
  else
  { 
   alert("Sorry! Your browser doesn't support this function.");
  }
 }
function addBookmark(){
	if(window.sidebar){ // Firefox
		window.sidebar.addPanel(pageName, urlAddress,'');
	}
	else if(window.opera){ //Opera
		var a = document.createElement("A");
		a.rel = "sidebar";
		a.target = "_search";
		a.title = pageName;
		a.href = urlAddress;
		a.click();
	}
	else if(document.all){ //IE
		window.external.AddFavorite(urlAddress, pageName);
	}
	else
	{ 
		alert("You need to press Ctrl+D to bookmark our website.");
	}

}




// toggle div function
function toggleDiv(_id){
 _oDivStyle=document.getElementById(_id).style;
(_oDivStyle.display=='block')?_oDivStyle.display='none':_oDivStyle.display='block';
} 

function $( id ){
 return document.getElementById( id );
}

function toggleDivArrow( o, id ){
 if( $( id ) ){
  if( $( id ).style.display == 'none' ){
   o.className = '';
  }else{
   o.className = 'active';
  }
 }
}

function toggleDivBorder( id, o, tag ){
 var oDivStyle = document.getElementById( id ).style;
 var node = o;
 var found = false;
 for( var i = 0 ; i < 10 ; i++ ){
  node = node.parentNode;
  if( node.tagName.toString().toLowerCase() == tag ){
   found = true;
   break;
  }
 }
 if( oDivStyle.display == 'block' ){
  oDivStyle.display = 'none';
  if( found ){
   node.className = 'off';
  }
 }else{
  oDivStyle.display = 'block';
  if( found ){
   node.className = 'on';
  }
 }
}

// popup windows 
var newWin = null; 
function popUp(strURL, strType, strHeight, strWidth) { 
 if (newWin != null && !newWin.closed) 
   newWin.close(); 
 var strOptions=""; 
 if (strType=="console") 
   strOptions="resizable,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="fixed") 
   strOptions="status,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="fixedscroll") 
   strOptions="status,scrollbars,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="elastic") 
   strOptions="toolbar,menubar,scrollbars,"+ 
     "resizable,location,height="+ 
     strHeight+",width="+strWidth;
 if (strType=="elasticmenu") 
   strOptions="menubar,scrollbars,"+ 
     "resizable,height="+ 
     strHeight+",width="+strWidth; 
 newWin = window.open(strURL, 'newWin', strOptions); 
 newWin.focus(); 
}


