// JavaScript Document

	function Highlight(ctrl)
		{ctrl.select();}
		
	function isEmpty(elem, helperMsg){
		if(elem.value.length == 0){
			alert(helperMsg);
			elem.focus(); // set the focus to this input
			Highlight(elem);
			return false;
		}
		return true;
	}
	
	function isNumeric(elem, helperMsg){
		var numericExpression = /^\+?[0-9 ()-]+[0-9]$/
		if(elem.value.match(numericExpression)){
			return true;
		}else{
			alert(helperMsg);
			elem.focus();
			Highlight(elem);
			return false;
		}
	}
	
	function emailValidator(elem, helperMsg){
		var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
		if(elem.value.match(emailExp)){
			return true;
		}else{
			alert(helperMsg);
			elem.focus();
			Highlight(elem);
			return false;
		}
	}
