function submitContact()

	{		

		var returnString=false;

		var flag=0;

		if(document.paymentForm.selectBox1.value=='0')

		{

			alert("Please select a package first");

			flag=1;

		}

		else if(document.paymentForm.yourname.value=="")

		{

			alert('Please enter your name');

			flag=1;

		}

		else if((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.paymentForm.youremail.value)) == false)

		{

			alert('Please enter a valid email address');

			flag=1;

		}		

		else if(document.paymentForm.selectBox1.value=='1')

		{

			document.paymentForm.hosted_button_id.value='7197676';

		}

		else if(document.paymentForm.selectBox1.value=='2')

		{

			document.paymentForm.hosted_button_id.value='7197730';

		}

		

		if(flag==0)

		{

			sendContactInfo();

		}

		return returnString;

	}

	

	

	function getHTTPObject(){

	if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP");

		else if (window.XMLHttpRequest) 

			return new XMLHttpRequest();

		else {

			alert("Your browser does not support AJAX.");

			return null;

			}

	}

	

	

	function setOutput(){

		var res=httpObject.responseText;	

		if(httpObject.readyState == 4)

		{		

			if(res=="success")

			{

				document.paymentForm.submit();

			}

			else

			{

				alert("An error occured.");

			}			

		}

	}

	

	function sendContactInfo()

	{

		var emailText="<b>Name:</b> "+document.paymentForm.yourname.value+"<br><b>Email:</b> "+document.paymentForm.youremail.value+"<br><b>Company Name :</b> "+document.paymentForm.company.value+"<br><b>Company Slogan :</b> "+document.paymentForm.comslogan.value+"<br><b>Website :</b> "+document.paymentForm.comwebsite.value+"<br><b>Phone :</b> "+document.paymentForm.yourphone.value+"<br><b>About Company :</b> "+document.paymentForm.comdescription.value+"<br><b>Audience :</b> "+document.paymentForm.audience.value+"<br><b>How Found :</b> "+document.paymentForm.comfind.value+"<br><br>";						

		var sender=document.paymentForm.youremail.value;

		

		httpObject = getHTTPObject();

		if (httpObject != null) {		

			httpObject.open("GET", "ajax/contact.php?refid=1&email="+sender+"&emailtext="+emailText, true);

			httpObject.send(null);

			httpObject.onreadystatechange = setOutput;			

		}

		

	}