
						function chk()
						{
						  
							var frm = document.cantact_frm;
							if(frm.name.value=="")
							{
							  document.getElementById('err').style.visibility="visible";
							  frm.name.focus();
							  return false;
							
							}
							if(frm.email.value=="")
							{
							  document.getElementById('err2').style.visibility="visible";
							  frm.email.focus();
							  return false;
							
							}
							
							if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm.email.value)==false)
							{
							  document.getElementById('err2').style.visibility="visible";
							  frm.email.focus();
							  return false;
							
							}
							if(frm.contactno.value=="")
							{
							  document.getElementById('err3').style.visibility="visible";
							  frm.contactno.focus();
							  return false;
							
							}
							
							if(allNumber(frm.contactno.value)==false)
							{
							document.getElementById('err3').style.visibility="visible";
							  frm.contactno.focus();
							  return false;
							}
							if(frm.message.value=="")
							{
							  document.getElementById('err4').style.visibility="visible";
							  frm.message.focus();
							  return false;
							
							}
							
						 }
						function visible()
							{ 
							  if(document.cantact_frm.name.value=="")
								{ 
							     document.getElementById('err').style.visibility="visible";
								}
								else if(document.cantact_frm.name.value!="")
								{
									 document.getElementById('err').style.visibility="hidden";
								}
							}
							function visible2()
							{ 
							   if(document.cantact_frm.email.value=="")
								{
							      document.getElementById('err2').style.visibility="visible";
								}
								else if(document.cantact_frm.email.value!="")
								{
									 document.getElementById('err2').style.visibility="hidden";
								}
							}
							function visible3()
							{
							   if(document.cantact_frm.contactno.value=="")
								{
							      document.getElementById('err3').style.visibility="visible";
								}
								else if(document.cantact_frm.contactno.value!="")
								{ 
								
								  if(allNumber(document.cantact_frm.contactno.value)==false)
									{
									document.getElementById('err3').style.visibility="visible";
									 
									}
									else
									{
									 document.getElementById('err3').style.visibility="hidden";
									}
								}
							}
						   function visible4()
							{
							if(document.cantact_frm.message.value=="")
								{
							  document.getElementById('err4').style.visibility="visible";
								}
								else if(document.cantact_frm.message.value!="")
								{
									 document.getElementById('err4').style.visibility="hidden";
								}
							}


                     

function allNumber(objValue)
{

		var set="0123456789."
		var tmp
		var size = (objValue.length)
		
		for (var i=0;i<size;i++)
		{
			tmp=objValue.substring(i,i+1)
			if (set.indexOf(tmp)==-1)
			{
				return false
			}
			else
			{ 	
			return true
		    }
		}
		
}
						