function showHide(id,img) {
	var moreID = document.getElementById(id);
	var imageID = document.getElementById(img);
	if (moreID.style.display == "block") {
		moreID.style.display = "none";
	} else {
		moreID.style.display = "block";
	}
}		

function showHide_faq(id) {
	var moreID = document.getElementById(id);
	if (moreID.style.display == "block") {
		moreID.style.display = "none";
	} else {
		moreID.style.display = "block";
	}
}	

function checkSelect(field) {
	field = "#" + field;
	useValue = $(field).val();								
	if(useValue != "") {
		document.getElementById('appointment_form').submit();
	} else {
		$('#fade').show();		
		Fat.fade_element('fade',null,null,null);
	}
}

function checkCheckbox(thisform) {	
	var apptPhysician = $("#office").find(":option-sel").val();
	var apptOffice = $("#office").find(":option-sel").attr("class");
	
	
	if(apptPhysician > 0) {
		document.getElementById('selectedPhysician').value = apptPhysician;
		document.getElementById('apptOffice').value = apptOffice;	
		
		document.getElementById('office').submit();	
	} else {
		$('#fade').show();		
		Fat.fade_element('fade',null,null,null);
	}	
	
	
	//alert(apptPhysician);	
	//alert(apptOffice);	
}

function checkTime(field) {	
	function get_radio_value() {
		for (var i=0; i < document.appointment_form.apptTime.length; i++) {
			if (document.appointment_form.apptTime[i].checked) {
				var rad_val = document.appointment_form.apptTime[i].value;
				return rad_val;
				
			}
		}
	}

	radioVal = get_radio_value();
	
	if(radioVal != undefined) {
		document.getElementById('appointment_form').submit();	
	} else {
		//alert(false);
		$('#fade').show();		
		Fat.fade_element('fade',null,null,null);
	}
}

function submit_form(s) {		
	document.getElementById('appointment_form').action='appointments.php?step=10&section='+s;
	window.document.getElementById('appointment_form').submit(); 
}

function FillBilling(f) {
	if(f.same.checked == true) {
	   		f.billing_firstname.value = f.firstname.value;
	   		f.billing_lastname.value = f.lastname.value;
	   		f.billing_address1.value = f.address1.value;
	   		f.billing_address2.value = f.address2.value;
	   		f.billing_city.value = f.city.value;
	   		f.billing_state.value = f.state.value;
	   		f.billing_zip.value = f.zip.value;
	    } else {			    	
	    	 f.billing_firstname.value = "";
	    	 f.billing_lastname.value = "";
	    	 f.billing_address1.value = "";
	    	 f.billing_address2.value = "";
	    	 f.billing_city.value = "";
	    	 f.billing_state.value = "";
	    	 f.billing_zip.value = "";
	  }
}

function overButton(id, img) {
	var imageID = document.getElementById(id);
	imageID.style.background="url(images/site/"+img+") no-repeat center center";
} 

function outButton(id, img) {
	var imageID = document.getElementById(id);
	imageID.style.background="url(images/site/"+img+") no-repeat center center";
} 

function setMenu(cSection) {
	title = "Physicianappt.com - ";
	
	if(cSection == "#link-medical") {
		$(cSection).find("div").addClass("active");
		$('#navlist').addClass("active");		
		//document.title = title + t;		
	} else {
		$(cSection).find("a").addClass("active");
		//document.title = title + t;	
	}
}

function load_physician_fees(physician) {
	new_window3 = window.open ("fee_physician_details.php?load="+physician,"mywindow","screenX=100,screenY=20,left=100,top=20',status=no,address=no,menubar=no,resizable=0,width=450,height=250,scrollbars=yes");
}

function load_bio(physician) {
	new_window1 = window.open ("pat_bio.php?load="+physician,"mywindow","screenX=100,screenY=20,left=100,top=20',status=no,address=no,menubar=no,resizable=0,width=400,height=400,scrollbars=yes");
}

function load_promo(physician) {
	new_window1 = window.open ("show_promo.php?load="+physician,"mywindow","screenX=100,screenY=20,left=100,top=20',status=no,address=no,menubar=no,resizable=0,width=400,height=400,scrollbars=yes");
}

function load_map(id) {
	new_window2 = window.open ("http://www.susdoctores.com/map.php?load="+id,"mywindow","screenX=100,screenY=20,left=100,top=20',status=no,address=no,menubar=no,resizable=1,width=518,height=400,scrollbars=yes");
}