// JavaScript Document

function showThis(showMe)
{
	document.getElementById('desc').style.display = 'none';
	document.getElementById('appl').style.display = 'none';
	document.getElementById('feat').style.display = 'none';
	document.getElementById('spec').style.display = 'none';
	document.getElementById('plan').style.display = 'none';
	document.getElementById(showMe).style.display = 'block';
}

//BEGIN///////////////////////////////////---->
//TOGGLE MENU CHOSEN: ////////////////////
//This will toggle chosen menu ///////////
//////////////////////////////////////////
var currentDisplay = 'mission';	
function toggleLegal(whichPage)
{
	//alert("whichPage: "+whichPage);
	//alert("what: "+what);
	
	//document.getElementById('bread').innerHTML=  whichPage;

	document.getElementById(currentDisplay).style.display = 'none';
	document.getElementById(whichPage).style.display = 'block';
	currentDisplay = whichPage;

}
//END/////////////////////////////////////<----
//TOGGLE MENU CHOSEN: ////////////////////
//This will toggle chosen menu ///////////
//////////////////////////////////////////

//BEGIN///////////////////////////////////---->
//VALIDATE FORM: /////////////////////////
//Validates the contact us form///////////
//////////////////////////////////////////

function validateContactUsForm(radioObj)
{
	var validInquiry = '';
	var validName = '';
	var validComment = '';
	var validEmail = '';
	if(!radioObj)
	{
		return false;
	}
	else
	{
		var radioLength = radioObj.length;
		for(var i = 0; i < radioLength; i++)
		{
			if(radioObj[i].checked)
			{
				var validInquiry = (radioObj[i].value);
			}
		}
	}
	validName = document.customerInquiry.Name.value;
	validEmail = document.customerInquiry.Email.value;
	validComment = document.customerInquiry.Comments.value;

	if(validInquiry == '' || validName == '' || validEmail == '' || validComment == '')
	{

		//alert('All fields with a * are required.\nPlease complete and submit again.\nThank you.');
		if(validInquiry == '')
		{
			document.getElementById('validInquiry').style.color = 'red';
		}
		else
		{
			document.getElementById('validInquiry').style.color = '';
		}

		if(validName == '')
		{
			document.getElementById('validName').style.color = 'red';
		}
		else
		{
			document.getElementById('validName').style.color = '';
		}

		if(validEmail == '')
		{
			document.getElementById('validEmail').style.color = 'red';
		}
		else
		{
			document.getElementById('validEmail').style.color = '';
		}

		if(validComment == '')
		{
			document.getElementById('validComment').style.color = 'red';
		}
		else
		{
			document.getElementById('validComment').style.color = '';
		}
		
		document.getElementById('requiredFields').style.color = 'red';
	}
	else
	{
		document.customerInquiry.submit();
	}

}


//END/////////////////////////////////////<----
//VALIDATE FORM: /////////////////////////
//Validates the contact us form///////////
//////////////////////////////////////////


