
function showdemo() { 

 $.fn.colorbox({iframe:true, href:"/assets/flash/mychart_20.swf", width:925, height:525, close:'Close'});



} 

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'; 
}


var newwindow;

function popwindow(url){
	newwindow=window.open(url,'Personal_Health_Record','width=930,height=500,menubar=yes,status=yes,location=yes,toolbar=no,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}

function createCookie(name,value,days) {

	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function selectLocation(theLocation, theDestination){
    if (theLocation != 'kentucky') {
    	createCookie("selectedLocation", theLocation, 365);
    }
    document.location.href = theDestination + "?selectedLocation=" + theLocation ;
}

google.setOnLoadCallback(function() {
	$(".health_assessment").colorbox({innerWidth:650, innerHeight:475, iframe:true, overlayClose:false});
	
}); 



