
function ShowMenu(themenu){

	var el = document.getElementById(themenu);
	
	if (el){
		el.style.visibility = 'visible';
		$('#field_proximity').addClass('hideSelects');
	}
}

function HideMenu(themenu){
	var el = document.getElementById(themenu);
	
	if (el){
		el.style.visibility = 'hidden';
		$('#field_proximity').removeClass('hideSelects');
		

	}
}

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'; 
}

$(document).ready(function(){

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

	$($("#locator > .slider_search > p > a")).click(function () {
		$("#advanced_search").slideToggle("fast");
	});

	$(".beryl_register").colorbox({iframe:true, innerWidth:600, innerHeight:400});

});

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

function changeHospital(){
	//if ($("#phys_loc_hosp").val()!=""){
		$("#phys_loc_frame").attr( "src", $("#phys_loc_hosp").val() );
	//}
}


