	 function echeck(str)

	 {

	 	var problem = 'NO';

		var at = '@';

		var dot = '.';

		var lat = str.indexOf(at);

		var lstr = str.length;

		var ldot = str.indexOf(dot);

		

		if (str.indexOf(at)==-1){

		   problem = 'YES';

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   problem = 'YES';

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    problem = 'YES';

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    problem = 'YES';

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    problem = 'YES';

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    problem = 'YES';

		 }

		

		 if (str.indexOf(" ")!=-1){

		    problem = 'YES';

		 }



 		 if (problem == 'NO'){

			return true;

		 }

		 else

		 {

		 	return false;

		 }					

	}
	
	function validate()
	{
		var fn = document.contact.firstname.value;
		var ln = document.contact.lastname.value;
		var c = document.contact.company.value;
		var e = document.contact.email.value;
		var p = document.contact.phone.value;
		var qc = document.contact.QorC.value;
		
		if (fn == "" || ln == "" || c == "" || e == "" || p == "" || qc == "")
		{
			alert("Please enter information on required fields.");
			return false;
		}
		else if (fn == "" && ln == "" && c == "" && e == "" && p == "" && qc == "")
		{
			alert("Please enter information on required fields.");
			return false;		
		}
		else if (echeck(e) == false)
		{
			alert("Please enter a valid email address.");
			return false;
		}
		else
		{
			//alert("Thank you. We will get back to you shortly.");
			return true;
		}
	}
	function choose()
	{
		var s = document.getElementById("sID");
		var o1 = document.getElementById("otherId");
		var o2 = document.getElementById("oId"); 
		
		if (s.selectedIndex == 9)
		{
			o1.innerHTML = 'Others, pls. specify:';
			o2.innerHTML = '<input type="text" name="others" size="25">';
		}
		else if (s.selectedIndex == 1 || s.selectedIndex == 3)
		{
			o1.innerHTML = 'If Google or Yahoo, Keyword Typed In:';
			o2.innerHTML = '<input type="text" name="keyword" size="25">';
		}
		else
		{
			o1.innerHTML = '';
			o2.innerHTML = '';
		}
	}
	/*function openNew()
	{
		window.location.href = "http://www.callboxinc.com/thankyou.html";
	}*/
	-->