function an_toggleDisplay(index) {
	// This function will display a certain object in a series, and hide all others.
	//  It takes the index of the object to show as its first argument and
	//  the base ID name (ie. the ID minues the index number) of the objects as
	//  it's second (and third, fourth, etc..) argument.
	//  Example: an_toggleDisplay(2, "testA", "testB") will show "testA2" and "testB2"
	//   but hide all other "testA#" and "testB#" objects.
	//  It toggles between display types "none" and "block" only.
	//  Indexes start at 0, not 1.
	for(var n = 1; n < an_toggleDisplay.arguments.length; n++) {
		var i = 0;
		var baseID = an_toggleDisplay.arguments[n];
		var t = document.getElementById(baseID+i);
		while (t) {
			t.style.display = "none";
			i++;
			t = document.getElementById(baseID+i);
		}
		t = document.getElementById(baseID+index);
		if (t) { t.style.display="block"; }
	}
}


function checkForm(dataForm){

if (dataForm.requiredName.value==""){

	alert("Please Enter Your Name");

	dataForm.requiredName.focus();

	return false;}

if (dataForm.requiredTelephone.value==""){

	alert("Please Enter Your Telephone Number");

	dataForm.requiredTelephone.focus();

	return false;}

if (dataForm.requiredEmail.value==""){

	alert("Please Enter Your Email Address");

	dataForm.requiredEmail.focus();

	return false;}

if (dataForm.requiredComments.value==""){

	alert("Please Enter Your Message");

	dataForm.requiredComments.focus();

	return false;}
return true;

}

function checkrequired(which) {

	var pass=true;

	if (document.images) {

		for (i=0;i<which.length;i++) {

			var tempobj=which.elements[i];

			if (tempobj.name.substring(0,8)=="required") {
			
				if (((tempobj.type=="text"||tempobj.type=="textarea")&&

				tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&

				tempobj.selectedIndex==0)) {

					pass=false;
		
					break;

         		}

      		}

  		 }

	}

	if (!pass) {

		shortFieldName=tempobj.name.substring(8,30).toUpperCase();

		alert("Please make sure the "+shortFieldName+" field was properly completed.");

		return false;
	
	}

	else

	return true;

}
