
// Bundled form javascript

// Global Variables
		var ip = '<!--#echo var="REMOTE_ADDR"-->'
		var televisionOption = "No";
		var telephoneOption = "No";
		var passedInfo;
		passedInfo = location.search.substring(1);	
		
		
function onBodyLoad(){		
		if(passedInfo == "&TVOnly"){
		document.qdbform.CountyPick.selectedIndex=1;
		document.qdbform._fid_77.selectedIndex=1;
		document.qdbform._fid_7.selectedIndex=1;	
		}
		if(passedInfo == "&VoiceOnly"){
		document.qdbform._fid_6.selectedIndex=1;
		document.qdbform._fid_7.selectedIndex=1;
		}
	}
		

function televisionCheck(){
	if(document.qdbform.CountyPick.selectedIndex == 1 || document.qdbform.CountyPick.selectedIndex == 0)
		{
		calcPrice();
		test();
		dynamicRequired();
		hideunhidecheck();
		}
	else
		{
		alert("Television is only available in Chelan County. We are working on TV for Grant and Douglas, please call for more information.");
		document.qdbform._fid_6.selectedIndex=1;
		calcPrice();
		}
}

function countyCheck(){
	document.qdbform._fid_7.selectedIndex=0;
	document.qdbform._fid_77.selectedIndex=0;
	if(document.qdbform.CountyPick.selectedIndex!=1  && document.qdbform.CountyPick.selectedIndex !=0){
		document.qdbform._fid_6.selectedIndex=1;
		test();
		}
	else
		document.qdbform._fid_6.selectedIndex=0;
	}

function hideunhide(hide,unhide){
if(unhide==1){
	document.qdbform.existingphonenumber.style.visibility='visible';
	document.qdbform._fid_80.style.visibility='visible';
	document.qdbform.printloa.style.visibility='visible';
	document.qdbform._fid_88.style.visibility='visible';
	document.qdbform.callforwarding.style.visibility='visible';
	}
if(hide==1){
	document.qdbform.existingphonenumber.style.visibility='hidden';
	document.qdbform._fid_80.style.visibility='hidden';
	document.qdbform.printloa.style.visibility='hidden';
	document.qdbform._fid_88.style.visibility='hidden';
	document.qdbform.callforwarding.style.visibility='hidden';
	}
}

function test(){
	document.qdbform._fid_8.checked = false;
	document.qdbform._fid_9.checked = false;
	document.qdbform._fid_10.checked = false;
	document.qdbform._fid_11.checked = false;
	document.qdbform._fid_12.checked = false;
	document.qdbform._fid_13.checked = false;
	document.qdbform._fid_14.checked = false;
	document.qdbform._fid_15.checked = false;
	if(passedInfo=="")
	{
	document.qdbform._fid_7.selectedIndex=0;
	}
}

function calcPrice(){
	document.qdbform._fid_87.value = ip;
	var Digital = 0;
	var Movie = 0;
	var Service = 0;
	var Telephone = 0;
	var Internet = 0;
	var Base = 0;
	var Receiver = 0;
	var AddReceiver = 0;
	var noreceiver=0;
	var Installs=0;
	var InstallInternet = 0;
	var InstallInternetCheck = 0;
	var InstallInternetFloor = 0;
	var InstallInternetEquipment = 0;
	var InstallTV = 0
	var InstallTVCheck = 0;
	var InstallPhone = 0;
	var InstallPhoneCheck = 0;
	var InstallPhoneEquipment = 0;
	var Installtotal = 0;
	var InstallCheckTotal = 0;
	var ActivationInternet = 0;
	var ActivationTelevision = 0;
	var ActivationTelephone = 0;
	var ActivationTotal = 0;
	var AddonEquipment = 0;

	if(document.qdbform.phoneNumberChoice[1].checked){
	document.qdbform.TelephoneActivationBox.value = "Voice Activation, Setup and Porting";
	ActivationTelephone += 15;
	}
	else{
	document.qdbform.TelephoneActivationBox.value = "Voice Activation and Setup";
	}	
	
	
	
	


	if(document.qdbform._fid_6.selectedIndex==0){
		Base += 0;
		}
	if(document.qdbform._fid_6.selectedIndex==1){
		Base += 0;
		}
	if(document.qdbform._fid_6.selectedIndex==2){
		Base += 20.95;
		}
	if(document.qdbform._fid_6.selectedIndex==3){
		Base += 50.95;
		}
	if(document.qdbform._fid_6.selectedIndex==4){
		Base += 50.95;
		}
	if(document.qdbform._fid_77.selectedIndex==0){
		Telephone +=0;
		}
	if(document.qdbform._fid_77.selectedIndex==1){
		Telephone +=0;
		}
	if(document.qdbform._fid_77.selectedIndex==2){
		Telephone +=14.99;
		}
	if(document.qdbform._fid_77.selectedIndex==3){
		Telephone +=29.99;
		}
	if(document.qdbform._fid_77.selectedIndex==4){
		Telephone +=44.99;
		}
	if(document.qdbform._fid_77.selectedIndex==5){
		Telephone +=44.99;
		}
	if(document.qdbform._fid_7.selectedIndex==0){
		Internet = 0;
		}
	if(document.qdbform._fid_7.selectedIndex==1){
		Internet = 0;
		}
	if(document.qdbform._fid_7.selectedIndex==2){

		if(document.qdbform.CountyPick.selectedIndex == 1)
			Internet = 35;
		if(document.qdbform.CountyPick.selectedIndex == 2)
			Internet = 40;
		if(document.qdbform.CountyPick.selectedIndex == 3)
			Internet = 37.50;
	}
	if(document.qdbform._fid_7.selectedIndex==3)
	{
		if(document.qdbform.CountyPick.selectedIndex == 1)
			Internet = 55;
		if(document.qdbform.CountyPick.selectedIndex == 2)
			Internet = 0;
		if(document.qdbform.CountyPick.selectedIndex == 3)
			Internet = 47.50;
	}
	if(document.qdbform._fid_7.selectedIndex==4)
	{
		if(document.qdbform.CountyPick.selectedIndex == 1)
			Internet = 65;
		if(document.qdbform.CountyPick.selectedIndex == 2)
			Internet = 0;
		if(document.qdbform.CountyPick.selectedIndex == 3)
			Internet = 0;
	}
	if(document.qdbform._fid_7.selectedIndex==5)
	{
		if(document.qdbform.CountyPick.selectedIndex == 1)
			Internet = 50;
		if(document.qdbform.CountyPick.selectedIndex == 2)
			Internet = 0;
		if(document.qdbform.CountyPick.selectedIndex == 3)
			Internet = 0;
	}
	if(document.qdbform._fid_7.selectedIndex==6)
	{
		if(document.qdbform.CountyPick.selectedIndex == 1)
			Internet = 90;
		if(document.qdbform.CountyPick.selectedIndex == 2)
			Internet = 0;
		if(document.qdbform.CountyPick.selectedIndex == 3)
			Internet = 0;
	}
	if(document.qdbform._fid_7.selectedIndex==7)
	{
		if(document.qdbform.CountyPick.selectedIndex == 1)
			Internet = 150;
		if(document.qdbform.CountyPick.selectedIndex == 2)
			Internet = 0;
		if(document.qdbform.CountyPick.selectedIndex == 3)
			Internet = 0;
	}
	if(Internet != 0)
	{
		if(document.qdbform._fid_6.selectedIndex==4 || document.qdbform._fid_6.selectedIndex==3)
			Internet-=10;
		if(document.qdbform._fid_6.selectedIndex==2)
			Internet-=5;
		if(document.qdbform._fid_6.selectedIndex!=2 && document.qdbform._fid_6.selectedIndex!=3 && document.qdbform._fid_6.selectedIndex!=4 && document.qdbform._fid_77.selectedIndex != 0 && document.qdbform._fid_77.selectedIndex != 1)
			Internet-=2.5;
	}


	if(document.qdbform._fid_94.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_94.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
				document.qdbform._fid_94.checked=true;
				Digital +=4	
		}


	if(document.qdbform._fid_8.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_8.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
				if(document.qdbform._fid_94.checked)
				Digital +=5
			else
				Digital += 9;
	
		}
	if(document.qdbform._fid_9.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_9.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
			{
			if(document.qdbform._fid_8.checked)
			Digital += 4;
				else
				{
				document.qdbform._fid_8.checked=true;
				Digital +=13;
				}
			}
		}
	if(document.qdbform._fid_10.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_10.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
			{
			if(document.qdbform._fid_8.checked)
			Digital += 4;
				else
				{
				document.qdbform._fid_8.checked=true;
				Digital +=13;
				}
			}
		}
	if(document.qdbform._fid_11.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_11.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
			if(document.qdbform._fid_12.checked)
				Movie +=23.00
			else
				Movie += 12.95;
		}
	if(document.qdbform._fid_12.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_12.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
			if(document.qdbform._fid_11.checked)
				Movie += 0;
			else
				Movie += 12.95;
		}
	if(document.qdbform._fid_13.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_13.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
			Movie += 18;
		}
	if(document.qdbform._fid_14.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_14.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
			Service += 0;
		}
	if(document.qdbform._fid_15.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_15.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
			Service += 8;
		}
	if(document.qdbform._fid_71.checked){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
			document.qdbform._fid_71.checked=false;
			alert("If you would like this Pak or Service please select the Digital base package");
			}else
			Service += 0;
		}

	if(document.qdbform._fid_94.checked ||document.qdbform._fid_8.checked || document.qdbform._fid_9.checked || document.qdbform._fid_10.checked || document.qdbform._fid_11.checked || document.qdbform._fid_12.checked || document.qdbform._fid_13.checked){
	document.qdbform._fid_46.value = "Standard Digital Receiver | $5.95/month";
	Receiver = 5.95;
	noreceiver=1;
	}
	if(document.qdbform._fid_15.checked){
	document.qdbform._fid_46.value = "HDTV Digital Receiver | $7.95/month";
	noreceiver=1;
	Receiver = 7.95;
	}
	if(document.qdbform._fid_14.checked){
	document.qdbform._fid_46.value = "Standard Digital DVR Receiver | $11.95/month";
	noreceiver=1;
	Receiver = 11.95;
	}
	if(document.qdbform._fid_14.checked && document.qdbform._fid_15.checked){
	document.qdbform._fid_46.value = "HDTV / DVR Digital Receiver | $15.95/month";
	noreceiver=1;
	Receiver = 15.95;
	}
	if(noreceiver==0){
	document.qdbform._fid_46.value = "No Receiver";
	Receiver = 0;
	}

	if(document.qdbform._fid_47.selectedIndex==0){
		AddReceiver=0;
		}
	if(document.qdbform._fid_47.selectedIndex==1){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
		document.qdbform._fid_47.selectedIndex=0;
		}else{
			AddReceiver=5.95;
			AddReceiver = AddReceiver * document.qdbform._fid_48.value;
			}
		}
	if(document.qdbform._fid_47.selectedIndex==2){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
		document.qdbform._fid_47.selectedIndex=0;
		}else{
			AddReceiver=7.95;
			AddReceiver = AddReceiver * document.qdbform._fid_48.value;
			}
		}
	if(document.qdbform._fid_47.selectedIndex==3){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
		document.qdbform._fid_47.selectedIndex=0;
		}else{
			AddReceiver=11.95;
			AddReceiver = AddReceiver * document.qdbform._fid_48.value;
			}
		}
	if(document.qdbform._fid_47.selectedIndex==4){
		if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
		document.qdbform._fid_47.selectedIndex=0;
		}else{
			AddReceiver=15.95;
			AddReceiver = AddReceiver * document.qdbform._fid_48.value;
			}
		}
	
	if(document.qdbform._fid_50.selectedIndex == 1)
		InstallInternetCheck = 1;
	if(document.qdbform._fid_85.selectedIndex == 1)
		InstallPhoneCheck = 1;
	if(document.qdbform._fid_56.selectedIndex == 1)
		InstallTVCheck = 1;
	InstallCheckTotal = InstallInternetCheck+InstallPhoneCheck + InstallTVCheck;
	
	
	if(InstallInternetCheck == 1)
		InstallInternet = 49.95;
		
	if(InstallPhoneCheck == 1){
		if(InstallCheckTotal == 1)
			InstallPhone = 49.95;
		if(InstallCheckTotal == 2){
			if(InstallInternetCheck == 1)
				InstallPhone = 25;
			if(InstallInternetCheck == 0)
				InstallPhone = 49.95;	
			}	
		if(InstallCheckTotal == 3)
			InstallPhone = 25;
		}
			
	if(InstallTVCheck == 1){
		if(InstallCheckTotal == 1)
			InstallTV = 49.95;
		if(InstallCheckTotal == 2 || InstallCheckTotal == 3)
			InstallTV = 25;
		}
		
	if(document.qdbform._fid_51.selectedIndex == 2)
		InstallInternetFloor = 27.50;
	if(document.qdbform._fid_51.selectedIndex == 3)
		InstallInternetFloor = 55;
	if(document.qdbform._fid_51.selectedIndex == 4)
		InstallInternetFloor = 27.50;
	if(document.qdbform._fid_58.selectedIndex == 1)
		InstallInternetEquipment = 55;
	if(document.qdbform._fid_58.selectedIndex == 2)
		InstallInternetEquipment = 65;
	if(document.qdbform._fid_86.selectedIndex == 1)
		InstallPhoneEquipment = 58;
	if(document.qdbform._fid_86.selectedIndex == 2)
		InstallPhoneEquipment = 105;
	if(document.qdbform._fid_86.selectedIndex == 3)
		InstallPhoneEquipment = 125;
	if(document.qdbform._fid_57.selectedIndex == 1)
		AddonEquipment = 55;
	if(document.qdbform._fid_57.selectedIndex == 2)
		AddonEquipment = 55;
	if(document.qdbform._fid_57.selectedIndex == 3)
		AddonEquipment = 15;
	if(document.qdbform._fid_57.selectedIndex == 4)
		AddonEquipment = 55;
	if(document.qdbform._fid_57.selectedIndex == 5)
		AddonEquipment = 65;
	if(document.qdbform._fid_57.selectedIndex == 6)
		AddonEquipment = 105;
	if(document.qdbform._fid_57.selectedIndex == 7)
		AddonEquipment = 125;
	if(document.qdbform._fid_57.selectedIndex == 8)
		AddonEquipment = 58;
	if(document.qdbform._fid_6.selectedIndex != 0 && document.qdbform._fid_6.selectedIndex != 1)
		ActivationTelevision = 10;
	if(document.qdbform._fid_7.selectedIndex != 0 && document.qdbform._fid_7.selectedIndex != 1)
		if(document.qdbform.CountyPick.selectedIndex==2)
		ActivationInternet = 45;
		else
		ActivationInternet = 10;
	if(document.qdbform._fid_77.selectedIndex !=0 && document.qdbform._fid_77.selectedIndex != 1)
		ActivationTelephone += 10;

	if(document.qdbform._fid_6.selectedIndex == 0 || document.qdbform._fid_6.selectedIndex == 1)
		{
		document.qdbform._fid_56.style.visibility='hidden';
		document.qdbform._fid_56.selectedIndex = 0;
		document.qdbform.InstallTV.style.visibility='hidden';
		document.qdbform.TelevisionActivationBox.style.visibility='hidden';
		document.qdbform.TelevisionActivation.style.visibility='hidden';
		document.qdbform.TelevisionInstallText.style.visibility='hidden';
		}
		else{
		document.qdbform._fid_56.style.visibility='visible';
		document.qdbform.InstallTV.style.visibility='visible';
		document.qdbform.TelevisionActivationBox.style.visibility='visible';
		document.qdbform.TelevisionActivation.style.visibility='visible';
		document.qdbform.TelevisionInstallText.style.visibility='visible';
		}
	if(document.qdbform._fid_7.selectedIndex == 0 || document.qdbform._fid_7.selectedIndex == 1)
		{
		document.qdbform._fid_50.style.visibility='hidden';
		document.qdbform._fid_50.selectedIndex = 0;
		document.qdbform._fid_51.style.visibility='hidden';
		document.qdbform._fid_51.selectedIndex = 0;
		document.qdbform._fid_58.style.visibility='hidden';
		document.qdbform._fid_58.selectedIndex = 0;
		document.qdbform.InternetEQ.style.visibility='hidden';
		document.qdbform.InstallInternet.style.visibility='hidden';
		document.qdbform.InstallInternetPCLoc.style.visibility='hidden';
		document.qdbform.InternetActivationBox.style.visibility='hidden';
		document.qdbform.InternetActivation.style.visibility='hidden';
		document.qdbform.InternetInstallText.style.visibility='hidden';
		document.qdbform.InternetEQText.style.visibility='hidden';
		document.qdbform.PCLocationText.style.visibility='hidden';
		}
		else{
		document.qdbform._fid_50.style.visibility='visible';
		document.qdbform.InstallInternet.style.visibility='visible';
		document.qdbform._fid_51.style.visibility='visible';
		document.qdbform.InstallInternetPCLoc.style.visibility='visible';
		document.qdbform._fid_58.style.visibility='visible';
		document.qdbform.InternetEQ.style.visibility='visible';
		document.qdbform.InternetActivationBox.style.visibility='visible';
		document.qdbform.InternetActivation.style.visibility='visible';
		document.qdbform.InternetInstallText.style.visibility='visible';
		document.qdbform.InternetEQText.style.visibility='visible';
		document.qdbform.PCLocationText.style.visibility='visible';
		}
	if(document.qdbform._fid_77.selectedIndex == 0 || document.qdbform._fid_77.selectedIndex == 1)
	{
		document.qdbform._fid_85.style.visibility='hidden';
		document.qdbform._fid_85.selectedIndex = 0;
		document.qdbform._fid_86.style.visibility='hidden';
		document.qdbform._fid_86.selectedIndex = 0;
		document.qdbform.TelephoneEQ.style.visibility='hidden';
		document.qdbform.InstallPhone.style.visibility='hidden';
		document.qdbform.TelephoneActivationBox.style.visibility='hidden';
		document.qdbform.TelephoneActivation.style.visibility='hidden';
		document.qdbform.TelephoneInstallText.style.visibility='hidden';
		document.qdbform.TelephoneEQText.style.visibility='hidden';
	}
	else
	{
		document.qdbform._fid_85.style.visibility='visible';
		document.qdbform._fid_86.style.visibility='visible';
		document.qdbform.TelephoneEQ.style.visibility='visible';
		document.qdbform.InstallPhone.style.visibility='visible';
		document.qdbform.TelephoneActivationBox.style.visibility='visible';
		document.qdbform.TelephoneActivation.style.visibility='visible';
		document.qdbform.TelephoneInstallText.style.visibility='visible';
		document.qdbform.TelephoneEQText.style.visibility='visible';
	}
	ActivationTotal = ActivationTelevision + ActivationInternet + ActivationTelephone;
	document.qdbform.AddonEQ.value = AddonEquipment;
	document.qdbform.TelephoneActivation.value = ActivationTelephone;
	document.qdbform.InternetActivation.value = ActivationInternet;
	document.qdbform.TelevisionActivation.value = ActivationTelevision;
	document.qdbform.InternetEQ.value = InstallInternetEquipment;
	document.qdbform.TelephoneEQ.value = InstallPhoneEquipment;
	document.qdbform.InstallInternetPCLoc.value = InstallInternetFloor;
	document.qdbform.InstallTV.value = InstallTV;
	document.qdbform.InstallInternet.value = InstallInternet;
	document.qdbform.InstallPhone.value = InstallPhone;
	document.qdbform.ReqReceiver46.value = Receiver;
	document.qdbform.Internet7.value = Internet;
	document.qdbform.Telephone77.value = Telephone;
	document.qdbform.BasePackage6.value = Base;
	document.qdbform.Digital8910.value = Digital;
	document.qdbform.Movie111213.value = Movie;
	document.qdbform.Services1415.value = Service;
	document.qdbform.AddReceiver47.value = AddReceiver;
	document.qdbform.ActivationTotalText.value = ActivationTotal;
	document.qdbform.EquipmentTotalText.value = InstallInternetEquipment + InstallPhoneEquipment + AddonEquipment;
	document.qdbform.InstallationTotalText.value = InstallInternetFloor + InstallInternet + InstallPhone + InstallTV;
	document.qdbform.installtotal.value = InstallInternetFloor + InstallTV + InstallInternet + InstallPhone + InstallInternetEquipment + InstallPhoneEquipment + ActivationTotal + AddonEquipment;
	document.qdbform.total.value = Receiver + Telephone + Internet + Base + Digital + Movie + Service + AddReceiver;
	document.qdbform.estimatedtotal.value = document.qdbform.total.value;
}
function checkAll(){
	var dropdown ="";
	var why ="";
	var error="";
	var focus = 0;

	dropdown += checkDropdown('Television Type (Dropdown Box)',document.qdbform._fid_6.selectedIndex,2);
	dropdown += checkDropdown('Telephone Type (Dropdown Box)',document.qdbform._fid_77.selectedIndex,2);
	dropdown += checkDropdown('Internet Type (Dropdown Box)',document.qdbform._fid_7.selectedIndex,2);


	why += checkText('First Name',document.qdbform._fid_16.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_16.focus(); focus=1;}
	why += checkText('Last Name',document.qdbform._fid_17.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_17.focus(); focus=1;}
	why += checkText('Site Address',document.qdbform._fid_19.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_19.focus(); focus=1;}
	why += checkText('Years At Address',document.qdbform._fid_21.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_21.focus(); focus=1;}
	why += checkText('City',document.qdbform._fid_23.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_23.focus(); focus=1;}
	why += checkText('Zip Code',document.qdbform._fid_24.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_24.focus(); focus=1;}
	why += checkDropdown('Home Location (Dropdown Box)',document.qdbform._fid_74.selectedIndex,2);
	why += checkDropdown('Own or Rent (Dropdown Box)',document.qdbform._fid_22.selectedIndex,2);
	why += checkPhone(document.qdbform._fid_25.value,2);
		if(why != "" && focus==0){ document.qdbform._fid_25.focus(); focus=1;}
	why += checkText('Employer',document.qdbform._fid_28.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_28.focus(); focus=1;}
	why += checkText('Drivers License',document.qdbform._fid_29.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_29.focus(); focus=1;}
	why += checkText('Date Of Birth',document.qdbform._fid_70.value,40,0,0,2);
		if(why != "" && focus==0){ document.qdbform._fid_70.focus(); focus=1;}
	why += checkDropdown('Billing (Dropdown Box)',document.qdbform._fid_42.selectedIndex,2);
	why += checkCheckbox('Accept',document.qdbform._fid_61,2);

	error = dropdown + why;

	if(error != ""){
		alert("We're sorry but there are problems with the form submission. Please try again.\n\n" + error);
		return false;
	}
	return true;
}

function fillinInternet(){
	if(document.qdbform.CountyPick.selectedIndex == 1)
	{
		if(passedInfo=="")
		{
			if(document.qdbform._fid_6.selectedIndex==0 || document.qdbform._fid_6.selectedIndex == 1 && document.qdbform._fid_77.selectedIndex == 0 || document.qdbform._fid_77.selectedIndex == 1)
			{
				televisionOption = "No"
				telephoneOption = "No"
				document.qdbform._fid_7.options[0].value = "Please pick an Internet Package"
				document.qdbform._fid_7.options[0].text = "Please pick an Internet Package"
				document.qdbform._fid_7.options[1].value = "No Internet";
				document.qdbform._fid_7.options[1].text = "No Internet";
				document.qdbform._fid_7.options[2].value = "6Mbps / 384kbps";
				document.qdbform._fid_7.options[2].text = "6Mbps / 384kbps | $35/month";
				document.qdbform._fid_7.options[3].value = "12Mbps / 384kbps";
				document.qdbform._fid_7.options[3].text = "12Mbps / 384kbps | $55/month";
				document.qdbform._fid_7.options[4].value = "12Mbps / 768kbps";
				document.qdbform._fid_7.options[4].text = "12Mbps / 768kbps | $65/month";
				document.qdbform._fid_7.options[5].value = "1Mbps / 1Mbps";
				document.qdbform._fid_7.options[5].text = "1Mbps / 1Mbps | $50/month";
				document.qdbform._fid_7.options[6].value = "2Mbps / 2Mbps";
				document.qdbform._fid_7.options[6].text = "2Mbps / 2Mbps | $90/month";
				document.qdbform._fid_7.options[7].value = "6Mbps / 6Mbps";
				document.qdbform._fid_7.options[7].text = "6Mbps / 6Mbps | $150/month";
			}
			if(document.qdbform._fid_6.selectedIndex!=2 && document.qdbform._fid_6.selectedIndex!=3 && document.qdbform._fid_6.selectedIndex!=4 && document.qdbform._fid_77.selectedIndex != 0 && document.qdbform._fid_77.selectedIndex != 1)
			{
				televisionOption = "No"
				telephoneOption = "Yes"
				document.qdbform._fid_7.options[0].value = "Please pick an Internet Package"
				document.qdbform._fid_7.options[0].text = "Please pick an Internet Package"
				document.qdbform._fid_7.options[1].value = "No Internet";
				document.qdbform._fid_7.options[1].text = "No Internet";
				document.qdbform._fid_7.options[2].value = "6Mbps / 384kbps";
				document.qdbform._fid_7.options[2].text = "6Mbps / 384kbps | $32.50/month";
				document.qdbform._fid_7.options[3].value = "12Mbps / 384kbps";
				document.qdbform._fid_7.options[3].text = "12Mbps / 384kbps | $47.50/month";
				document.qdbform._fid_7.options[4].value = "12Mbps / 768kbps";
				document.qdbform._fid_7.options[4].text = "12Mbps / 768kbps | $67.50/month";
				document.qdbform._fid_7.options[5].value = "1Mbps / 1Mbps";
				document.qdbform._fid_7.options[5].text = "1Mbps / 1Mbps | $47.50/month";
				document.qdbform._fid_7.options[6].value = "2Mbps / 2Mbps";
				document.qdbform._fid_7.options[6].text = "2Mbps / 2Mbps | $87.50/month";
				document.qdbform._fid_7.options[7].value = "6Mbps / 6Mbps";
				document.qdbform._fid_7.options[7].text = "6Mbps / 6Mbps | $147.50/month";
			}
			if(document.qdbform._fid_6.selectedIndex==2)
			{
				televisionOption = "Analog"
				telephoneOption = "No"
				document.qdbform._fid_7.options[0].value = "Please pick an Internet Package"
				document.qdbform._fid_7.options[0].text = "Please pick an Internet Package"
				document.qdbform._fid_7.options[1].value = "No Internet";
				document.qdbform._fid_7.options[1].text = "No Internet";
				document.qdbform._fid_7.options[2].value = "6Mbps / 384kbps";
				document.qdbform._fid_7.options[2].text = "6Mbps / 384kbps | $30/month";
				document.qdbform._fid_7.options[3].value = "12Mbps / 384kbps";
				document.qdbform._fid_7.options[3].text = "12Mbps / 384kbps | $50/month";
				document.qdbform._fid_7.options[4].value = "12Mbps / 768kbps";
				document.qdbform._fid_7.options[4].text = "12Mbps / 768kbps | $60/month";
				document.qdbform._fid_7.options[5].value = "1Mbps / 1Mbps";
				document.qdbform._fid_7.options[5].text = "1Mbps / 1Mbps | $45/month";
				document.qdbform._fid_7.options[6].value = "2Mbps / 2Mbps";
				document.qdbform._fid_7.options[6].text = "2Mbps / 2Mbps | $85/month";
				document.qdbform._fid_7.options[7].value = "5Mbps / 5Mbps";
				document.qdbform._fid_7.options[7].text = "5Mbps / 5Mbps | $145/month";
			}
			if(document.qdbform._fid_6.selectedIndex==4 || document.qdbform._fid_6.selectedIndex==3)
			{
				televisionOption = "Digital"
				telephoneOption = "No"
				document.qdbform._fid_7.options[0].value = "Please pick an Internet Package"
				document.qdbform._fid_7.options[0].text = "Please pick an Internet Package"
				document.qdbform._fid_7.options[1].value = "No Internet";
				document.qdbform._fid_7.options[1].text = "No Internet";
				document.qdbform._fid_7.options[2].value = "6Mbps / 384kbps";
				document.qdbform._fid_7.options[2].text = "6Mbps / 384kbps | $25/month";
				document.qdbform._fid_7.options[3].value = "12Mbps / 384kbps";
				document.qdbform._fid_7.options[3].text = "12Mbps / 384kbps | $45/month";
				document.qdbform._fid_7.options[4].value = "12Mbps / 768kbps";
				document.qdbform._fid_7.options[4].text = "12Mbps / 768kbps | $55/month";
				document.qdbform._fid_7.options[5].value = "1Mbps / 1Mbps";
				document.qdbform._fid_7.options[5].text = "1Mbps / 1Mbps | $40/month";
				document.qdbform._fid_7.options[6].value = "2Mbps / 2Mbps";
				document.qdbform._fid_7.options[6].text = "2Mbps / 2Mbps | $80/month";
				document.qdbform._fid_7.options[7].value = "5Mbps / 5Mbps";
				document.qdbform._fid_7.options[7].text = "5Mbps / 5Mbps | $140/month";
			}
		}
	}
	if(document.qdbform.CountyPick.selectedIndex == 2)
	{
		if(passedInfo=="")
		{
			if(document.qdbform._fid_77.selectedIndex == 0 || document.qdbform._fid_77.selectedIndex == 1)
			{
				televisionOption = "No";
				telephoneOption = "No";
				document.qdbform._fid_7.options[0].value = "Please pick an Internet Package"
				document.qdbform._fid_7.options[0].text = "Please pick an Internet Package"
				document.qdbform._fid_7.options[1].value = "No Internet";
				document.qdbform._fid_7.options[1].text = "No Internet";
				document.qdbform._fid_7.options[2].value = "2Mbps / 2Mbps";
				document.qdbform._fid_7.options[2].text = "2Mbps / 2Mbps | $40/month";
				document.qdbform._fid_7.options[3].value = "";
				document.qdbform._fid_7.options[3].text = "";
				document.qdbform._fid_7.options[4].value = "";
				document.qdbform._fid_7.options[4].text = "";
				document.qdbform._fid_7.options[5].value = "";
				document.qdbform._fid_7.options[5].text = "";
				document.qdbform._fid_7.options[6].value = "";
				document.qdbform._fid_7.options[6].text = "";
				document.qdbform._fid_7.options[7].value = "";
				document.qdbform._fid_7.options[7].text = "";
			}
			if(document.qdbform._fid_77.selectedIndex != 0 && document.qdbform._fid_77.selectedIndex != 1)
			{
				televisionOption = "No";
				telephoneOption = "Yes";
				document.qdbform._fid_7.options[0].value = "Please pick an Internet Package"
				document.qdbform._fid_7.options[0].text = "Please pick an Internet Package"
				document.qdbform._fid_7.options[1].value = "No Internet";
				document.qdbform._fid_7.options[1].text = "No Internet";
				document.qdbform._fid_7.options[2].value = "2Mbps / 2Mbps";
				document.qdbform._fid_7.options[2].text = "2Mbps / 2Mbps | $37.50/month";
				document.qdbform._fid_7.options[3].value = "";
				document.qdbform._fid_7.options[3].text = "";
				document.qdbform._fid_7.options[4].value = "";
				document.qdbform._fid_7.options[4].text = "";
				document.qdbform._fid_7.options[5].value = "";
				document.qdbform._fid_7.options[5].text = "";
				document.qdbform._fid_7.options[6].value = "";
				document.qdbform._fid_7.options[6].text = "";
				document.qdbform._fid_7.options[7].value = "";
				document.qdbform._fid_7.options[7].text = "";
			}
		}
	}
	if(document.qdbform.CountyPick.selectedIndex == 3)
	{
		if(passedInfo=="")
		{
			if(document.qdbform._fid_77.selectedIndex == 0 || document.qdbform._fid_77.selectedIndex == 1)
			{
				televisionOption = "No";
				telephoneOption = "No";
				document.qdbform._fid_7.options[0].value = "Please pick an Internet Package"
				document.qdbform._fid_7.options[0].text = "Please pick an Internet Package"
				document.qdbform._fid_7.options[1].value = "No Internet";
				document.qdbform._fid_7.options[1].text = "No Internet";
				document.qdbform._fid_7.options[2].value = "1Mbps / 1Mbps";
				document.qdbform._fid_7.options[2].text = "[Residential] 1Mbps / 1Mbps | $37.50/month";
				document.qdbform._fid_7.options[3].value = "1Mbps / 1Mbps";
				document.qdbform._fid_7.options[3].text = "[Business] 1Mbps / 1Mbps | $47.50/month";
				document.qdbform._fid_7.options[4].value = "";
				document.qdbform._fid_7.options[4].text = "";
				document.qdbform._fid_7.options[5].value = "";
				document.qdbform._fid_7.options[5].text = "";
				document.qdbform._fid_7.options[6].value = "";
				document.qdbform._fid_7.options[6].text = "";
				document.qdbform._fid_7.options[7].value = "";
				document.qdbform._fid_7.options[7].text = "";
			}
			if(document.qdbform._fid_77.selectedIndex != 0 && document.qdbform._fid_77.selectedIndex != 1)
			{
				televisionOption = "No";
				telephoneOption = "Yes";
				document.qdbform._fid_7.options[0].value = "Please pick an Internet Package"
				document.qdbform._fid_7.options[0].text = "Please pick an Internet Package"
				document.qdbform._fid_7.options[1].value = "No Internet";
				document.qdbform._fid_7.options[1].text = "No Internet";
				document.qdbform._fid_7.options[2].value = "1Mbps / 1Mbps";
				document.qdbform._fid_7.options[2].text = "[Residential] 1Mbps / 1Mbps | $35/month";
				document.qdbform._fid_7.options[3].value = "1Mbps / 1Mbps";
				document.qdbform._fid_7.options[3].text = "[Business] 1Mbps / 1Mbps | $45/month";
				document.qdbform._fid_7.options[4].value = "";
				document.qdbform._fid_7.options[4].text = "";
				document.qdbform._fid_7.options[5].value = "";
				document.qdbform._fid_7.options[5].text = "";
				document.qdbform._fid_7.options[6].value = "";
				document.qdbform._fid_7.options[6].text = "";
				document.qdbform._fid_7.options[7].value = "";
				document.qdbform._fid_7.options[7].text = "";
			}
		}
	}
}

function dynamicRequired(){
	if(document.qdbform._fid_7.selectedIndex != 0 && document.qdbform._fid_7.selectedIndex != 1)
	{
		document.qdbform._fid_32.className = "required";
		document.qdbform._fid_34.className = "required";
		document.qdbform._fid_36.className = "required";

	}
		else
		{
			document.qdbform._fid_32.className = "";
			document.qdbform._fid_34.className = "";
			document.qdbform._fid_36.className = "";
		}
	if(document.qdbform._fid_6.selectedIndex==4)
	{
		document.qdbform._fid_68.className = "required";
		document.qdbform._fid_69.className = "required";
	}
		else
		{
		document.qdbform._fid_68.className = "";
		document.qdbform._fid_69.className = "";
		}
	if(document.qdbform._fid_77.selectedIndex != 0 && document.qdbform._fid_77.selectedIndex != 1)
	{
		document.qdbform._fid_81.className = "required";
		document.qdbform._fid_82.className = "required";
		document.qdbform._fid_83.className = "required";
		document.qdbform._fid_84.className = "required";
	}
	else
		{
			document.qdbform._fid_81.className = "";
			document.qdbform._fid_82.className = "";
			document.qdbform._fid_83.className = "";
			document.qdbform._fid_84.className = "";
		}
	}
function hidespanz(spanindex){
	var x = document.getElementsByTagName('SPAN');
	x[spanindex].style.display = 'none';
	}
function showspanz(spanindex){
	var x = document.getElementsByTagName('SPAN');
	x[spanindex].style.display = 'inline';
	}
function hideunhidecheck(){
	if(document.qdbform._fid_6.selectedIndex==1 || document.qdbform._fid_6.selectedIndex==2 || document.qdbform._fid_6.selectedIndex==3){
		hidespanz(1);
		hidespanz(4);
		}
	if(document.qdbform._fid_6.selectedIndex==4){
		showspanz(1);
		showspanz(4);
		}
	if(document.qdbform._fid_77.selectedIndex==1){
		hidespanz(2);
		}
	if(document.qdbform._fid_77.selectedIndex==2 || document.qdbform._fid_77.selectedIndex==3 || document.qdbform._fid_77.selectedIndex==4 || document.qdbform._fid_77.selectedIndex==5){
		showspanz(2);
		}
	if(document.qdbform._fid_7.selectedIndex==1){
		hidespanz(3);
		}
	if(document.qdbform._fid_7.selectedIndex==2 || document.qdbform._fid_7.selectedIndex==3 || document.qdbform._fid_7.selectedIndex==4 || document.qdbform._fid_7.selectedIndex==5 || document.qdbform._fid_7.selectedIndex==6 || document.qdbform._fid_7.selectedIndex==7){
		showspanz(3);
		}
	}

