function valid(){
var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,4})+\.)+([a-zA-Z0-9]{2,4})+$/;
var phoneRe = /^\(\d{2}\)-\d{10}$/;
/*if (document.myform.FirstName.value == ""){
alert("Please enter First Name");
document.myform.FirstName.focus();
return false
		}*/
// /^(\+\d)*\s*(\(\d{3}\)\s*)*\d{3}(-{0,1}|\s{0,1})\d{2}(-{0,1}|\s{0,1})\d{2}$/ /^[0-9]+$/
//alert("hdg");
	if(document.myform.txtname.value == "")
	{
		alert("Contact Name: Required.");
		document.myform.txtname.focus(); 
		return false; 
	}	
	
	


else if(!filter.test(document.getElementById('email').value)) 
	{
		alert('Valid Email: Required. e.g.:test@insync.co.in');
		document.myform.email.focus(); 
		return false;
	}

	
//else if (document.myform.phone.value == "")
	//{
else if(!phoneRe.test(document.getElementById('phone').value)){	
	alert("Phone: Required. e.g. (country code)-phone no.");
	document.myform.phone.focus();
	//isNumberKey(evt);
	return false; 
	}	
		

}

function isNumberKey(evt)
	  {
		 var charCode = (evt.which) ? evt.which : event.keyCode
		 if (charCode > 31 && (charCode < 48 || charCode > 57))
			return false;

		 return true;
	  }
	  
/*	  
	var count=0;
	var addcount=0;
	function add(){
		var i;
		
		for(i=0;i<5;i++){
			var d = 'domainx'+(i+2);
			if(document.getElementById(d).className=='no-display' || document.getElementById(d).className=='textbox1'){
				document.getElementById(d).className='';
				count++;
				break;
			}
		}
		addcount++;
		if((count==5) && (addcount>5)){ 
			addcount=6;
			alert('Sorry, You can not apply more than 6 domains at a time.');
		}
		
		return 0;
	}
	
	function remove(domain){
		document.getElementById(domain).className='no-display';
		count--;
		if(addcount==6){
			addcount -=2;
		} else{
			addcount--;
		}
		
		return 0;
	}*/
