
function isBlank(s){
	for(var i=0; i<s.length; i++){
		var c=s.charAt(i);
		if ((c!=' ')&&(c!='\n')&&(c!='\t')) 
			return false;
	}
	return true;
}

function frmValidate()
{
	if ( isBlank(document.trivedi.name.value) ){
		alert('Please Enter your Name ..');
		document.trivedi.name.focus();
		return false;
	}		
	if ( isBlank(document.trivedi.country.value) ){
		alert('Please Enter Country ..');
		document.trivedi.country.focus();
		return false;
	}		
	if ( isBlank(document.trivedi.email.value) ){
		alert('Please Enter Email ..');
		document.trivedi.email.focus();
		return false;
	}		
	if ( isBlank(document.trivedi.lookfor.value) ){
		alert('Please Enter your Looking for ..');
		document.trivedi.lookfor.focus();
		return false;
	}
	return true;
}
function isEmail(string){
		if(string.search(/^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/)!=-1)
			return true;
		else
			return false;
}
function chkeMail(){
	if(document.trivedi.email.value!="")
		{
		if(isEmail(document.trivedi.email.value)==false)
			{
				alert("Please enter Correct Email Address.");
				document.trivedi.email.focus() 
				return false;
			}
		}
}
function isPin(sss){
	piin = sss;
	coount = piin.length;
	for(i=0;i<coount;i++){
		var kk = piin.charCodeAt(i);
		if( kk < 48 || kk > 57){
			return true;
		}
	}
	return false;
}  

