function validation1(frm1)
{
	
	 if(!CheckEmpty(document.frm.name.value,"You did not give us your name"))
	{
		document.frm.name.focus();
		return false;
	}
	 if(!CheckEmpty(document.frm.email.value,"Please enter your email Address"))
	{
		document.frm.email.focus();
		return false;
	}
	if(!CheckEmailAddr(document.frm.email.value))
		{
			alert("Please enter a valid email address");
			document.frm.email.focus();
			return false;
		}
		
	 if(!CheckEmpty(document.frm.confirmemail.value,"Please enter the confirm email address"))
	{
		document.frm.confirmemail.focus();
		return false;
	}
		if(!CheckEmailAddr(document.frm.confirmemail.value))
		{
			alert("Please enter a valid confirm email address");
			document.frm.confirmemail.focus();
			return false;
		}
		
		if(document.frm.email.value!=document.frm.confirmemail.value)
		{
			alert("Your confirm email address do not match");
			document.frm.confirmemail.focus();
			return false;
		}
		
		
		
	if(!CheckEmpty(document.frm.phone.value,"Please enter your phone"))
	{
		document.frm.phone.focus();
		return false;
	}

if(!IsPhone(document.frm.phone.value,"Please enter the Valid phone number ,it "))
	{
		document.frm.phone.focus();
		return false;
	}

/*var validNum =/^[2-9]\d{2}-\d{3}-\d{4}$/;
if (validNum.test(document.frm.phone.value) == false)
{
alert("Please enter the Valid phone number - eg:555-555-5555");
document.frm.phone.focus();
document.frm.phone.select();
return false;
}*/

	
		if(frm1.txtCaptcha.value == "")
	{
		alert("Please enter Verification Code");
		frm1.txtCaptcha.focus();
		return false;
	}
	getParam(frm1);
	return (false);	
	
}



function validation2()
{

dml=document.forms['frm'];
len = dml.elements.length;
	
	 if(!CheckEmpty(document.frm.name.value,"You did not give us your name"))
	{
		document.frm.name.focus();
		return false;
	}
	
	 if(!CheckEmpty(document.frm.email.value,"Please enter your email Address"))
	{
		document.frm.email.focus();
		return false;
	}
	if(!CheckEmailAddr(document.frm.email.value))
		{
			alert("Please enter a valid email address");
			document.frm.email.focus();
			return false;
		}
		
	
	if(!CheckEmpty(document.frm.phone.value,"Please enter your phone"))
	{
		document.frm.phone.focus();
		return false;
	}

if(!IsPhone(document.frm.phone.value,"Please enter the Valid phone number ,it "))
	{
		document.frm.phone.focus();
		return false;
	}
		
	for( i=0 ; i<len ; i++)
		{
			if (dml.elements[i].name=='f[company]')
			{
			 	if (dml.elements[i].value=="")
				{								
					alert("Please Enter The Company name");
					dml.elements[i].focus();
					return false;  
			}
				
		}
		
		if (dml.elements[i].name=='f[product]')
			{
			 	if (dml.elements[i].value=="")
				{								
					alert("Please Enter The Products traded");
					dml.elements[i].focus();
					return false;  
			}
				
		}
			if (dml.elements[i].name=='f[goods]')
			{
			 	if (dml.elements[i].value=="<28 days")
				{								
					alert("Sorry, we are unable to trade in highly perishable goods.  ");
					dml.elements[i].focus();
					return false;  
			}
				
		}
					
			if (dml.elements[i].name=='f[annualsale]')
			{
			 	if (dml.elements[i].value=="<200k")
				{								
					alert("Sorry, your company is unlikely to be able to take advantage of our services, until your annual sales exceed $200,000. ");
					dml.elements[i].focus();
					return false;  
			}
				
		}
		
		
	      if (dml.elements[i].name=='f[consultant]')
			{
			 	if (dml.elements[i].value=="<25k")
				{								
					alert("Sorry, we are unable to deal with transactions at this level. We prefer to start with orders between 25k and 100k and grow the amount gradually.  ");
					dml.elements[i].focus();
					return false;  
			}
				
		}
		
		if (dml.elements[i].name=='f[consultant]')
			{
			 	if (dml.elements[i].value==">100k")
				{								
					alert("Sorry, we are unable to deal with transactions at this level. We prefer to start with orders between 25k and 100k and grow the amount gradually.  ");
					dml.elements[i].focus();
					return false;  
			}
				
		}
		
		 if (dml.elements[i].name=='f[orders]')
			{
			 	if (dml.elements[i].value=="<3%")
				{								
					alert("Sorry, there is insufficient margin for this to work for you. ");
					dml.elements[i].focus();
					return false;  
			}
				
		}
		
			
			
					
		
		}

	
	return true;
	}
