// JavaScript Document

function validateEmail(email){
	
	var emailRegEx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	str = document.getElementById(email).value;
	
	if(str.match(emailRegEx)){
		return true;
		}
	else{
		alert('Please enter a valid email address!');
		return false;
	}
}
	function validate()
	{
		var msg = "";				
		if(document.getElementById("txtname").value=="")
		{
			msg += "- Name Required\n"
		}	
		if(document.getElementById("txtCompanyName").value=="")
		{
			msg += "- Company Name Required\n"
		}			
		if(document.getElementById("txtEmail").value=="")
		{
			msg += "- Email Required\n"
		}				
		if(document.getElementById("txtPhone").value=="")
		{
			msg += "- Phone Required\n"
		}	
		if(msg.length>0 )
		{
			alert(msg);
			return false;
		}
		if(validateEmail('txtEmail')==false)
		{
		
		return false;
		}
	
		else
		{
			return true;
		}	
	}
	function valide_email()
	{					
		if(validateEmail('signup')==false)
		{
		
		return false;
		}
	
		else
		{
			return true;
		}

	}
