
function ShowMenu(themenu){

	var el = document.getElementById(themenu);
	
	if (el){
		el.style.visibility = 'visible';
	}
}

function HideMenu(themenu){
	var el = document.getElementById(themenu);
	
	if (el){
		el.style.visibility = 'hidden';
	}
}

function offsite(url){
	var xpos = 0;
	var ypos = 0;
	var width=1024;
	var height=768;
	winOptions = 'toolbar=1,location=1,menubar=1,directories=1,screenx=' +  xpos + ',screeny='+ ypos + ',top='+ ypos +',left=' + xpos + ',status=1,menubar=1,scrollbars=1,resizable=1,width=' + width + ',height=' + height;
	var temp = window.open(url, '', winOptions);
	temp.focus();
}

function validateAmount(amount){
	if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){
		return true;
	}else{
		alert('You must enter a valid donation.');
		amount.focus();
		return false;
	}
}

function amountFocus(){
	theElement = document.getElementById("item_price_1");
	theElement.value = "";
	theElement.style.color='black'; 
}

function clearText(field){
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}

$(document).ready(function(){

	$($(".slider > a")).click(function () {
		$(this).next("div").slideToggle("fast");
	});

	$(".tab.last:not(.on)").hover(

      function () {
        	$("#menubar").addClass("on");
      }, 
      
	function () {
		if (!$(".last").hasClass(".on")){
			$("#menubar").removeClass("on");
      	}
	
	}

    );	


});



