window.history.forward(1); //************************************ //ported from prototype_js.aspx //************************************ String.prototype.endsWith = function(str) { return (this.match(str+"$")==str) } String.prototype.truncRight = function(int) { return (this.substr(0,this.length-int)) } String.prototype.truncLeft = function(int) { return (this.substr(int,this.length-int)) } String.prototype.rightTrim = function() { return( this.replace(new RegExp("[\\s]+$", "gm"), "") ); } String.prototype.startsWith = function(str) { return (this.indexOf(str)==0) } String.prototype.trim = function() { return (this.replace(/^[\s\xA0]+/, "").replace(/[\s\xA0]+$/, "")) } String.prototype.leftTrim = function() { return( this.replace(new RegExp("^[\\s]+", "gm"), "") ); } String.prototype.isEmpty = function() { return(this.trim().length == 0); } //try //{ //HTMLElement.prototype.__defineGetter__("outerHTML", function() { // var span = document.createElement("span"); span.appendChild(this.cloneNode(true)); // return span.innerHTML; //}); // //HTMLElement.prototype.__defineSetter__("outerHTML", function(html) { // var range = document.createRange(); // this.innerHTML = html; // range.selectNodeContents(this); // var frag = range.extractContents(); // this.parentNode.insertBefore(frag, this); // this.parentNode.removeChild(this); //}); //}catch(e){} //************************************ //ported from no_hotkeys.js //************************************ // 04/28/2006 - MA - Disables control N and Control R Hotkeys (MSIE Only) // 05/23/2006 - MA - fixed disabling of n & r after ctrl is hit // 05/23/2006 - MA - 13161 - time out ctrl key after 15 seconds in case of a off window release var ctrlTimer var manufacturer=navigator.appName.toLowerCase(); if (manufacturer.indexOf('microsoft') >= 0) { document.onkeydown = keyDown; document.onkeyup = keyUp; } var lastKeyDown = ''; var ctrlDown = false; var altDown = false; var shiftDown = false; function keyUp() { try { if(window.event && window.event.keyCode == 16) { shiftDown = false; } if(window.event && window.event.keyCode == 17) { resetCtrl(); return false; } if(window.event && window.event.keyCode == 18) { altDown = false; } } catch(e) { } } function resetCtrl() { ctrlDown = false; if (ctrlTimer == null) { try { clearTimeout(ctrlTimer); } catch(e){} } } function disableBackButton() { window.history.forward() } disableBackButton(); function keyDown() { try { if (window.event.keyCode == 8) { disableBackButton(); //alert(document.focused) //return false; } if(window.event && window.event.keyCode == 16) { shiftDown = true; } if(window.event && window.event.keyCode == 18) { altDown = true; } if(window.event && window.event.keyCode == 17) { ctrlDown = true; setTimeout('resetCtrl()',15000) return false; } if (ctrlDown == true && altDown == true & shiftDown == true) { if(window.event && window.event.keyCode == 66) { shiftDown = false; altDown = false; ctrlDown = false; se_appframe().toggle_bg_submit(); return false; } } if(ctrlDown == true) { //R if(window.event && window.event.keyCode == 82) { return false; } //N if(window.event && window.event.keyCode == 78) { return false; } //S if(window.event && (window.event.keyCode == 83 || window.event.keyCode == 115)) { try{ se_appframe().save_hotkey(); return false; } catch(e){}; } } else { } } catch(e) { } } var mod_height = 16; var mod_width = 140; var bln_mod_initialized = false; var mod_html= ''; //var date_format_html = '
Date Format:
'; var mod_oPopup; try{mod_oPopup = window.createPopup();}catch(e){} var mod2_oPopup; try{mod2_oPopup = window.createPopup();}catch(e){} function alter_mouseovers(form,prefix,event_1,event_call_1,event_2,event_call_2) { if (mod_oPopup) { var str_type = ''; var obj,att for (var x = 0;x= prefix.length) { if (form.elements[x].name.substr(0,prefix.length).toLowerCase() == prefix.toLowerCase()) { obj = form.elements[x] att = obj.attributes.getNamedItem("onchange").value; addEvent( obj, event_1, function(){eval(event_call_1)}); addEvent( obj, event_2, function(){eval(event_call_2)}); } } } } } } function add_obj_event(obj,event,event_call) { addEvent( obj, event, function(){eval(event_call)}); } //var bln_date_format_has_been_set = false; var ary_initialized_date_fields = new Array(); function show_date_format_tooltip(el) { if (jQuery.inArray(el, ary_initialized_date_fields) == -1) { add_date_hover(el); } // if (bln_date_format_has_been_set == false) // { // document.getElementById('did_date_format_display_field').innerHTML = ''; // bln_date_format_has_been_set = true; // } // // menuLayers.showUnderElement('did_date_format_menu',el,true) // //show_chromeless_html_by_element(innerHTML,140,16,el) } function hide_date_format_tooltip() { // menuLayers.hideDelayed('did_date_format_menu',100) } function initialize_mod() { try{ if (bln_mod_initialized == false) { if (!mod_oPopup) { try{mod_oPopup = window.createPopup();}catch(e){} } var doc = mod_oPopup.document; var html = ''; doc.open(); doc.write(html); doc.close(); if (!mod2_oPopup) { try{mod2_oPopup = window.createPopup();}catch(e){} } doc = mod2_oPopup.document; var html = ''; doc.open(); doc.write(html); doc.close(); bln_mod_initialized = true; } } catch(e){} } function set_mod(html_snippit,w,h) { initialize_mod(); mod_html = html_snippit; mod_width = w; mod_height = h; } function show_chromeless_html_by_element(html_snippit,w,h,element,topDisplay) { set_mod(html_snippit,w,h) show_ie_note(element,topDisplay); } function show_chromeless_html_by_xy(html_snippit,w,h,x,y) { set_mod(html_snippit,w,h) show_ie_note_xy(x,y) } function hide_chromeless() { try { mod_oPopup.hide(); mod2_oPopup.hide(); } catch(e){}; } function show_ie_note(el,topDisplay) { var topshow = false if (arguments.length > 1) { topshow = topDisplay; } var positions = findPos(el) var x = positions[0] var y = event.screenY if (topshow == true) { y = y - window.screenTop y = y - (el.offsetHeight + window.event.offsetY) } else y = y - window.screenTop + (el.offsetHeight - window.event.offsetY) show_ie_note_xy(x,y); } function show_ie_note_xy(x,y) { var oPopBody = mod_oPopup.document.body; oPopBody.innerHTML = mod_html mod_oPopup.show(x, y, mod_width, mod_height, document.body); } function addEvent( obj, type, fn ) { try { if ( obj.attachEvent ) { obj['e'+type+fn] = fn; obj[type+fn] = function(){obj['e'+type+fn]( window.event );} obj.attachEvent( 'on'+type, obj[type+fn] ); } else { obj.addEventListener( type, fn, false ); } } catch(e) { } } function removeEvent( obj, type, fn ) { if ( obj.detachEvent ) { obj.detachEvent( 'on'+type, obj[type+fn] ); obj[type+fn] = null; } else { obj.removeEventListener( type, fn, false ); } } function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } function limitText(field,maxlength) { try { if (field.value.length <= maxlength) return ; field.value = field.value.substring(0,maxlength) alert('Maximum Length Exceeded') } catch(e){} } function attach_counter(formname,maxlength) { itemType = item.type; if (itemType == null) itemType = item[0].type; if ((itemType == "text" ) || (itemType == "textarea")) { } } function show_chromeless_processing(text) { var width = 301 var height = 45 var x=350 var y= 200; var html = '' html += '' html += '' html += '' html += '' html += '' html += '' html += '' html += '' html += '' html += '' html += '' html += '' html += '' html += '
' + text + '
' set_mod(html,width,height) var oPopBody = mod2_oPopup.document.body; oPopBody.innerHTML = mod_html mod2_oPopup.show(x, y, mod_width, mod_height, document.body); } //************************************ //ported from memu_pop.js //************************************ viewport = { getWinWidth: function () { this.width = 0; if (window.innerWidth) this.width = window.innerWidth - 18; else if (document.documentElement && document.documentElement.clientWidth) this.width = document.documentElement.clientWidth; else if (document.body && document.body.clientWidth) this.width = document.body.clientWidth; }, getWinHeight: function () { this.height = 0; if (window.innerHeight) this.height = window.innerHeight - 18; else if (document.documentElement && document.documentElement.clientHeight) this.height = document.documentElement.clientHeight; else if (document.body && document.body.clientHeight) this.height = document.body.clientHeight; }, getScrollX: function () { this.scrollX = 0; if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset; else if (document.documentElement && document.documentElement.scrollLeft) this.scrollX = document.documentElement.scrollLeft; else if (document.body && document.body.scrollLeft) this.scrollX = document.body.scrollLeft; else if (window.scrollX) this.scrollX = window.scrollX; }, getScrollY: function () { this.scrollY = 0; if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset; else if (document.documentElement && document.documentElement.scrollTop) this.scrollY = document.documentElement.scrollTop; else if (document.body && document.body.scrollTop) this.scrollY = document.body.scrollTop; else if (window.scrollY) this.scrollY = window.scrollY; }, getAll: function () { this.getWinWidth(); this.getWinHeight(); this.getScrollX(); this.getScrollY(); } } function menuLayer() { //this.timer=null; this.activeMenuID= null; this.offX= 19; this.offY= -11; this.reset_row_id= null; this.close_script = ''; this.findPos = function(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } this.showUnderElement = function (id,el,keepVisible) { var positions = this.findPos(el); var x = positions[0] +1; var y = positions[1] + el.offsetHeight + 1; this.showXY(id,x,y,keepVisible) } this.show = function(id, e) { var mnu = document.getElementById? document.getElementById(id): null; if (!mnu) return; this.prep_show(mnu,id,false) viewport.getAll(); this.position(mnu,e); } this.showXY = function(id, x,y,keepVisible) { var mnu = document.getElementById? document.getElementById(id): null; if (!mnu) return; this.prep_show(mnu,id,keepVisible) viewport.getAll(); mnu.style.left = x + "px"; mnu.style.top = y + "px"; //this.timer = setTimeout("menuLayers.set_visible(" + x + ")", 0); } this.set_visible = function(x) { var mnu = document.getElementById? document.getElementById(this.activeMenuID): null; menuLayers.setStyle(this.activeMenuID,'visible') if (x + mnu.offsetWidth > viewport.width) { mnu.style.left = viewport.width-mnu.offsetWidth -5 } } this.prep_show = function(mnu,id,keepVisible) { if (this.activeMenuID != null) { //this.clearTimer(); if (this.activeMenuID != id) { //document.getElementById(this.activeMenuID).style.visibility='hidden'; this.setStyle(this.activeMenuID ,'hidden'); } } this.activeMenuID = id; //if ( mnu.onmouseover == null ) mnu.onmouseover = this.clearTimer; //if (keepVisible != true) //{ // if ( mnu.onmouseout == null ) mnu.onmouseout = this.mouseoutCheck; //} //else //{ // //this.clearTimer(); //} } this.hideDelayed = function(id,ms_delay) { //this.clearTimer(); if (id && document.getElementById(id)) { //this.timer = setTimeout("menuLayers.setStyle('" + id + "','hidden');menuLayers.reset_row();menuLayers.exec_close_script();", ms_delay); } } this.hideQuick = function() { this.hideDelayed(this.activeMenuID,10); } this.hideMenu = function(id) { this.hideDelayed(id,500); } this.hide = function() { this.hideMenu(this.activeMenuID); } this.exec_close_script = function() { if (this.close_script != '') { eval(this.close_script); this.close_script = ''; } } this.position = function(mnu, e) { var x = e.pageX? e.pageX: e.clientX + viewport.scrollX; var y = e.pageY? e.pageY: e.clientY + viewport.scrollY; if ( x + mnu.offsetWidth + this.offX > viewport.width + viewport.scrollX ) x = x - mnu.offsetWidth - this.offX; else x = x + this.offX; if ( y + mnu.offsetHeight + this.offY > viewport.height + viewport.scrollY ) { //on bottom of screen, display upward y = ( y - mnu.offsetHeight - this.offY > viewport.scrollY )? y - mnu.offsetHeight - this.offY : viewport.height + viewport.scrollY - mnu.offsetHeight; } else { //display downward y = y + this.offY; } mnu.style.left = x + "px"; mnu.style.top = y + "px"; //this.timer = setTimeout("menuLayers.setStyle('" + menuLayers.activeMenuID + "','visible')", 250); } //this.mouseoutCheck = function(e) //{ // e = e? e: window.event; // var mnu = document.getElementById(menuLayers.activeMenuID); // var toEl = e.relatedTarget? e.relatedTarget: e.toElement; // if ( mnu != toEl && !menuLayers.contained(toEl, mnu) ) menuLayers.hide(); //} this.contained = function(oNode, oCont) { if (!oNode) return; while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true; return false; } this.clearTimer = function() { if (menuLayers.timer) clearTimeout(menuLayers.timer); } this.setStyle = function(menuname,visibility) { var el = document.getElementById(menuname); try{el.filters[0].Apply();}catch(e){} if (visibility == "visible") { el.style.visibility = "visible"; try{el.filters.revealTrans.transition=5; }catch(e){} } else { el.style.visibility = "hidden"; try{el.filters[0].transition=4; }catch(e){} } try{el.filters[0].Play(); }catch(e){} } this.set_row_height = function(row_id, int_height) { row_id.height = int_height; this.reset_row_id = row_id; } this.reset_row = function () { if (this.reset_row_id != null) this.reset_row_id.height = ''; } } var menuLayers = new menuLayer(); //************************************ //end porting. New code below //************************************ var ary_global_input_fields = new Array(); function set_date_hovers(type) { var fields = get_date_fields() if (fields.length > 0) { for (var xc = 0; xc < fields.length; xc++) { //addEvent(fields[xc], 'focus', function() { eval('show_date_format_tooltip(this);') }); //addEvent(fields[xc], 'blur', function() { eval('hide_date_format_tooltip();') }); add_date_hover(fields[xc]); } } set_input_hovers() } function add_date_hover(obj_field) { var str_date_format = ''; str_date_format = (str_date_format == '') ? 'm/d/yy' : str_date_format; $(obj_field).removeClass('hasDatepicker'); $(obj_field).datepicker({ prevText: '', nextText: '', dateFormat: str_date_format, dayNames: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], dayNamesShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'], dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], monthNames: ['January','February','March','April','May','June','July','August','September','October','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], beforeShow:function(input, inst) { if ($(input).is('[readonly]') == true) { return false; } } }); //var dt_format = '' //if (dt_format == ''){dt_format = 'mm/dd/yyyy'} //new Pikaday({ field: obj_field, format: dt_format, i18n: js_obj_locale }) //addEvent(obj_field, 'focus', function() { eval('show_date_format_tooltip(this);') }); //addEvent(obj_field, 'blur', function() { eval('hide_date_format_tooltip();') }); ary_initialized_date_fields[ary_initialized_date_fields.length] = obj_field; } function set_input_hovers() { try { if (ary_global_input_fields.length > 0) { for (var xc = 0; xc < ary_global_input_fields.length; xc++) { //alert(ary_global_input_fields[xc].name) var name = ary_global_input_fields[xc].name //alert(ary_global_input_fields[xc].parentNode.id) //alert(ary_global_input_fields[xc].parentNode.id) if (ary_global_input_fields[xc].parentNode != get_elements_form_object(name) && ary_global_input_fields[xc].parentNode != document && ary_global_input_fields[xc].parentNode != document.body && ary_global_input_fields[xc].parentNode != window) { setTitleToContent(name); add_obj_event(ary_global_input_fields[xc].parentNode,'mouseover','setTitleToContent(\'' + name + '\');') } } } }catch(e){} } function get_elements_form_object(str_element_name) { for (var i = 0;i< document.forms.length ;i++) { el = document.forms[i].elements[str_element_name] if (el != null) { return document.forms[i] } } return null; } function get_form_element(str_element_name) { var el = null; for (var i = 0;i< document.forms.length ;i++) { el = document.forms[i].elements[str_element_name] if (el != null) { return el; } } return null; } function hide_content_tooltip() { menuLayers.hideQuick() } function show_content_tooltip(str_element_name) { menuLayers.hideQuick() var el = get_form_element(str_element_name); if (el == null){return} if (el.disabled == true) { var str_display = ''; switch (el.type.toLowerCase()) { case 'textarea': str_display = el.value; case 'text': str_display = el.value; break; case 'select-one': try { str_display = el.options[el.selectedIndex].text; } catch (ex) { str_display = ''; } break; } if (str_display != ''){ document.getElementById('did_hidden_content_display').innerHTML = '' + str_display + ''; menuLayers.showUnderElement('did_hidden_content_display',el,false) } } } function setTitleToContent(str_element_name) { var el = get_form_element(str_element_name); if (el == null){return} if (el.disabled == true) { var str_display = ''; switch (el.type.toLowerCase()) { case 'textarea': str_display = el.value; case 'text': str_display = el.value; break; case 'select-one': try { str_display = el.options[el.selectedIndex].text; } catch (ex) { str_display = ''; } break; } if (el.getAttribute('title') != str_display) { el.setAttribute('title', str_display); } } } function get_date_fields() { var retVal = new Array(); var elems = document.getElementsByTagName("input"); var starts_with_regex = new RegExp('^dt_', 'i'); var ends_with_regex = new RegExp('_dt$', 'i'); var starts_with_regex2 = new RegExp('^date_', 'i'); var ends_with_regex2 = new RegExp('date$', 'i'); var mid_regex = new RegExp('_date_', 'gi'); var mid_regex2 = new RegExp('_dt_', 'gi'); var regex_money1 = new RegExp('_amount', 'gi'); var regex_money2 = new RegExp('^amount_', 'i'); var regex_money3 = new RegExp('^mny_', 'i'); var regex_money4 = new RegExp('_mny$', 'i'); var regex_money5 = new RegExp('_mny_', 'gi'); for (var i = 0; i < elems.length; i++) { if ($(elems[i]).attr("nocal") == null) { var str_field_name = elems[i].getAttribute('name'); if (str_field_name != null) { if (str_field_name.match(starts_with_regex) != null || str_field_name.match(ends_with_regex) != null || str_field_name.match(starts_with_regex2) != null || str_field_name.match(ends_with_regex2) != null || str_field_name.match(mid_regex) != null || str_field_name.match(mid_regex2) != null) { retVal.push(elems[i]); } else { if(elems[i].type == 'text' || elems[i].type == 'textarea') { //alert(str_field_name + '|' + str_field_name.match(regex_money1)) if (str_field_name.match(regex_money1) == null && str_field_name.match(regex_money2) == null && str_field_name.match(regex_money3) == null && str_field_name.match(regex_money4) == null && str_field_name.match(regex_money5) == null) { ary_global_input_fields.push(elems[i]); } } } } } } elems = document.getElementsByTagName('select'); for (var i = 0; i < elems.length; i++) { ary_global_input_fields.push(elems[i]); } elems = document.getElementsByTagName('textarea'); for (var i = 0; i < elems.length; i++) { ary_global_input_fields.push(elems[i]); } return retVal; } //************************************ //ported from bg_submit_js.aspx //************************************ //usage: //function process_return(txt) //{ // alert(txt); //} //var x=new js_data('test.aspx',true,'process_return') function replace_ddlb_options(ddlb, options) { $(ddlb).empty().append(options); } function change_country_ajax(country,target,default_value) { var x = new js_data('/ajax_misc.aspx?mode=stateoptions&country=' + country, true, function (opts) { replace_ddlb_options(document.getElementById(target), opts) document.getElementById(target).value = default_value; }); } function js_data(target_url,use_async,returnScript) { var str_split = target_url.split('?') var url = str_split[0] var params = '' if (str_split.length > 1) { params = str_split[1] } return new exec_ajax(url,params,'POST',use_async,returnScript) } function exec_ajax(target_url,params,method,use_async,returnScript) { var xmlhttp=null; var async = use_async; var url = target_url; var returnscript = returnScript; var internalRequestComplete = function() { var STATE_COMPLETED = 4; var STATUS_200 = 200; if (xmlhttp.readyState == STATE_COMPLETED) { if (xmlhttp.status == STATUS_200 || xmlhttp.statusText == 'OK') { inProgress = false; isComplete = true; if (typeof returnscript === 'string') { eval(returnscript + '(\'' + xmlhttp.responseText.replace(/[\n|\r|\f]/g,'').replace(/\\/g,'\\\\').replace(/\'/g,'\\\'') + '\');') } else { returnscript(xmlhttp.responseText); } } } } if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else if (window.ActiveXObject) { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } params += '&nocacherand=' + parseInt(Math.random()*99999999) if (xmlhttp!=null) { xmlhttp.onreadystatechange=internalRequestComplete; if (method.toLowerCase().trim() == 'post') { xmlhttp.open("POST",url,async); //xmlhttp.setRequestHeader('Cookie', 'first call bug workaround'); //xmlhttp.setRequestHeader('Cookie', 'ASP.NET_SessionId=ptuog10eo3mcnismj4vlwud3'); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); //xmlhttp.setRequestHeader("Content-length", params.length); //xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); } else { xmlhttp.open("GET",url + '?' + params,async); //xmlhttp.setRequestHeader('Cookie', 'first call bug workaround'); //xmlhttp.setRequestHeader('Cookie', 'ASP.NET_SessionId=ptuog10eo3mcnismj4vlwud3'); xmlhttp.send(null); } } else { alert("Your browser does not support AJAX."); } } //frame inheritence $( document ).ready(function() { if (se_appframe().se_frame == 'appframe') { se_appframe().report_ready(window,location.pathname.substring(location.pathname.lastIndexOf("/") + 1)) } }); $(window).unload(function() { if (se_appframe().se_frame == 'appframe') { se_appframe().report_unload(window,location.pathname.substring(location.pathname.lastIndexOf("/") + 1)) } }); $(window).focus(function() {set_app_id()}); $(window).mouseover(function() {set_app_id()}); function set_app_id() { try{ if (se_appframe().name.indexOf("SEAppId") == -1) { return } }catch(e){return} strCookie = 'seAppId=' + se_appframe().name + ';'; if (window.location.protocol.toLowerCase() == 'https:') { strCookie += 'secure;'; } strCookie += 'path=/'; strCookie += ';SameSite=lax'; document.cookie = strCookie; } function sort_ddlb(obj_ddlb,prepend) { var ary_options = new Array(); $(obj_ddlb).find("option").each(function() { if (this.value > 0) { ary_options[ary_options.length] = [this.text, this.value,this.defaultSelected, this.selected, this.disabled]; } }); $(obj_ddlb).empty(); if (prepend != null) { for (var i=0; i < prepend.length ; i++) { ary_option = prepend[i]; var o = $('