function hidestatus(){
window.status='';
window.status='accept terms';
//alert('hello');
return true
}

		function MM_preloadImages() { //loads the rollover images
			var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
				var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
				if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
		}

		function MM_swapImgRestore() { //replaces rolled over image
			var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
		}

		function MM_findObj(n, d) { //finds an object, for rollover
			var p,i,x;	if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
				d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
			if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
			for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
			if(!x && document.getElementById) x=document.getElementById(n); return x;
		}

		function MM_swapImage() { //swaps an image, for rollover
			var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
			if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
		}

// daves additions

var oldWin= null;
function myNewWindow(str) {
	//alert(str);
	oldWin = window.open(str,"oldName");
	oldWin.focus(); // give focus 
}


function getMainObj(name){
  if (document.getElementById) {
  	this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
  } else if (document.all) {
		this.obj = document.all[name];
		this.style = document.all[name].style;
  } else if (document.layers) {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function showStatusMsg(msg){
	window.status=msg;
	//return true;
}

function toggleFolder(strID){
	var target = new getMainObj(strID);
	if (target.style.display == "none"){
  	target.style.display = "";
  	if (document.images) {
			document["img"+strID].src = eval("openFolder.src");
		}
		/* seems not not fuck up so bad if the reset footer thing is conditional */
		setFooter();

  }else {
  	target.style.display = "none";
  	if (document.images) {
			document["img"+strID].src = eval("closedFolder.src");
		}
  }
 // setFooter();
}

function toggleNews(strID){
	var target = new getMainObj(strID);
	if (target.style.display == "none"){
  	target.style.display = "";

		/* seems not not fuck up so bad if the reset footer thing is conditional */
		setFooter();

  }else {
  	target.style.display = "none";

  }
 // setFooter();
}

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}	else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function setFooter() {
	//alert('setting footer');
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var container_Element = document.getElementById('container');
			var container_Height = container_Element.offsetHeight; // a variable height
			var leftContent_Element = document.getElementById('leftContent');
			var leftContent_Height = leftContent_Element.offsetHeight;
			var rightContent_Element = document.getElementById('rightContent');
			var rightContent_Height = rightContent_Element.offsetHeight;
			var greatest= leftContent_Height;
			//if (rightContent_Height>leftContent_Height)
				//greatest= rightContent_Height;

			if (windowHeight > container_Height) {
				rightContent_Element.style.height= windowHeight- 308;
			}
		}
	}

	var msg='';
	msg+= 'windowHeight='+windowHeight+'\r\n';
	msg+= 'container_Height='+container_Height+'\r\n';
	msg+= 'leftContent_Height='+leftContent_Height+'\r\n';
	msg+= 'rightContent_Height='+rightContent_Height+'\r\n';
	//alert(msg);

}

function hov(loc,cls){
	if(loc.className)
  loc.className=cls;
}

var menu_selection="";
var radio_selection="";

function  checkForm() {
	var myindex=document.forms[0].s2.selectedIndex;
	if (myindex==0) {
		alert("\nYou must select a region from the drop-down menu.");
		document.forms[0].s2.focus();
		return false;
	}	else {
		//menu_selection=document.forms[0].s2.options[myindex].value;
		return true;
	}
}

function  regCheck(f) {
	//alert(f);
	var ok= true;
	var o= document.forms[f];
	getMainObj
	for (var i=1; i <5; i++) {
		if (o.elements['b'+i].checked== true) {
			//alert(1);
		}else{
			//alert(2);
			ok= false
		}
  }
  if (ok) {
  	return true;
  }else{
  	alert('Please check ALL the boxes to confirm that you have read the information.');
  	return false;
  }
}
