 function chkNumeric(strString)

{

     var reg = /[0-9]/;

	 if (reg.test(strString) == true)

	 {

	 return true;

	 }

		 else

	 {

		 return false;

	 }

	}

function validatereg1()

{

var frm = document.frm;

if(frm.companyname.value == 'Name of the Company')

	{
	document.getElementById('companyname').value="Name of the Company";
	document.getElementById('companyname').className='contactPanInerror';	
	frm.companyname.focus();

		return false;
	}

if(frm.phoneno.value == 'Phone No.')

	{
	document.getElementById('phoneno').value="Phone No.";
	document.getElementById('phoneno').className='contactPanInerror';	
		frm.phoneno.focus();
        return false;
	}	

if (chkNumeric(frm.phoneno.value) == false)

	{
	
	document.getElementById('phoneno').value="Phone No.";
	document.getElementById('phoneno').className='contactPanInerror';	
	
		frm.phoneno.focus();

		 return false;

	}		

if(frm.email.value == 'Enter Email')

	{
	document.getElementById('email').value="Enter Email";
	document.getElementById('email').className='contactPanInerror';	

		frm.email.focus();

		return false;

	}	

	 var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;

	 var email = document.frm.email.value;

   if(reg.test(email) == false) {
	   
	document.getElementById('email').value="Enter Email";
	document.getElementById('email').className='contactPanInerror';	
	     return false;

   }
   

 return true;

}

