// JavaScript Document
function validate()
	{
	var theForm = document.register;
	if (theForm.FirstName.value == '')
		{
		alert("Please enter your First Name");
		theForm.FirstName.focus();
		return false;
		}
	if (theForm.LastName.value == '')
		{
		alert("Please enter your Last Name");
		theForm.LastName.focus();
		return false;
		}
	if (theForm.Email.value == '')
		{
		alert("Please enter your Email address");
		theForm.Email.focus();
		return false;
		}
	return true;
	}
	
function validateComplaint()
	{
	var theForm = document.register;
	if (theForm.FirstName.value == '')
		{
		alert("Please enter your First Name");
		theForm.FirstName.focus();
		return false;
		}
	if (theForm.LastName.value == '')
		{
		alert("Please enter your Last Name");
		theForm.LastName.focus();
		return false;
		}
	if (theForm.Address.value == '')
		{
		alert("Please enter your Street Address");
		theForm.Address.focus();
		return false;
		}
	if (theForm.City.value == '')
		{
		alert("Please enter your City");
		theForm.City.focus();
		return false;
		}
	if (theForm.State.selectedIndex == 0)
		{
		alert("Please enter your State");
		return false;
		}
	if (theForm.Zip.value == '')
		{
		alert("Please enter your Zip Code");
		theForm.Zip.focus();
		return false;
		}
	if (theForm.Email.value == '')
		{
		alert("Please enter your Email address");
		theForm.Email.focus();
		return false;
		}
	if (theForm.Phone.value == '')
		{
		alert("Please enter your Phone Number");
		theForm.Phone.focus();
		return false;
		}
	if (theForm.Complaint.value == '')
		{
		alert("Please enter the details of your complaint");
		theForm.Complaint.focus();
		return false;
		}
	return true;
	}
	
function Book()
	{
	var theForm = document.register;
	if (theForm.FirstName.value == '')
		{
		alert("Please enter your First Name");
		theForm.FirstName.focus();
		return false;
		}
	if (theForm.LastName.value == '')
		{
		alert("Please enter your Last Name");
		theForm.LastName.focus();
		return false;
		}
	if (theForm.Address.value == '')
		{
		alert("Please enter your Street Address");
		theForm.Address.focus();
		return false;
		}
	if (theForm.City.value == '')
		{
		alert("Please enter your City");
		theForm.City.focus();
		return false;
		}
	if (theForm.State.selectedIndex == 0)
		{
		alert("Please enter your State");
		return false;
		}
	if (theForm.Zip.value == '')
		{
		alert("Please enter your Zip Code");
		theForm.Zip.focus();
		return false;
		}
	if (theForm.Email.value == '')
		{
		alert("Please enter your Email address");
		theForm.Email.focus();
		return false;
		}
	if (theForm.Phone.value == '')
		{
		alert("Please enter your Phone Number");
		theForm.Phone.focus();
		return false;
		}
	return true;
	}

/**************************************************/
/**  Function to show/hide Detail viewer div     **/
/**  set mode = '' to hide the layer             **/
/**  set mode = 'block' to display the layer     **/
/**************************************************/
var mode = 'none';
function toggleViewer(theDiv)
	{
	mode = (mode == 'block')? 'none' : 'block';
	if (document.getElementById)
		{
		// this is the way the standards work
		var style2 = document.getElementById(theDiv).style;
		style2.display = mode;
		}
	else if (document.all)
		{
		// this is the way old msie versions work
		var style2 = document.all[theDiv].style;
		style2.display = mode;
		}
	else if (document.layers)
		{
		// this is the way nn4 works
		var style2 = document.layers[theDiv].style;
		style2.display = mode;
		}
	}