function chkForNonEmptyFields(FrmName){
	if(document.forms['cntform'].activity_type.value==""){
		alert("Please enter activity type!");
		document.forms['cntform'].activity_type.focus();
		return false;
	}
	if(document.forms['cntform'].activity_date.value==""){
		alert("Please enter activity date!");
		document.forms['cntform'].activity_date.focus();
		return false;
	}
	if(document.forms['cntform'].full_name.value==""){
		alert("Please enter your full name!");
		document.forms['cntform'].full_name.focus();
		return false;
	}
	if(document.forms['cntform'].tel.value==""){
		alert("Please enter your telephone!");
		document.forms['cntform'].tel.focus();
		return false;
	}
	if(document.forms['cntform'].city.value==""){
		alert("Please enter your city!");
		document.forms['cntform'].city.focus();
		return false;
	}
		
	if(document.forms['cntform'].email.value!=""){
		var tmpresult=1
		myString=document.forms['cntform'].email.value
		myArray = myString.split("@")
		if(myArray.length!=2||myArray[0]==''||myArray[1]==''||myArray[1].indexOf(".")==-1) tmpresult=0
		if(myString.indexOf(" ")!=-1) tmpresult=0
		if(myString.indexOf(",")!=-1) tmpresult=0
		if(myString.indexOf("!")!=-1) tmpresult=0
		if(myString.indexOf("'")!=-1) tmpresult=0
		if(myString.indexOf("#")!=-1) tmpresult=0
		if(myString.indexOf("%")!=-1) tmpresult=0
		if(myString.indexOf(":")!=-1) tmpresult=0
		if(myString.indexOf(";")!=-1) tmpresult=0
		if(myString.indexOf("?")!=-1) tmpresult=0
		if(myString.indexOf("/")!=-1) tmpresult=0
		if(myString.indexOf("\\")!=-1) tmpresult=0
		if(myString.indexOf("=")!=-1) tmpresult=0
		if(myString.indexOf("+")!=-1) tmpresult=0
		
		if(tmpresult==0){
		alert('Please enter a valid e-mail!');
			document.forms['cntform'].email.focus();
		return false;
		}
	}
	/*if(document.forms['cntform'].comments.value==""){
		alert("Please enter Comments!");
		document.forms['cntform'].comments.focus();
		return false;
	}*/
	return true;
}
function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}