$(document).ready(function() {

  // any image with a 'toggle' class will toggle when you mouse over it
  // (unless it has the 'on' class, in which case it should stay on)
  $("img.toggle:not(.on)").hover(function() {
      var src = $(this).attr('src');
      src = src.replace(/_(on|off)\./, '_on.');
      $(this).attr('src', src);

    }, function() {
      var src = $(this).attr('src');
      src = src.replace(/_(on|off)\./, '_off.');
      $(this).attr('src', src);

    });
    
    $(document).ready(
		function(){					
			$('.fade').innerfade({
				speed: 1000,
				timeout: 5000,
				type: 'random_start',
				containerheight: '212px'
			});
	});
});

function validateContactData(){
	var s = "";
	with (document.frmContact) {
	if (Name.value.length == 0) {
		s += "\nPlease provide your name."
	}
	if (Phone.value.length == 0) {
		s += "\nPlease provide your phone number."
	}
	if (Comments.value.length == 0) {
		s += "\nPlease provide your reason for contacting us."
	}
	if (s.length==0) {
		with (document.frmContact) {
		} 
		return true;
	}
		else {
			alert("Your sign up could not be completed for the following reason(s):\n" + s);
			return false;
		}
	}
}

function validateMailInData(){
	var s = "";
	with (document.frmMailIn) {
	if (FirstName.value.length == 0) {
		s += "\nPlease provide your first name."
	}
	if (LastName.value.length == 0) {
		s += "\nPlease provide your last name."
	}
	if (Email.value.length == 0) {
		s += "\nPlease provide your email address."
	}
	if (Address1.value.length == 0) {
		s += "\nPlease provide your address."
	}
	if (City.value.length == 0) {
		s += "\nPlease provide your city."
	}
	if (State.value.length == 0) {
		s += "\nPlease provide your state."
	}
	if (Zip.value.length == 0) {
		s += "\nPlease provide your zip code."
	}
	if (Phone.value.length == 0) {
		s += "\nPlease provide your phone number."
	}
	if (AlternatePhone.value.length == 0) {
		s += "\nPlease provide your alternate phone number."
	}
	if (PhoneModel.value.length == 0) {
		s += "\nPlease provide your phone model."
	}
	if (ServiceProvider.value.length == 0) {
		s += "\nPlease provide your phone's service provider."
	}
	if (PhoneProblems.value.length == 0) {
		s += "\nPlease provide your phone problems in detail."
	}
	if (s.length==0) {
		with (document.frmMailIn) {
		} 
		return true;
	}
		else {
			alert("Your sign up could not be completed for the following reason(s):\n" + s);
			return false;
		}
	}
}