function showLink(link){
 window.status = link;
 hyperlink = link;
 
}
 
function goLink(){
 if (hyperlink.length != 0){
  location.href=hyperlink;
 }
}
 

function jumpTo(formoption){
 location.href = formoption;
}
 
function AddToFaves_hp(){
 var is_4up = parseInt(navigator.appVersion);
 var is_mac   = navigator.userAgent.toLowerCase().indexOf("mac")!=-1;
 var is_ie   = navigator.userAgent.toLowerCase().indexOf("msie")!=-1;
 var thePage = location.href;
 if (thePage.lastIndexOf('#')!=-1)
  thePage = thePage.substring(0,thePage.lastIndexOf('#'));
 if (is_ie && is_4up && !is_mac) 
  window.external.AddFavorite(thePage,"PHSO Internet Site");
 else if (is_ie || document.images)
  booker_hp = window.open(thePage,'booker_','menubar,width=325,height=100,left=140,top=60');
 //booker_hp.focus();
 }


// ****************************************************

var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)
var swapPointer = "no";
var swapSRPointer = "no";
 
if (document.getElementById){
	document.write('<style type="text/css">')
	document.write('.switchcontent{display:none;}')
	document.write('</style>')
}

function getElementbyClass(classname){
	ccollect=new Array()
	var inc=0
	var alltags=document.all? document.all : document.getElementsByTagName("*")
	for (i=0; i<alltags.length; i++){
		if (alltags[i].className==classname)
		ccollect[inc++]=alltags[i]
	}
}

function contractcontent(omit){
	var inc=0
	while (ccollect[inc]){
		if (ccollect[inc].id!=omit)
			ccollect[inc].style.display="none"
		inc++
	}
}

function expandcontent(cid){
	if (typeof ccollect!="undefined"){
		if (collapseprevious=="yes")
			contractcontent(cid)
		document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
	}
	if ( swapPointer == "yes" )
		swapPointer = "no";
	else 
		swapPointer = "yes";

	if ( swapSRPointer == "yes" )
		swapSRPointer = "no";
	else 
		swapSRPointer = "yes";
}

function do_onload(){
	getElementbyClass("switchcontent")
}

if (window.addEventListener)
	window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
	window.attachEvent("onload", do_onload)
else if (document.getElementById)
	window.onload=do_onload
