function submitSearch() {
	document.mySearch.submit();
} 

function printPage() {
	if (window.print) {
		window.print()
	} else {
		alert("Sorry, your browser doesn't support this feature.\n" +
			  "Please use your browser's print button");
	}
}

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 readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function loadFont(bool) {
	var c = readCookie('fontSize');
	
	size = (c != 'small') ? '15px' : '12px';
	unavsize = (c != 'small') ? '14px' : '13px';
	
	//var a = document.getElementsByName("flexi");
	var a = document.getElementsByTagName("body");
	for (var i = 0; i < a.length; i++) { 
			a[i].style.fontSize = size; 
	}
	var a = document.getElementsByTagName("td");
	for (var i = 0; i < a.length; i++) { 
			a[i].style.fontSize = size; 
	}
	
	document.getElementById('nav').style.fontSize = unavsize;
}

function changeFont(bool) {
	var c = readCookie('fontSize');
	
	if (c) {
		size = (c != 'small') ? '12px' : '15px';
		newsize = (c != 'small') ? 'small' : 'large';
	} else {
		size = '15px';
		newsize = 'small';
	}
	
	unavsize = (c == 'small') ? '14px' : '13px';
	
	createCookie('fontSize',newsize,365);
	var a = document.getElementsByTagName("body");
	for (var i = 0; i < a.length; i++) { 
		a[i].style.fontSize = size; 
	}
	var a = document.getElementsByTagName("td");
	for (var i = 0; i < a.length; i++) { 
		a[i].style.fontSize = size; 
	}
	document.getElementById('contentText').style.fontSize = size;
	document.getElementById('threeBalloon').style.fontSize = size;
	document.getElementById('nav').style.fontSize = unavsize;
}

function deletePhysician(whichAction) {
    if(confirm("Are you sure you would like to remove your listing from the site?")) {
        document.forms['referralForm'].saction.value = whichAction;
        document.forms['referralForm'].submit();
    }
}

