1function createWindow(what, where, how){ 2 var URL = where; 3 var windowName = what; 4 5 var tmpWin = window.open (URL, windowName, how); 6 tmpWin.focus(); 7} 8 9function validateCourtForm(objForm) { 10 var errMsg = ""; 11 if (objForm["COURT_MIN_PLAYERS"].value == 0 || objForm["COURT_MIN_PLAYERS"].value.length == 0) { 12 errMsg += "Minimum Players must be greater than 0 \r\n" 13 } 14 15 if (objForm["COURT_MAX_PLAYERS"].value == 0 || objForm["COURT_MAX_PLAYERS"].value.length == 0) { 16 errMsg += "Maximum Players must be greater than 0\r\n" 17 } 18 19 if (errMsg.length == 0) { 20 return true; 21 } 22 else { 23 alert(errMsg); 24 return false; 25 } 26} 27 28function FormValidate() { 29 var errMsg = ""; 30 var opts = null; 31 var txtEmail = null; 32 var bCanPost = false; 33 34 opts = document.getElementsByName("RESCOURT_RES_TYPE"); 35 txtEmail = document.getElementById("txtGuestEmail"); 36 37 if (opts.length == 0) { 38 bCanPost = true; 39 } 40 else { 41 for (var int = 0; int < opts.length; int++) { 42 if (opts[int].checked) { 43 bCanPost = true; 44 break; 45 } 46 } 47 if (!bCanPost) { 48 errMsg += "Please select a session type to continue.\r\n"; 49 } 50 } 51 52 if (txtEmail != null) { 53 if (txtEmail.value.length > 0) { 54 if (validateEmail(txtEmail.value) > 0) { 55 errMsg += "Please enter a valid email address in the format: [email protected]\r\n"; 56 txtEmail.focus(); 57 } 58 } 59 } 60 61 errMsg += calcResCount(); 62 63 if (errMsg.length == 0 && bCanPost) { 64 document.forms["frmReservation"].submit(); 65 } 66 else { 67 alert(errMsg); 68 return false; 69 } 70} 71 72function calcResCount() { 73 var objTextInterval = null; 74 var objTextEnds = null; 75 var objTextCount = null; 76 var objSelSlot = null; 77 var objSelDuration = null; 78 var arySplitTime = null; 79 var errMsg = ""; 80 81 objTextInterval = document.getElementById("txtInterval"); 82 objTextEnds = document.getElementById("txtEndTime"); 83 objTextCount = document.getElementById("txtRegCount"); 84 objSelSlot = document.getElementById("selTimeSlot"); 85 objSelDuration = document.getElementById("selTimeDuration"); 86 87 if (objSelSlot.length > 0) { 88 arySplitTime = objSelSlot.value.split("//"); 89 } 90 else { 91 errMsg += "Please select a start time.\r\n" 92 } 93 94 objTextCount.value = ((objSelDuration.value * 60) / objTextInterval.value); 95 96 if (objSelSlot.length > 0 && objSelDuration.length > 0) { 97 if (objTextCount.value.indexOf(".") != -1) { 98 errMsg += "The duration minutes must be the same as the start time interval!\nPlease reconfigure the settings.\r\n"; 99 } 100 } 101 102 if (((objSelDuration.value * 60) + parseInt(arySplitTime[1])) > parseInt(objTextEnds.value)) { 103 //alert((objSelDuration.value * 60) + parseInt(arySplitTime[1])); 104 errMsg += "Your duration exceeds the time available for this day.\nPlease select an earlier start time or a shorter duration.\r\n"; 105 } 106 107 return errMsg; 108} 109 110function openMemberUpload(userId, memberNumber) { 111 myWindow = window.open('/CommonNet/Members/MemberImage.aspx?UID=' + userId + '&MEMNUM=' + memberNumber + '', 'MemberUpload', 'width=800,height=800,resizable=1'); 112 myWindow.focus(); 113} 114 115function openMemberImageUpload(userId, memberNumber, isMobileSession) { 116 alert("This has been disabled. Please contact your club for assitance.") 117} 118 119function removeAC() { 120 $('form').each(function () { 121 var action = $(this).attr('action'); 122 if (action != undefined && action.toString().toLowerCase().indexOf("login") > -1) { 123 $(this).attr('autocomplete', 'off'); 124 } 125 }); 126} 127 128$(document).ready(function () { 129 removeAC(); 130}); 131 132 133function showAttendeeView(inFac) { 134 var thisFID = +inFac 135 if (isNaN(inFac) || inFac < 1) { 136 thisFID = $('#select_facility').val(); 137 } 138 139 var thisDate = $('#select_date').val(); 140 if (thisDate == undefined) { 141 thisDate = ''; 142 } 143 var thisTime = $('#select_time').val(); 144 if (thisTime == undefined) { 145 thisTime = ''; 146 } 147 148 var tmpLoc = "/club/scripts/facilities/View_Dining_Attendees.asp?FID=" + thisFID + "&date=" + thisDate + "&time=" + thisTime
149 var tmpHow = "resizable=1,left=0,top=0,width=700,height=700,scrollbars=1,toolbar=0,menubar=0" 150 createWindow('AttendeeView', tmpLoc, tmpHow); 151}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.