function sendMail()
{
	var err = 0;
	document.getElementById('showError').style.display = 'none';

	if (document.getElementById('txtName').value == '')
	{
		alert('Enter Your Name');
		document.getElementById('txtName').focus();
		return false;
	}
	if (document.getElementById('txtCompany').value == '')
	{
		alert('Enter Your Company\'s Name');
		document.getElementById('txtCompany').focus();
		return false;
	}
	if (document.getElementById('txtEmailId').value == '')
	{
		alert('Enter Your Email Id');
		document.getElementById('txtEmailId').focus();
		return false;
	}
	if (document.getElementById('txtPhone').value == '')
	{
		alert('Enter Your Phone Number');
		document.getElementById('txtPhone').focus();
		return false;
	}
	if(alltrim(document.getElementById('code').value)==""){
		err++;
	}

	if(err > 0) {
		document.getElementById('showError').style.display = 'block';
		document.getElementById('showError').innerHTML = "Please Enter the captcha Code As Shown.";
		alert("Please Enter the captcha Code As Shown.");
		document.getElementById('code').focus();
		return false;
	}
	else 
	{
		var code=document.getElementById('code').value;
		call(code);
		return false;
	}
}

function call(code)
{
	var url =  'captcha_test.php';
	var pars = "mode=view&value="+code;

	var myAjax = new Ajax.Request(
		url,
		{
			method: 'post',
			parameters: pars,
			onComplete:showDataList
		}
	);
}


function showDataList(originalRequest)
{
	var text=originalRequest.responseText; 
	if(text!='OK')
	{
		document.getElementById('showError').style.display = 'block';
		document.getElementById('showError').innerHTML = "Verification code is not correct, Retry";
		alert("Verification code is not correct, Retry");
		document.getElementById('code').focus();
	}
	else
	{
		document.getElementById('frm').action = "send_partnership_mail.php";
		document.getElementById('frm').submit();
	}
}