
function preloadHomePage()
{
   if ( doesBrowserAllowImageChanges() )
   {
      toggleButton('credentials', 'images/credentials_main_button_off.gif');
      toggleButton('services', 'images/services_main_button_off.gif');
      toggleButton('tax_tip', 'images/taxtip_main_button_off.gif');
      toggleButton('contact', 'images/contact_main_button_off.gif');
      toggleButton('new_business', 'images/business_kit_main_button_off.gif');
   }
}

function toggleButton( name, image )
{
   if ( doesBrowserAllowImageChanges() )
   {
      document.images[ name ].src = image;
   }
}

function doesBrowserAllowImageChanges()
{
   return( (navigator.userAgent.substring(0,9) == "Mozilla/3")
           || (navigator.userAgent.substring(0,9) == "Mozilla/4") );
}

function validateClientListRequest(theForm)
{
	var errors        = false;
	var errorMessage  = "You have the following errors in your input:\n";

	// Page fields
	var information = theForm.elements["Information"].value;

	if ( information.length > 500 )
	{
		errors = true
		errorMessage = errorMessage + "\n - Information must be 500 characters or less.";
	}		

	if (errors)
	{
		alert(errorMessage);
		return false;
	}
	else
	{
		return true;
	}
}

