function submitform(Form)
{
	if((Form.name.value=="")||(Form.name.value=="Name"))
	{
		alert("Kindly fill in your Name!");
		Form.name.focus();
		return false;
	}
	else if(containsdigit(Form.name.value)==true)
	{
		alert("Name should not contain numbers!");
		Form.name.focus();
		return false;
	}
	else if(specialchar(Form.name.value)==true)
	{
		alert("Name should not contain special characters!")
		Form.name.focus();
		return false;
	}

	else if((Form.mobile.value=='')||(Form.mobile.value=='Mobile No.')||(Form.mobile.value.length<10))
	{
	alert("Kindly fill in your 10 digit Mobile Number (Numeric Only)!");
	Form.mobile.focus();
	return false;
	}
	else if(containsalph(Form.mobile.value)==true)
	{
	alert("Mobile Number contains characters!");
	Form.mobile.focus();
	return false;
	}
	else if((Form.mobile.value!=9) && (foundstdcode(Form.mobile.value)==false))
	{
	alert("Kindly fill in your correct Mobile no (Starting from 9)");
	Form.mobile.select();
	return false;
	}
	
	else if((Form.comments.value=="")||(Form.comments.value=="comments"))
	{
		alert("Kindly fill in your comments!");
		Form.comments.focus();
		return false;
	}
	/*else if(containsdigit(Form.comments.value)==true)
	{
		alert("comments should not contain numbers!");
		Form.comments.focus();
		return false;
	}
	else if(specialchar(Form.comments.value)==true)
	{
		alert("comments should not contain special characters!")
		Form.comments.focus();
		return false;
	}*/
	else {
		Form.submit();
		}
}
function foundstdcode(param)
{temp = new String(param);phone = temp.substr(0,1);
if(phone==9) // || phone==9)
{return true;}
else{return false;
}
}
function containsdigit(param)
{
mystrLen = param.length;
for(i=0;i<mystrLen;i++)
{
if((param.charAt(i)=="0") || (param.charAt(i)=="1") || (param.charAt(i)=="2") || (param.charAt(i)=="3") || (param.charAt(i)=="4") || (param.charAt(i)=="5") || (param.charAt(i)=="6") || (param.charAt(i)=="7") || (param.charAt(i)=="8") || (param.charAt(i)=="9"))
{
return true;
}
}
return false;
}
function specialchar(param)
{
mystrLen = param.length;
for(i=0;i<mystrLen;i++)
{
if((param.charAt(i)==".") || (param.charAt(i)=="'")||(param.charAt(i)=="/")||(param.charAt(i)=="*")||(param.charAt(i)=="#")||(param.charAt(i)=="$")||(param.charAt(i)=="%")||(param.charAt(i)=="@")||(param.charAt(i)=="!"))
{return true;}
}return false;}

function validateemailv2(email)
{
// a very simple email validation checking.
// you can add more complex email checking if it helps
var splitted = email.match("^(.+)@(.+)$");
if(splitted == null) return false;
if(splitted[1] != null )
{
var regexp_user=/^\"?[\w-_\.]*\"?$/;
if(splitted[1].match(regexp_user) == null) return false;
}
if(splitted[2] != null)
{
var regexp_domain=/^[\w-\.]*\.[a-za-z]{2,4}$/;
if(splitted[2].match(regexp_domain) == null)
{
var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
if(splitted[2].match(regexp_ip) == null) return false;
}
return true;
}
return false;
}
function containsalph(param)
{
mystrLen = param.length;
for(i=0;i<mystrLen;i++)
{
if((param.charAt(i)<"0")||(param.charAt(i)>"9"))
{
return true;
}
}
return false;
}
function Trim(strValue) {
var j=strValue.length-1;i=0;
while(strValue.charAt(i++)==' ');
while(strValue.charAt(j--)==' ');
return strValue.substr(--i,++j-i+1);
}
function cleanup(fname)
{
	document.frmsubmit.elements[fname].value="";
}
function recover(fname,value1)
{
	if(document.frmsubmit.elements[fname].value=="")
	{
		document.frmsubmit.elements[fname].value=value1;
	}
}




