function frmValidation(myForm){
	if(myForm.fname.value==""){
		alert("Enter Your First Name");
		myForm.fname.focus();
		return false;
	}else if(myForm.lname.value==""){
		alert("Enter Your Last Name");
		myForm.lname.focus();
		return false;
	}else if(myForm.email.value=="" || myForm.email.value==null){
		alert("Enter Your Email Address");
		myForm.email.focus();
		return false;
	}else if(myForm.feed.value==""){
		alert("Please Enter Your Feedback");
		myForm.feed.focus();
		return false;
	}else if(myForm.comment.value==""){
		alert("Please give suggestions for assistance");
		myForm.comment.focus();
		return false;
	}
	return true;
}

function numeric_check(){
	if(event.keyCode<48 || event.keyCode>57) 
		return event.returnValue=false;
}

function char_check(){
	if((event.keyCode<65 || event.keyCode>90) && (event.keyCode<97 || event.keyCode>122) && (event.keyCode!=32))
		return event.returnValue=false;
}

function echeck(str,myForm){
	var at="@";
	var dot=".";
	var lat=str.indexOf(at);
	var lstr=str.length;
	var ldot=str.indexOf(dot);
	if (str.indexOf(at)==-1){
	   alert("Invalid E-mail ID");
	   myForm.email.focus();
	   return false;
	}else if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   alert("E-mail ID must have @");
		myForm.email.focus();
	   return false;
	}else if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		alert("Invalid E-mail ID");
		myForm.email.focus();
		return false;
	}else if (str.indexOf(at,(lat+1))!=-1){
		alert("Invalid E-mail ID");
		myForm.email.focus();
		return false;
	}else if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		alert("Invalid E-mail ID");
		myForm.email.focus();
		return false;
	}else if (str.indexOf(dot,(lat+2))==-1){
		alert("Invalid E-mail ID");
		myForm.email.focus();
		return false;
	}else if (str.indexOf(" ")!=-1){
		alert("Invalid E-mail ID");
		myForm.email.focus();
		return false;
	}
    return true;					
}

