// 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(); 
}

// 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 );
}
// toggle div function
function toggleDiv2(_id){
 _oDivStyle=document.getElementById(_id).style;
(_oDivStyle.display=='none')?_oDivStyle.display='block':_oDivStyle.display='none';
} 
function $( id ){
 return document.getElementById( id );
}

function toggleDivArrow( o, id ){
 if( $( id ) ){
  if( $( id ).style.display == 'none' ){
   o.className = '';
  }else{
   o.className = 'active';
  }
 }
}

function nav_over(id)
{
 if(document.getElementById(id).className=='showdiv'){
  document.getElementById(id).className='hidediv';
 }else{
  document.getElementById(id).className='showdiv';
 }

}

document.write( '<style type="text/css">dl dd{ display:none; }</style>' );

//email friend
function EmailLink(){
var sPath = window.location.pathname;
var sPage = sPath.substr(sPath.lastIndexOf('/') + 1);
window.location = "mailto:"+"?subject=Hays plc" + "&body=" + "I thought this link might interest you: http://www.haysplc.com"+sPath;
}

//investor center banners
function findElementById( elementId )
{
	var theElement = null;
	try
	{
		if( document.getElementById )
			theElement = document.getElementById( elementId );
		else
			theElement = document.all[ elementId ];
	}
	catch( e )
	{
		theElement = null;
	}
	return theElement;
}


function showTab(id)
{
	findElementById("ctn_" + id).style.display = "block";
	
}

function hideTab(id)
{
	findElementById("ctn_" + id).style.display = "none";
	
}