

//********** On the FAQ page sets selected text to #FF9900 and all others to #COCOCO **********

function changeFocusFaq(whichFaq)
{
	document.getElementById("aHost").style.color = "#C0C0C0";
	document.getElementById("aHostCost").style.color = "#C0C0C0";
	document.getElementById("aMyHostingCost").style.color = "#C0C0C0";
	document.getElementById("aDomain").style.color = "#C0C0C0";
	document.getElementById("aPayment").style.color = "#C0C0C0";
	document.getElementById("aPaymentArrangements").style.color = "#C0C0C0";
	document.getElementById("aTemplateSoftware").style.color = "#C0C0C0";
	document.getElementById("aEditSite").style.color = "#C0C0C0";
	document.getElementById("aReuseDesigns").style.color = "#C0C0C0";
	document.getElementById("aFinishSite").style.color = "#C0C0C0";
	
	switch(whichFaq)
	{
		case "aHost": document.getElementById("aHost").style.color = "#FF9900";
			break;
		case "aHostCost": document.getElementById("aHostCost").style.color = "#FF9900";
			break;
		case "aMyHostingCost": document.getElementById("aMyHostingCost").style.color = "#FF9900";
			break;
		case "aDomain": document.getElementById("aDomain").style.color = "#FF9900";
			break;
		case "aPayment": document.getElementById("aPayment").style.color = "#FF9900";
			break;
		case "aPaymentArrangements": document.getElementById("aPaymentArrangements").style.color = "#FF9900";
			break;
		case "aTemplateSoftware": document.getElementById("aTemplateSoftware").style.color = "#FF9900";
			break;
		case "aEditSite": document.getElementById("aEditSite").style.color = "#FF9900";
			break;
		case "aReuseDesigns": document.getElementById("aReuseDesigns").style.color = "#FF9900";
			break;
		case "aFinishSite": document.getElementById("aFinishSite").style.color = "#FF9900";
			break;

	}
}

//********** On contestForm page validates the form to ensure the manditory fields are filled out **********
function validateContestForm()
{
	//If all of the mandatory fields are filled, continue with the submission
	if((document.contestForm.requestors_name.value != "") && (document.contestForm.company_name.value != "") && (document.contestForm.email_address.value != ""))
	{
		return true;
	}
	//If any of the mandatory fields are not filled, create a message for the user to complete the form and cancel the submission
	else
	{
		var message = "The following fields must be completed before submitting the form:\n\n";
	
		if(document.contestForm.requestors_name.value == "")
		{
			message += "Your Name";
		}
		if(document.contestForm.company_name.value == "")
		{
			message += "\nCompany Name (or write \"Personal Use\" if that's the case)";
		}
		if(document.contestForm.email_address.value == "")
		{
			message += "\nE-mail Address";
		}

		alert(message);
		
		return false;
	}
}


//********** On Price Quote Form page takes the values selected for the checkbox fileds and enters them into the coordinating hidden fields within the same form to be sent with the POST**********
function changeValue(currentObject, hiddenName, newValue)
{
	//Determine if user is unchecking the box and change the value back to "NA" if box is now unchecked
	if(!currentObject.checked)
		document.getElementById(hiddenName).value = "NA";
	//If the user has selected the box, change the value in the coordinating hidden field to match the orginal value
	else
		document.getElementById(hiddenName).value = newValue;
}

//********** On Price Quote Form page validates the form to ensure the manditory fields are filled out **********
function validateForm()
{
	//If all of the mandatory fields are filled, continue with the submission
	if((document.priceQuoteForm.requestors_name.value != "") && (document.priceQuoteForm.company_name.value != "") && (document.priceQuoteForm.email_address.value != ""))
	{
		return true;
	}
	//If any of the mandatory fields are not filled, create a message for the user to complete the form and cancel the submission
	else
	{
		var message = "The following fields must be completed before submitting the form:\n\n";
	
		if(document.priceQuoteForm.requestors_name.value == "")
		{
			message += "Your Name";
		}
		if(document.priceQuoteForm.company_name.value == "")
		{
			message += "\nCompany Name (or write \"Personal Use\" if that's the case)";
		}
		if(document.priceQuoteForm.email_address.value == "")
		{
			message += "\nE-mail Address";
		}

		alert(message);
		
		return false;
	}
}

//********** On Price Quote Form page verifies that the user really wants to reset the form **********
function allowReset()
{
	return window.confirm("Are you sure you want to reset the form?");
}

//********** On the Services page sets selected text to #FF9900 and all others to #COCOCO **********
function changeFocusServ(whichServ)
{
	document.getElementById("aGraphic").style.color = "#C0C0C0";
	document.getElementById("aLogo").style.color = "#C0C0C0";
	document.getElementById("aSeo").style.color = "#C0C0C0";
	document.getElementById("aCopy").style.color = "#C0C0C0";
	document.getElementById("aArrangements").style.color = "#C0C0C0";
	document.getElementById("aJava").style.color = "#C0C0C0";
	document.getElementById("aFlash").style.color = "#C0C0C0";
	document.getElementById("aTemplates").style.color = "#C0C0C0";
	document.getElementById("aSubmission").style.color = "#C0C0C0";
	document.getElementById("aMaintenance").style.color = "#C0C0C0";
	document.getElementById("aRegistration").style.color = "#C0C0C0";
	document.getElementById("aShopping").style.color = "#C0C0C0";
	document.getElementById("aForms").style.color = "#C0C0C0";

	switch(whichServ)
	{
		case "aGraphic": document.getElementById("aGraphic").style.color = "#00FF33";
			break;
		case "aLogo": document.getElementById("aLogo").style.color = "#00FF33";
			break;
		case "aSeo": document.getElementById("aSeo").style.color = "#00FF33";
			break;
		case "aCopy": document.getElementById("aCopy").style.color = "#00FF33";
			break;
		case "aArrangements": document.getElementById("aArrangements").style.color = "#00FF33";
			break;
		case "aJava": document.getElementById("aJava").style.color = "#00FF33";
			break;
		case "aFlash": document.getElementById("aFlash").style.color = "#00FF33";
			break;
		case "aTemplates": document.getElementById("aTemplates").style.color = "#00FF33";
			break;
		case "aSubmission": document.getElementById("aSubmission").style.color = "#00FF33";
			break;
		case "aMaintenance": document.getElementById("aMaintenance").style.color = "#00FF33";
			break;
		case "aRegistration": document.getElementById("aRegistration").style.color = "#00FF33";
			break;
		case "aShopping": document.getElementById("aShopping").style.color = "#00FF33";
			break;
		case "aForms": document.getElementById("aForms").style.color = "#00FF33";
			break;


	}
}
