function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function showFlood(zone) {

		var menuURL = '/weather/flood.php?zone=' + zone;
		var menuWin = window.open(menuURL,"Menu",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=200,height=400');
		if(navigator.appName.substring(0,8)=="Netscape") {
			menuWin.location = menuURL;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4)
			menuWin.focus();

	}

function showRegions() {

		var menuURL = '/weather/regionMap.php';
		var menuWin = window.open(menuURL,"Menu",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=180,height=315');
		if(navigator.appName.substring(0,8)=="Netscape") {
			menuWin.location = menuURL;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4)
			menuWin.focus();

	}

function validateFarmers(){

	if(document.farmerForm.Farmname.value){

		if(!document.farmerForm.IFarmCattle.checked && !document.farmerForm.IFarmSheep.checked && !document.farmerForm.IFarmPigs.checked){

		alert('Please tell us whether you farm Cattle, Sheep or Pigs (or a combination)');
		return false;

		}

		if(document.farmerForm.IFarmCattle.checked && !document.farmerForm.IFarmThisManyCattle.value){

		alert('Please tell us approximately how many cattle you farm');
		return false;

		}

		if(document.farmerForm.IFarmSheep.checked && !document.farmerForm.IFarmThisManySheep.value){

		alert('Please tell us approximately how many sheep you farm');
		return false;

		}

		if(document.farmerForm.IFarmPigs.checked && !document.farmerForm.IFarmThisManyPigs.value){

		alert('Please tell us approximately how many pigs you farm');
		return false;

		}

	}

	return true;

}

function checkContactForm(){

	if(!document.contactForm.email.value){
		alert('Please enter your email address so that we can respond to your feedback');
		return false;
	}

	if(!document.contactForm.feedback.value){
		alert('Please enter your feedback before submitting the form');
		return false;
	}

	return true;

}