// JavaScript Document
<!--
	function checkMail(str){
		var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(str))
			return true;
		else
			return false;
	}

	function checkPhone(str){
		var ts = str.replace(" ","");
		if(ts.length < 11)
			return false;
		else
			return true;
	}

	function checkCallBackMethod(id){
		
	}
	
	function checkCallBack(controlId){
		// accepts the form as an arg. Does basic field validation and focuses on first failing field.		
		var i=0;
		var msg = "Please make the following change(s):";
		var fcs = "";
		
		if($(controlId + "_txtContactName").value == ""){
			i++;
			msg += "\n"+i+") Please enter a contact name.";
			fcs = $(controlId + "_txtContactName");
		}
		
		if( ($(controlId + "_txtContactTel").value == "") || (!checkPhone($(controlId + "_txtContactTel").value)) ){
			i++;
			msg += "\n"+i+") Please enter a valid telephone number, including your std code.";
			if(fcs == "")
				fcs = $(controlId + "_txtContactTel");
		}

		if(i != 0){
			alert(msg);
			fcs.focus();
			return false;
		}else{
			return true;
		}
	}
//-->

