
function fnTrapCR(e,n){
	if(document.getElementById){
		var o=document.getElementById(n);
		if((o!=null)&&(e.keyCode==13)){
			e.returnValue=false;
			e.cancel=true;
			o.click();
		}
	}
}

isValidEmail = function( email )
{ 
	var valid = email.search( /^[^@]+@([-a-zA-Z0-9]+\.)+[-a-zA-Z0-9]{2,5}/ );
	if( valid == 0 )
	{
		return true;
	}
	else
	{
		return false;
	}
}

String.prototype.trim = function () {
	return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');    
}


