$(document).ready(function(){
        jQuery.preloadImages = function() { for(var i = 0; i<arguments.length; i++) { jQuery("<img>").attr("src", arguments[i]); } }
		$.preloadImages("/images/testimonialsleftdown1.gif","/images/testimonialsleftdown2.gif","/images/testimonialsleftdown3.gif","/images/testimonialsleftdown4.gif","/images/testimonialsleftdown5.gif","/images/testimonialsleftright1.gif","/images/testimonialsleftright2.gif","/images/testimonialsleftright3.gif","/images/testimonialsleftright4.gif","/images/testimonialsleftright5.gif","/images/reveal1CHILD.png","/images/reveal1CHILD.gif","/images/reveal1PARENT.png","/images/reveal1PARENT.gif","/images/reveal2CHILD.png","/images/reveal2CHILD.gif","/images/reveal2PARENT.png","/images/reveal2PARENT.gif","/images/reveal3CHILD.png","/images/reveal3CHILD.gif","/images/reveal3PARENT.png","/images/reveal3PARENT.gif","/images/reveal4CHILD.png","/images/reveal4CHILD.gif","/images/reveal4PARENT.png","/images/reveal4PARENT.gif","/images/reveal5CHILD.png","/images/reveal5CHILD.gif","/images/reveal5PARENT.png","/images/reveal5PARENT.gif","/images/reveal6CHILD.png","/images/reveal6CHILD.gif","/images/reveal6PARENT.png","/images/reveal6PARENT.gif","/images/reveal7CHILD.png","/images/reveal7CHILD.gif","/images/reveal7PARENT.png","/images/reveal7PARENT.gif");
		$("#reveal1PARENT").hover(reveal1OPEN,reveal1SHUT);
		$("#reveal1CHILD").hover(reveal1OPEN,reveal1SHUT);
		$("#reveal2PARENT").hover(reveal2OPEN,reveal2SHUT);
		$("#reveal2CHILD").hover(reveal2OPEN,reveal2SHUT);
		$("#reveal3PARENT").hover(reveal3OPEN,reveal3SHUT);
		$("#reveal3CHILD").hover(reveal3OPEN,reveal3SHUT);
		$("#reveal4PARENT").hover(reveal4OPEN,reveal4SHUT);
		$("#reveal4CHILD").hover(reveal4OPEN,reveal4SHUT);
		$("#reveal5PARENT").hover(reveal5OPEN,reveal5SHUT);
		$("#reveal5CHILD").hover(reveal5OPEN,reveal5SHUT);
		$("#reveal6PARENT").hover(reveal6OPEN,reveal6SHUT);
		$("#reveal6CHILD").hover(reveal6OPEN,reveal6SHUT);
		$("#reveal7PARENT").hover(reveal7OPEN,reveal7SHUT);
		$("#reveal7CHILD").hover(reveal7OPEN,reveal7SHUT);
		$("#testimonialLEFT").hover(testimonialLEFTover,testimonialLEFTaway);
		$("#testimonialLEFT").click(testimonialLEFTclick);
		$("#testimonialRIGHT").hover(testimonialRIGHTover,testimonialRIGHTaway);
		$("#testimonialRIGHT").click(testimonialRIGHTclick);
});

			function calculate() {
				var yrs = parseInt(document.forms[0].years.value);
				var recs = parseInt(document.forms[0].records.value);
				if (recs > 0)
				{
					if (yrs > 0)
					{
						var badRecords = 0;

						for (var i=yrs; i>0; i--) {
								if (i >=4) badRecords += parseInt(recs/yrs);
								else badRecords += (parseInt((recs/yrs) * (.021 * i * 12)));
						}
						top.location="/baddata/index.jsp?records=" + badRecords + "&percentage=" + parseInt((badRecords / recs) * 100);
					} else {
						alert("Please enter an integer for years!");
					}
				} else {
					alert("Please enter an integer for records!");
				}

				
				
				
				return false;
			}

function reveal1OPEN(){ $("#reveal1PARENT").removeClass('reveal1OFF'); $("#reveal1PARENT").addClass('reveal1ON'); $("#reveal1CHILD").removeClass('noshow'); }
function reveal1SHUT(){ $("#reveal1PARENT").removeClass('reveal1ON'); $("#reveal1PARENT").addClass('reveal1OFF'); $("#reveal1CHILD").addClass('noshow'); }
function reveal2OPEN(){ $("#reveal2PARENT").removeClass('reveal2OFF'); $("#reveal2PARENT").addClass('reveal2ON'); $("#reveal2CHILD").removeClass('noshow'); }
function reveal2SHUT(){ $("#reveal2PARENT").removeClass('reveal2ON'); $("#reveal2PARENT").addClass('reveal2OFF'); $("#reveal2CHILD").addClass('noshow'); }
function reveal3OPEN(){ $("#reveal3PARENT").removeClass('reveal3OFF'); $("#reveal3PARENT").addClass('reveal3ON'); $("#reveal3CHILD").removeClass('noshow'); }
function reveal3SHUT(){ $("#reveal3PARENT").removeClass('reveal3ON'); $("#reveal3PARENT").addClass('reveal3OFF'); $("#reveal3CHILD").addClass('noshow'); }
function reveal4OPEN(){ $("#reveal4PARENT").removeClass('reveal4OFF'); $("#reveal4PARENT").addClass('reveal4ON'); $("#reveal4CHILD").removeClass('noshow'); }
function reveal4SHUT(){ $("#reveal4PARENT").removeClass('reveal4ON'); $("#reveal4PARENT").addClass('reveal4OFF'); $("#reveal4CHILD").addClass('noshow'); }
function reveal5OPEN(){ $("#reveal5PARENT").removeClass('reveal5OFF'); $("#reveal5PARENT").addClass('reveal5ON'); $("#reveal5CHILD").removeClass('noshow'); }
function reveal5SHUT(){ $("#reveal5PARENT").removeClass('reveal5ON'); $("#reveal5PARENT").addClass('reveal5OFF'); $("#reveal5CHILD").addClass('noshow'); }
function reveal6OPEN(){ $("#reveal6PARENT").removeClass('reveal6OFF'); $("#reveal6PARENT").addClass('reveal6ON'); $("#reveal6CHILD").removeClass('noshow'); }
function reveal6SHUT(){ $("#reveal6PARENT").removeClass('reveal6ON'); $("#reveal6PARENT").addClass('reveal6OFF'); $("#reveal6CHILD").addClass('noshow'); }
function reveal7OPEN(){ $("#reveal7PARENT").removeClass('reveal7OFF'); $("#reveal7PARENT").addClass('reveal7ON'); $("#reveal7CHILD").removeClass('noshow'); }
function reveal7SHUT(){ $("#reveal7PARENT").removeClass('reveal7ON'); $("#reveal7PARENT").addClass('reveal7OFF'); $("#reveal7CHILD").addClass('noshow'); }
function testimonialLEFTclick() {
	var _v1 = ($('#testimonialIMAGE1').css("display") == "none") ? false : true
	var _v2 = ($('#testimonialIMAGE2').css("display") == "none") ? false : true
	var _v3 = ($('#testimonialIMAGE3').css("display") == "none") ? false : true
	var _v4 = ($('#testimonialIMAGE4').css("display") == "none") ? false : true
	var _v5 = ($('#testimonialIMAGE5').css("display") == "none") ? false : true
	if (_v1) { $(this).addClass('testimonialLEFT1'); $(this).removeClass('testimonialLEFT2'); $(this).removeClass('testimonialLEFT3'); $(this).removeClass('testimonialLEFT4'); $(this).removeClass('testimonialLEFT5'); $('#testimonialIMAGE1').addClass('noshow'); $('#testimonialIMAGE2').removeClass('noshow'); $('#testimonialCOPY1').addClass('noshow'); $('#testimonialCOPY2').removeClass('noshow'); }
	if (_v2) { $(this).removeClass('testimonialLEFT1'); $(this).addClass('testimonialLEFT2'); $(this).removeClass('testimonialLEFT3'); $(this).removeClass('testimonialLEFT4'); $(this).removeClass('testimonialLEFT5'); $('#testimonialIMAGE2').addClass('noshow'); $('#testimonialIMAGE3').removeClass('noshow'); $('#testimonialCOPY2').addClass('noshow'); $('#testimonialCOPY3').removeClass('noshow'); }
	if (_v3) { $(this).removeClass('testimonialLEFT1'); $(this).removeClass('testimonialLEFT2'); $(this).addClass('testimonialLEFT3'); $(this).removeClass('testimonialLEFT4'); $(this).removeClass('testimonialLEFT5'); $('#testimonialIMAGE3').addClass('noshow'); $('#testimonialIMAGE4').removeClass('noshow'); $('#testimonialCOPY3').addClass('noshow'); $('#testimonialCOPY4').removeClass('noshow'); }
	if (_v4) { $(this).removeClass('testimonialLEFT1'); $(this).removeClass('testimonialLEFT2'); $(this).removeClass('testimonialLEFT3'); $(this).addClass('testimonialLEFT4'); $(this).removeClass('testimonialLEFT5'); $('#testimonialIMAGE4').addClass('noshow'); $('#testimonialIMAGE5').removeClass('noshow'); $('#testimonialCOPY4').addClass('noshow'); $('#testimonialCOPY5').removeClass('noshow'); }
	if (_v5) { $(this).removeClass('testimonialLEFT1'); $(this).removeClass('testimonialLEFT2'); $(this).removeClass('testimonialLEFT3'); $(this).removeClass('testimonialLEFT4'); $(this).addClass('testimonialLEFT5'); $('#testimonialIMAGE5').addClass('noshow'); $('#testimonialIMAGE1').removeClass('noshow'); $('#testimonialCOPY5').addClass('noshow'); $('#testimonialCOPY1').removeClass('noshow'); }
}
function testimonialLEFTover(){ $(this).addClass('div28'); $(this).removeClass('testimonialLEFT1'); $(this).removeClass('testimonialLEFT2'); $(this).removeClass('testimonialLEFT3'); $(this).removeClass('testimonialLEFT4'); $(this).removeClass('testimonialLEFT5'); }
function testimonialLEFTaway(){ $(this).removeClass('div28'); $(this).removeClass('testimonialLEFT1'); $(this).removeClass('testimonialLEFT2'); $(this).removeClass('testimonialLEFT3'); $(this).removeClass('testimonialLEFT4'); $(this).removeClass('testimonialLEFT5'); }
function testimonialRIGHTclick() {
	var _v1 = ($('#testimonialIMAGE1').css("display") == "none") ? false : true
	var _v2 = ($('#testimonialIMAGE2').css("display") == "none") ? false : true
	var _v3 = ($('#testimonialIMAGE3').css("display") == "none") ? false : true
	var _v4 = ($('#testimonialIMAGE4').css("display") == "none") ? false : true
	var _v5 = ($('#testimonialIMAGE5').css("display") == "none") ? false : true
	if (_v1) { $(this).addClass('testimonialRIGHT1'); $(this).removeClass('testimonialRIGHT2'); $(this).removeClass('testimonialRIGHT3'); $(this).removeClass('testimonialRIGHT4'); $(this).removeClass('testimonialRIGHT5'); $('#testimonialIMAGE1').addClass('noshow'); $('#testimonialIMAGE5').removeClass('noshow'); $('#testimonialCOPY1').addClass('noshow'); $('#testimonialCOPY5').removeClass('noshow'); }
	if (_v5) { $(this).removeClass('testimonialRIGHT1'); $(this).addClass('testimonialRIGHT2'); $(this).removeClass('testimonialRIGHT3'); $(this).removeClass('testimonialRIGHT4'); $(this).removeClass('testimonialRIGHT5'); $('#testimonialIMAGE5').addClass('noshow'); $('#testimonialIMAGE4').removeClass('noshow'); $('#testimonialCOPY5').addClass('noshow'); $('#testimonialCOPY4').removeClass('noshow'); }
	if (_v4) { $(this).removeClass('testimonialRIGHT1'); $(this).removeClass('testimonialRIGHT2'); $(this).addClass('testimonialRIGHT3'); $(this).removeClass('testimonialRIGHT4'); $(this).removeClass('testimonialRIGHT5'); $('#testimonialIMAGE4').addClass('noshow'); $('#testimonialIMAGE3').removeClass('noshow'); $('#testimonialCOPY4').addClass('noshow'); $('#testimonialCOPY3').removeClass('noshow'); }
	if (_v3) { $(this).removeClass('testimonialRIGHT1'); $(this).removeClass('testimonialRIGHT2'); $(this).removeClass('testimonialRIGHT3'); $(this).addClass('testimonialRIGHT4'); $(this).removeClass('testimonialRIGHT5'); $('#testimonialIMAGE3').addClass('noshow'); $('#testimonialIMAGE2').removeClass('noshow'); $('#testimonialCOPY3').addClass('noshow'); $('#testimonialCOPY2').removeClass('noshow'); }
	if (_v2) { $(this).removeClass('testimonialRIGHT1'); $(this).removeClass('testimonialRIGHT2'); $(this).removeClass('testimonialRIGHT3'); $(this).removeClass('testimonialRIGHT4'); $(this).addClass('testimonialRIGHT5'); $('#testimonialIMAGE2').addClass('noshow'); $('#testimonialIMAGE1').removeClass('noshow'); $('#testimonialCOPY2').addClass('noshow'); $('#testimonialCOPY1').removeClass('noshow'); }
}
function testimonialRIGHTover(){ $(this).addClass('div29'); $(this).removeClass('testimonialRIGHT1'); $(this).removeClass('testimonialRIGHT2'); $(this).removeClass('testimonialRIGHT3'); $(this).removeClass('testimonialRIGHT4'); $(this).removeClass('testimonialRIGHT5'); }
function testimonialRIGHTaway(){ $(this).removeClass('div29'); $(this).removeClass('testimonialRIGHT1'); $(this).removeClass('testimonialRIGHT2'); $(this).removeClass('testimonialRIGHT3'); $(this).removeClass('testimonialRIGHT4'); $(this).removeClass('testimonialRIGHT5'); }

function validateForm(a) {
	var msg = "";


	if (!isEmail(a.useremailaddress.value)) msg += "Invalid email address.\n";
	
	
	if (msg.length > 0) {
		alert(msg);
		return false;
	} else {
		return true;
	}
}

function isEmail(a)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(a))
	{
		return true;
	}
	else
	{
		return false;
	}
}