function submitForm()
{
	var FrmSales = eval(document.getElementById('FrmSales'));
	var email= FrmSales.txtEmail.value;
	
	var bMail      = false;
	sEmail = FrmSales.txtEmail.value;
	iMailLenth = sEmail.length;
    for(i = 0; i <= iMailLenth; i++)
    {
    	if(sEmail.charAt(i)=='@')
    	{
      		bMail = true;
     	}
    }

	if (FrmSales.txtName.value == '')
	{
		alert("The Field in Your Name Can not be Blank!");
		FrmSales.txtName.focus();
		return false;
	}
	else if (FrmSales.txtEmail.value == '')
	{
		alert("The Field in Your Email Can not be Blank!");
		FrmSales.txtEmail.focus();
		return false;
	}
    else if(!bMail)
	{
		alert("Email Field value is not in Correct Format!");
		FrmSales.txtEmail.focus();
		return false;
	}
	else if (FrmSales.txtPhone.value == '')
	{
		alert("The Field in YourTelePhone Number Can not be Blank!");
		FrmSales.txtPhone.focus();
		return false;
	}
	else if (FrmSales.taComments.value == '')
	{
		alert("The Field in Your Subjects Can not be Blank!");
		FrmSales.taComments.focus();
		return false;
	}
		else
	{
		return true;
	}
}
function ValidatePhone(txtPhone) 
{
        var regPhone = /^(\+\d)*\s*(\(\d{3}\)\s*)*\d{3}(-{0,1}|\s{0,1})\d{2}(-{0,1}|\s{0,1})\d{2}$/; 
        if (txtPhone.match(regPhone))
        {
                return true;
        }
        else
        {
                return false;
        }
}

