// JavaScript Document

function required() //requires something to be put in each phone number box
{
	with (callMe) //the 'with' takes the place of writing document.object in this case the onject is the form callMe
	{
		if ((subscriber.value=="please choose")||(subscriber.value=="Yes"))
			{
			alert("Please tell us whether or not you are a current DISH Network customer. If the answer was Yes please call our customer service department, toll free at 1.800.333.3474");
			document.getElementById("error").innerHTML="ERROR: Please answer the question 'Are you currently a DISH Network Customer' in the drop down provided. If you did answer the question 'yes' please call our customer service department, toll free at 1.800.333.3474";
			subscriber.focus();
			return false;
			}
		if ((tvprovider.value=="DISH Network")||(tvprovider.value=="please choose"))
			{
			alert("If you're a DISH Network customer already please call our customer service department, toll free at 1.800.333.3474");
			document.getElementById("error").innerHTML="ERROR: Please answer the question 'Current TV Provider' in the drop down provided. If you selected 'DISH Network' please call our customer service department, toll free at 1.800.333.3474";
			tvprovider.focus();
			return false;
			}
		if ((first3.value=="")||(second3.value=="")||(last4.value==""))
			{
			alert("please fill out entire phone number. We need this to contact you");
			document.getElementById("error").innerHTML="ERROR: We need a complete phone number to contact you.<br>If you're in an office, please provide your extension.";
			first3.focus();
			return false;
			}
		//if (first3.length!==3)
			//{
			//alert("please fill in the entire zip code");
			//first3.focus();
			//return false
		if(answer.value!=="7")// !== returns true if not equal to and same type
			{
			alert("Please perform the addition of 1 and 6 and place in box. This is for security reasons.");
			document.getElementById("error").innerHTML="ERROR: We need you to perform the addition of 1 and 6 and place the answer in the field directly above the 'submit' button.<br>This is purely for security reasons. Thank you.";
			answer.select();
			return false;
			}
		//if (subscriber.value = "no")
			//{
			//return true;
			//}
			
		else
		document.callMe.action="CallMe_Received.asp";
		return true
	}
}