function numbersonly(e)
{
	var unicode=e.charCode? e.charCode : e.keyCode
	if (unicode!=8 && unicode!=46 && unicode!=9){ //if the key isn't the backspace key or dot or tab (which we should allow)
		if (unicode<48||unicode>57){ //if not a number
			return false //disable key press
		}
	}
}
function toggle_submit( checkbox )
{
	if( checkbox.checked ){
		$('submitButton').disabled=false;
	}else{
		$('submitButton').disabled=true;
	}
}
function check_postcode( field )
{
	var myPostCode = field.value;
	if (checkPostCode (myPostCode)) {
		field.value = checkPostCode (myPostCode)
		field.className='';
	}else{
		field.className='error';
	}
}
function check_empty( field )
{
	if( field.value!='' ) {
		field.className='';
	}else{
		field.className='error';
	}
}
function check_email( field )
{
	var x = field.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if( filter.test(x) || field.value=='' ){
		field.className='';
	}else{
		field.className='error';
	}
}
function clear_terms()
{
	if($('agree')){
		$('agree').checked=false
	}
}

//window.onload=clear_terms
