var currentArea; var currentAreaType; var currentTarget=1; var currentlySubmitting=0; var spChLastFocus=null; var browser = checkBrowser(); var handles = new Array(); var ecomWindow; var ap = 0; var timer1; var initialConditions = new Array(); function setNextPage(nextPage) { document.forms[0].target = ''; document.forms[0].NEXT_PAGE.value=nextPage; showHourGlass(); document.forms[0].submit(); } function setData(fieldname, data) { document.forms[0].target = '' ; document.forms[0][fieldname].value=data; showHourGlass(); document.forms[0].submit(); } function setDataAndNextPageTarget(fieldname, data, nextPage) { document.forms[0][fieldname].value=data; var newTarget = '_' + currentTarget++ ; document.forms[0].target = newTarget; document.forms[0].NEXT_PAGE.value=nextPage; showHourGlass(); document.forms[0].submit(); } function setNextPageTarget(nextPage) { var newTarget = '_' + currentTarget++ ; document.forms[0].target = newTarget; document.forms[0].NEXT_PAGE.value=nextPage; showHourGlass(); document.forms[0].submit(); } function setActionData(action, fieldname, data) { document.forms[0].target = '' ; document.forms[0].POST_ACTION.value=action; document.forms[0][fieldname].value=data; showHourGlass(); document.forms[0].submit(); } function setActionPageData(action, page, fieldname, data) { document.forms[0].target = '' ; document.forms[0].POST_ACTION.value=action; document.forms[0].NEXT_PAGE.value=page; document.forms[0][fieldname].value=data; showHourGlass(); document.forms[0].submit(); } function setActionAndPageDataTo(action, page) { document.forms[0].target = '' ; document.forms[0].POST_ACTION.value=action; document.forms[0].NEXT_PAGE.value=page; showHourGlass(); document.forms[0].submit(); } function setPostActionPageData(postAction, page, fieldname, data) { document.forms[0].target = '' ; document.forms[0].POST_ACTION.value=postAction; document.forms[0].NEXT_PAGE.value=page; document.forms[0][fieldname].value=data; showHourGlass(); document.forms[0].submit(); } function postPage() { document.forms[0].target = '' ; showHourGlass(); document.forms[0].submit(); } function setInitialCondition(fieldName, fieldValue) { initialConditions[fieldName]=fieldValue; } function setFromInitialConditions() { for (var prop in initialConditions) { document.forms[0][prop].value=initialConditions[prop]; } } function isok(frm) {if (ap == 0){ap = 1;return 1;}else{alert('The form has been submitted, please wait until it has completed before pressing any more buttons.');return 0;}} function resetIsOk(frm) {ap = 0; return 1;} function checkForReload() { var timesLoaded = Number(document.forms[0]["TIMES_LOADED"].value); if (timesLoaded == 0) { timesLoaded++; document.forms[0]["TIMES_LOADED"].value=timesLoaded.toString(); } else { document.forms[0]["TIMES_LOADED"].value = 0; window.location.reload(true); } } function checkBrowser() { this.ver=navigator.appVersion; this.dom=document.getElementById?1:0; this.ie6=(this.ver.indexOf('MSIE 6')>-1 && this.dom)?1:0; this.ie5=(this.ver.indexOf('MSIE 5')>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; return this; } function setNextPageSecure(nextPage) { document.forms[0].target = '' ; document.forms[0].NEXT_PAGE.value=nextPage; document.url = url; showHourGlass(); document.forms[0].submit(); } function setField(fieldname, data) { document.forms[0].target = '' ; document.forms[0][fieldname].value=data; } function setDataAndNextPage(fieldname, data, nextPage) { document.forms[0].target = '' ; document.forms[0][fieldname].value=data; setNextPage(nextPage); } function set2DataAndNextPage(fieldname1, data1, fieldname2, data2, nextPage) { document.forms[0].target = '' ; document.forms[0][fieldname1].value=data1; document.forms[0][fieldname2].value=data2; setNextPage(nextPage); } function setDataAndNextPageSpecifyTarget(fieldname, data, nextPage, newTarget) { document.forms[0][fieldname].value=data; document.forms[0].target = newTarget ; setNextPage(nextPage); } function selectCheckBoxes(fieldName) { var field = fieldName; for (var i = 0; i -1)) { document.forms[0].elements[i].checked = true; } } } function addHandleToArray(handle) { var i = 0; for (i=0;i<20;i++) { if (!handles[i]) { handles[i] = handle; break; } } } function closeAllWindows() { var i = 0; for (i=0;i<20;i++) { if (handles[i]) { handles[i].close(); } } handles = new Array(); } function showHourGlass() { document.body.style.cursor = "wait"; } function setDirty(Id) { var fieldName = 'DIRTY'+Id document.forms[0][fieldName].value='true'; } function showSessionWarning(show) { var browserName=navigator.appName; var browserVersion=parseInt(navigator.appVersion); if ((browserName=="Netscape" && browserVersion>=5) || ( browserName=="Microsoft Internet Explorer" && browserVersion>=4)) { document.getElementById('warning').style.left = "205"; document.getElementById('warning').style.zindex = "1"; if ( show ) document.getElementById('warning').style.visibility = ""; else document.getElementById('warning').style.visibility = "hidden"; } else if ((browserName=="Netscape" && browserVersion<5)) { document.layers['warning'].document.close(); document.layers['warning'].left = "205"; document.layers['warning'].zindex = "1"; if ( show ) document.layers['warning'].visibility = "show"; else document.layers['warning'].visibility = "hide"; } window.scroll(0,0); tP.innerText=eval(oT); } function showS1Info(show) { var browserName=navigator.appName; var browserVersion=parseInt(navigator.appVersion); if ((browserName=="Netscape" && browserVersion>=5) || ( browserName=="Microsoft Internet Explorer" && browserVersion>=4)) { document.getElementById('s1info').style.left = tempX - 250; document.getElementById('s1info').style.top = tempY; document.getElementById('s1info').style.zindex = "1"; if ( show ) document.getElementById('s1info').style.visibility = ""; else document.getElementById('s1info').style.visibility = "hidden"; } else if ((browserName=="Netscape" && browserVersion<5)) { document.layers['s1info'].document.close(); document.layers['s1info'].left = tempX - 250; document.layers['s1info'].top = tempY; document.layers['s1info'].zindex = "1"; if ( show ) document.layers['s1info'].visibility = "show"; else document.layers['s1info'].visibility = "hide"; } window.scroll(0,0); } function est(){ x=new Date(); x.setTime(x.getTime()+dS() + 600000); return x; } function gmt(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime() + 600000); return x; } function dS(){ return ((tN().getTime()>fD(0,3,1,1).getTime())&&(tN().getTime()0){ week-=7; } if(p>0&&dOff<0){ week+=7; } x.setTime(x.getTime()+((dOff+week)*86400000)); } return x; } function tN(){ return new Date(); } function lZ(x){ return (x>9)?x:'0'+x; } function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } function aP(x){ return (x>11)?'pm':'am'; } function showTime() { document.write(eval(oT)); } var oT="tH(est().getHours())+':'+lZ(est().getMinutes())+' '+aP(est().getHours())+' EST, '+tH(gmt().getHours())+':'+lZ(gmt().getMinutes())+' '+aP(gmt().getHours())+' GMT'"; function markAsLongRequest() { document.forms[0].action = getLongRequestSiteURL(); } function textLimit(field, maxlen) { if (field.value.length > maxlen) { field.value = field.value.substring(0, maxlen); alert('The text limit for this field has been reached. No more text may be added.'); } } function popWindowSimple(url,winname,width,height) { winX=Math.round(screen.width/2)-(width/2); winY=Math.round(screen.height/2)-(height/2); winStats='toolbar=no,location=no,directories=no,menubar=no,resizable=yes,'; winStats+='scrollbars=yes,width='+width+',height='+height; if (navigator.appName.indexOf('Microsoft')>=0) { winStats+=',left='+winX+',top='+winY+''; }else{ winStats+=',screenX='+winX+',screenY='+winY+''; } window.open(url,winname,winStats); } function popNewWindow(url,winname) { window.open(url,winname); }