

// ********************************************PostCode Finder START
function checkpostcode(fn, formfield, returnto){
	var formname = fn.name
	var suburb = eval("document."+formname+"."+formfield+".value")
	
	if (suburb == ""){
		alert("Please enter your suburb.")		
		eval("document."+formname+"."+formfield+".style.backgroundColor = \"#bde0f8\"")
		eval("document."+formname+"."+formfield+".focus()")
		return false;
	}else{
		eval("document."+formname+"."+formfield+".style.backgroundColor = \"#ffffff\"")
		var postpage = "postcodechecker.asp?suburb="+suburb+"&fn="+formname+"&returnto="+returnto
		MP_openBrWindow(postpage,"postcodecheck","scrollbars=yes, width=330, height=200, resizable=yes", "300", "300")
	}
}



function insertpostcode(pc, fname, returncode){
	eval("document."+fname+"."+returncode+".value = "+pc)
}



function MP_openBrWindow(theURL,winName,features, wid, hei) {//v2.0 modified
	LeftPosition = (screen.width) ? (screen.width-wid)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-hei)/2 : 0; 
	featuresAll = features + ',top ='+TopPosition+',left='+LeftPosition
	  window.open(theURL,winName,featuresAll);
}

// ********************************************PostCode Finder END





function formCallback(result, form) {
	//	alert(form+":"+result)
		//window.status = "valiation callback for form '" + form.id + "': result = " + result;
	}
	
var valid

function set_form_validation(formid){
	//alert("LOAD"+formid)
	valid = new Validation(formid, { immediate : true, onFormValidate : formCallback});
	}
	
function reset_form_validation(){
	
valid.reset();
	
}





function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

