<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form" %>
<script src="../../js/AJAXSupport.js" type="text/javascript"></script>
<style>
	.dialogBox {
	background-image:url(images/grey-white-stripple.jpg);
	border: 1px solid #B4B4B4;
	border-collapse: collapse;
	border-spacing: 0;
}
</style>
<script>
	function submitSeniorStaff(){
		
	 	if(confirm('Are you sure you want to submit response?')){
		 	var selection = document.getElementsByName('radio');
		 	var isAnyRadioChecked = false;
			for (i=0; i<selection.length; i++){
				if (selection[i].checked == true){
				  document.getElementById('primaryClinician').value = selection[i].value;
				  isAnyRadioChecked = true;
				 }
			}
			if(isAnyRadioChecked){
				document.getElementById("actionRequired").value = "save";
				preSubmit();
				document.getElementById("consultationNote").submit();
				disablePopup("seniorStaffID", "seniorStaffTable");
				openProgressPopupWindow();
			}else{
				alert("Please select a primary clinician");
			}
	 		
	 	}
	 }
	 
</script>
<form>
<div id="seniorStaffID" class="pacsContentPopup"
	style="display: none;">
	<table  class="dialogBox" cellpadding="4" border="0" width="100%">
			<tr class="tableHeader">
				<th class="tableColHeader">Choose a Primary Clinician:</th>
				<th align="right">
					<a id="printPopupClose" class="popupContactClose"
					onclick="disablePopup('seniorStaffID','seniorStaffTable');"
					style="color: red;">x</a>
				</th>
			</tr>
			
		</table>
		<table  class="dialogBox" align="center" border="0" width="100%"
			bgcolor="white"  style="height:80%">
			<tr valign="top"><td><br/>
				<table align="center" border="0" width="100%" id="seniorStaffTable"
					bgcolor="white">
					<tr><td width="10"></td></tr>
					<tr><td width="10"></td></tr>
				</table>
			</td></tr>
			<tr><td align="right">
				<input type="button" value="Continue" onclick="submitSeniorStaff()"/>
			</td></tr>
		</table>
</div>
</form>

