// *** BROWSER and VERSION Detection *** var agt = navigator.userAgent.toLowerCase(); var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); // Note: On IE5, the above will return 4, so use is.ie5up to detect IE5. // * Netscape Navigator var is_nav = ( (agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('webtv') == -1) && (agt.indexOf('opera') == -1) ); var is_nav2 = (is_nav && (is_major == 2)); var is_nav3 = (is_nav && (is_major == 3)); var is_nav4 = (is_nav && (is_major == 4)); var is_nav5 = (is_nav && (is_major == 5)); var is_nav4up = (is_nav && (is_major >= 4)); var is_nav5up = (is_nav && (is_major >= 5)); var is_navonly = ( is_nav && ( (agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1) ) ); // * MS IE var ms_pos = agt.indexOf("msie"); var ms_version = 0; if (ms_pos > -1) { ms_version = parseFloat(agt.substring(ms_pos + 4, ms_pos+9)); var vs_version_number = parseFloat(ms_version); } var is_ie = (agt.indexOf("msie") != -1); var is_ie3 = (is_ie && (is_major < 4)); var is_ie4 = (is_ie && (is_major == 4) && (ms_version == 4) ); var is_ie5 = (is_ie && (is_major == 4) && (ms_version == 5) ); var is_ie4up = (is_ie && (ms_version >= 4)); var is_ie5up = (is_ie && (!is_ie3) && (!is_ie4) && (ms_version >= 5)); if (!is_ie4up) { is_ie4up = is_ie5up; } // * AOL browser var is_aol = (agt.indexOf("aol") != -1); var is_aol3 = (is_aol && is_ie3); var is_aol4 = (is_aol && is_ie4); var is_aol5 = (is_aol && is_ie5); var is_aol4up = (is_aol4 || is_aol5); // * Opera browser var is_opera = (agt.indexOf("opera") != -1); // * blackberry browser var is_blackberry = (agt.indexOf("blackberry") != -1); // * playbook browser var is_playbook = (agt.indexOf("playbook") != -1); // * crowdcompass var is_crowdcompass = (agt.indexOf("crowdcompass") != -1); // ** Exit if not one of the supported, recognized browsers ** if ( !(is_ie4up || is_aol4up || is_nav4up || is_nav5up || is_opera || is_blackberry || is_playbook || is_crowdcompass) ) { window.location.href = "/lenos/UnsupportedBrowser.htm"; } // * Initialize this variables here. var ismaster = ""; var source=""; var HotelMessage=""; var BuildbyDates = "0"; var ValidatePage = "False"; var ValidationMessage =""; var zipmarkenable = "True"; // ******************* // Netscape Resize Fix if (is_nav4up) { if (document.layers) { var widthCheck = window.innerWidth var heightCheck = window.innerHeight window.onresize = resizeFix } function resizeFix() { if (widthCheck != window.innerWidth || heightCheck != window.innerHeight) location.href = location.href } } // ******************* // * Are these functions USED anymore?? function isBlank(s) { for (var i = 0; i < s.length; i++) { var c = s.charAt(i); if ((c != ' ') && (c !='\n') && (c !='\t')) return false; } return true; } function verify(f) { var emptyFields =""; var bHasValue = false; var bElemReq = "False"; for (var i = 0; i < f.length; i++) { var e = f.elements[i]; bHasValue = false; bElemReq = e.getAttribute("required"); if (bElemReq != null && (bElemReq == "True" || bElemReq == "required")) { if ((e.type == "") || (e.type == "text") || (e.type == "textarea") || (e.type == "password")) { if (e.getAttribute("parentid") != null) { bHasValue = CheckIsProgramSelected(f, e.getAttribute("parentid")); //first check if this is for the program field textboxes } else { if ((e.value != null) && (e.value != "") && !isBlank(e.value)) bHasValue = true; } } if (e.type == "select-one") { if (e.value != "0" && e.value != "") bHasValue = true; } if ((e.type == "select-multiple")) { for (var j = 0; j < e.options.length; j++) { if (e.options[j].selected) {bHasValue = true;} } } if ((e.type == "radio")||(e.type == "checkbox")) { if (e.getAttribute("parentid") != null) { bHasValue = CheckIsProgramSelected(f, e.getAttribute("parentid")); //first check if this is for the program field checkboxes } else { bHasValue = getIsRadioCheckBoxSelected(f, e.name); //then check for multiItems if (!bHasValue) { if (e.checked) {bHasValue = true;} //Check for single chk box } } } if (bHasValue == false) emptyFields += "\n " + e.getAttribute("display").replace("\\'","\'"); } } if (!emptyFields) return true; var msg; msg = ValidationMessage + "\n"; msg += emptyFields + "\n\n"; alert (msg); return false; } function getIsRadioCheckBoxSelected (f, chkrdGroupName) { var chkrditems = f.elements[chkrdGroupName]; if (chkrditems != "undefined") { for (var i=0; i < chkrditems.length; i++) { if (chkrditems[i].checked) return true; } } return false; } //This function iterates overs all fields to find the program field Checkboxes as each checkbox name is different in case of program field function CheckIsProgramSelected (f, parentid) { var disabled = true; for (var i = 0; i < f.length; i++) { var e = f.elements[i]; var curElemPID = e.getAttribute("parentid") if ((e.type == "checkbox" || e.type == "radio") && curElemPID == parentid) { if (!e.disabled){ disabled = false; if (e.checked) return true; } } if ((e.type == "" || e.type == "text") && curElemPID == parentid) { if (!e.disabled) { disabled = false; var regex = /^[0-9]+$/ if (regex.test(e.value)) return true; } } } return disabled; //this will return true if all the fields are disabled - to skip validation } function createLink(obj) { var sAddr = "SendNumber.asp?email=" + document.forms[0].email.value + "&lEventID=" + document.forms[0].xxvbEventID.value; window.location.href=sAddr ; } // ***************************** // * Functions for setting a DIV visible or invisible // ***************************** function setDivVisible(divname) { document.getElementById(divname).style.visibility = 'visible'; } function setDivInvisible(divname) { document.getElementById(divname).style.visibility = 'hidden'; }