function ShowMenu(themenu){

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

		if (themenu.substr(0,17)=='menu_our_services'){
			$('#field_proximity').addClass('hideSelects');
		}
	}
}

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

		if (themenu.substr(0,17)=='menu_our_services'){
			$('#field_proximity').removeClass('hideSelects');
		}

	}
}


function writeSwarm(){
	writeFlash({"height":"344","width":"520","pluginspage":"http://www.macromedia.com/go/getflashplayer","quality":"high","src":"http://www.swarminteractive.com/subscriptions/viewer.swf?client=1377"});
}

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_advanced > p > a")).click(function () {
		$("#advanced_search").slideToggle("fast");
	});

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

});



function clearText(field){

    if (field.defaultValue == field.value) field.value = '';

    else if (field.value == '') field.value = field.defaultValue;

}


function printPhysicianDirectory(){
	document.locator.action = "/includes/modules/physician_locator/pdf.html";
	//document.location.target = "_blank";
}

