function validateintegers(id,message,lbl)
	 {
			var alp = "1234567890";
			for (var i=0;i<id.value.length;i++)
				{
					temp=id.value.substring(i,i+1);
					if (alp.indexOf(temp)==-1)
						{
							var resstr="&nbsp;&nbsp;Invalid "+message+" ( [0-9] allowed )";
							lbl.innerHTML = resstr;
							id.value='';
							//id.style.background=backgroundcolor;
							id.focus();
							return false;
						}
				}
			//id.style.background="";
			lbl.innerHTML="";
			return true;
		}
function checkTextEmpty(id,message,lbl)
	{
		if(id.value=="")
			{
				//alert("in")
				lbl.innerHTML=message + " is Required";
				id.focus();
				//id.style.background=backgroundcolor;
				return false;
			}
		//id.style.background="";
		lbl.innerHTML="";
		return true;
		
	}
	
	function validateEmail(id,message,lbl)
	{
		str1=id.value.charAt(0);
		var emailRegEx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if(str1 == '.' || str1 == '_')
			{
				resstr="Email id should start with alphaNumeric";
				lbl.innerHTML = resstr;
				id.value='';
				//id.style.background=backgroundcolor;
				id.focus();
				return 0;
			}
		if(id.value.match(emailRegEx))
			{
				//id.style.background="";
				//lbl.innerHTML="Invalid Email";
				return true;
			}
		else
			{
				lbl.innerHTML="Invalid Email";
				id.focus();
				//id.style.background=backgroundcolor;
				return false;
			}
	}
	
	function pincode_length(str,message,count,lbl)
	{
		k = str.value;
		if((str.value.length < count) || (str.value.length > count) )
			{
				lbl.innerHTML = message ;
				str.value='';
				//str.style.background=backgroundcolor;
				str.focus();
				return false;
			}		
		//str.style.background="";
		lbl.innerHTML ="";
		return true;
	}
	function pincodestartdigit(id,message,lbl)
	{
		var num=id.value;
		if(num.charAt(0)!="5")
		{
			lbl.innerHTML = message;
			//id.style.background=backgroundcolor;
			id.focus();
			return false;
		}
		//id.style.background="";
		lbl.innerHTML="";
		return true;
	}
	function ValidText(id,message,lbl)
	{
		var re=/^[a-zA-Z ]+$/;
		if(!re.test(id.value))
		{var resstr=message+"should contain only alphabets";
		lbl.innerHTML = resstr;
		//id.value='';
		//id.style.background=backgroundcolor;
		id.focus();
		return false;
				
		}
		lbl.innerHTML="";
		//id.style.background="";
		return true;
	}
	
function minimum_length1(id,output,minlen,maxlen,lbl)
{
	k = id.value;
	if( (k.length >= minlen) && (k.length <= maxlen))
		{
		lbl.innerHTML="";
		return true;	
		}	
	
	else
	{
		lbl.innerHTML = output;
		id.focus();
		return false;
	}
}
function checkSelEmpty(id,message,lbl)
{
	if (id.value == "" || id.value == '0')
	{
		lbl.innerHTML="Please select " + message;
		id.focus();
		return false;
	}
	lbl.innerHTML="";
	return true;
	
}
function check()
{
if(validateEmail(email,"Invalid Email Address"))
	{
	form_name.submit();
	}
	else
	{
		return false;
	}
}
