<!--//--><![CDATA[//><!--			  
function validate_email ( field, alerttxt ) {
	with ( field ) {
  		apos=value.indexOf("@");
  		dotpos=value.lastIndexOf(".");
  		if ( apos<1 || dotpos-apos <2 ) {alert(alerttxt); return false;}
  		else {return true;}
  	}
}

function validate_required ( field, alerttxt, defaultvalue ) {
	if ( !defaultvalue ) { defaultvalue=""; }
	with ( field ) {
		if ( value==null || value=="" || value==defaultvalue ) { alert(alerttxt); return false; }
		else { return true } 
	}
}

function validate_phone_number ( field, alerttxt, defaultvalue ) {
	var numericExpression = /^[-\d\s\.\(\)]+$/ ;
	// var numericExpression = /^[0-9]{5,20}$/ ;
	if ( !defaultvalue ) { defaultvalue=""; }
	with ( field ) {
		if ( value.match(numericExpression) || value==null || value=="" || value==defaultvalue ) { return true; }
		else { alert(alerttxt); return false; }
	}
}
function validate_postal_code ( field, alerttxt, defaultvalue ) {
	var numericExpression = /^[-\d\s]+$/ ;
	// var numericExpression = /^[0-9]{5,20}$/ ;
	if ( !defaultvalue ) { defaultvalue=""; }
	with ( field ) {
		if ( value.match(numericExpression) || value==null || value=="" || value==defaultvalue ) { return true; }
		else { alert(alerttxt); return false; }
	}
}
//--><!]]>
