 // Put all your code in your document ready area
 jQuery(document).ready(function($){
	$("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);

    });
    
    $('#close_scroll_text').click(function() {
	
		$(this).hide();
		$('.jScrollPaneContainer').slideUp('slow');
		
		$('#open_scroll_text').show();
		return false;
	});
	
	$('#open_scroll_text').click(function() {
	
		$(this).hide();
		$('.jScrollPaneContainer').slideDown('slow');
		$('#close_scroll_text').show();
		return false;
	});
	
	jQuery(document).ready(
		function(){					
			$('.fade').innerfade({
				speed: 1000,
				timeout: 3000,
				type: 'random_start',
				containerheight: '84px'
			});
	});
	
	jQuery(
		function()
		{
			jQuery('.makeScroll').jScrollPane({showArrows:true, scrollbarWidth:30});
		}
	);

});

function validateContactData(){
	var s = "";
	with (document.frmContact) {
	if (FirstName.value.length == 0) {
		s += "\nPlease provide your full name."
	}
	if (LastName.value.length == 0) {
		s += "\nPlease provide your full name."
	}
	if (Email.value.length == 0) {
		s += "\nPlease provide your email address."
	}
	if (Comments.value.length == 0) {
		s += "\nPlease tell us 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 validateContactDataSpanish(){
	var s = "";
	with (document.frmContact) {
	if (FirstName.value.length == 0) {
		s += "\nFavor de darnos su nombre completo."
	}
	if (LastName.value.length == 0) {
		s += "\nFavor de darnos su nombre completo."
	}
	if (Email.value.length == 0) {
		s += "\nFavor de darnos su direccion de correo."
	}
	if (Comments.value.length == 0) {
		s += "\nFavor de decirnos su razon para contactarnos."
	}
	if (s.length==0) {
		with (document.frmContact) {
		} 
		return true;
	}
		else {
			alert("Su informacion no se pudo procesar por las siguientes razones:\n" + s);
			return false;
		}
	}
}
