/* Copyright (c) Business Objects 2006. All rights reserved. */ var PE_VALUE_DESC_SEPARATOR = ' - '; if(typeof(_pe) == 'undefined') { _pe = new function() { var o=this o._ie=(document.all!=null)?true:false o._dom=(document.getElementById!=null)?true:false o._isQuirksMode = (document.compatMode != 'CSS1Compat'); o._moz=o._dom&&!o._ie o._appVer=navigator.appVersion.toLowerCase(); o._mac=(o._appVer.indexOf('macintosh')>=0)||(o._appVer.indexOf('macos')>=0); o._userAgent=navigator.userAgent?navigator.userAgent.toLowerCase():null o._saf=o._moz&&(o._userAgent.indexOf("safari")>=0) o._ie6=o._ie&&(o._appVer.indexOf("msie 6")>=0) o._root = '' o._images= o._root + '/images/' // prompt section o._prompts=new Array o._lovBS=1000 o._st='s' o._nm='n' o._cy='c' o._bo='b' o._da='d' o._tm='t' o._dt='dt' _BlockWaitWidgetID = "PEBlockWidgetID" // dialog secion o._theLYR=null o._dlgResize=null o._widgets=new Array o.DlgBox_modals=new Array; o.DlgBox_instances=new Array o.DlgBox_current=null o._show='visible' o._hide='hidden' o._hand=o._ie?"hand":"pointer" // functions o.init=PE_init o.canSubmit=PE_canSubmit o.beginBlocking=PE_beginBlocking o.endBlocking=PE_endBlocking // commands o.setLOVMsg=PE_setLOVMsg } } function PE_init(root,lovBS) { var o=this if (root && root.length > 0) { if (root.charAt(root.length - 1)!='/') root += '/' o._root = root o._images = root + 'images/' } else { o._root = null o._images = null } if(lovBS>0) o._lovBS=lovBS } function PE_canSubmit() { return (this.DlgBox_current) ? false : true } /* Commands: cmd=lov (get values from the active prompt) ap(active prompt id) */ function PE_setLOVMsg(form,vid,pid) { var fl=document.getElementById(vid); var fv=fl.value; if (fv.length > 0) fv += "&"; fv += "cmd=1&ap" + "=" + pid; fl.value=fv } var DateTimeFormatSetting = { "datePattern":"Y-M-D", "isTwoDigitMonth":true, "isTwoDigitDay":true, "dateRegex":null, "dateTimeRegex":null }; /////////////////////////////// // functions for DateTimeFormatSetting function promptengine_getDatePattern() { return DateTimeFormatSetting.datePattern; } function promptengine_setDatePattern(pattern) { DateTimeFormatSetting.datePattern = pattern; } function promptengine_getIsTwoDigitMonth() { return DateTimeFormatSetting.isTwoDigitMonth; } function promptengine_setIsTwoDigitMonth(isTwoDigitMonth) { DateTimeFormatSetting.isTwoDigitMonth = isTwoDigitMonth; } function promptengine_getIsTwoDigitDay() { return DateTimeFormatSetting.isTwoDigitDay; } function promptengine_setIsTwoDigitDay(isTwoDigitDay) { DateTimeFormatSetting.isTwoDigitDay = isTwoDigitDay; } function promptengine_getDateRegex() { return DateTimeFormatSetting.dateRegex; } function promptengine_setDateRegex(dateRegex) { DateTimeFormatSetting.dateRegex = dateRegex; } function promptengine_getDateTimeRegex() { return DateTimeFormatSetting.dateTineRegex; } function promptengine_setDateTimeRegex(dateTineRegex) { DateTimeFormatSetting.dateTineRegex = dateTineRegex; } //////////////////////////////////////////// // helper functions duplicate in dhtml lib function _convStr(s,nbsp,br) { s=''+s var ret=s.replace(/&/g,"&").replace(//g,">").replace(/"/g,""") if (nbsp) ret=ret.replace(/ /g," ") if (br) ret=ret.replace(/\n/g,"
") return ret } function _opt(val,txt,sel) { return '' } function _canScanFrames(w) { var ex=true,d=null if (_pe._moz) { _oldErrHandler=window.onerror window.onerror=localErrHandler } try { d=w.document ex=false } catch(expt) { } if (_pe._moz) window.onerror=_oldErrHandler return (!ex&&(d!=null)) } function _restoreAllDisabledInputs(win,level) { if (_pe._ie&&window._peInputStackLevel!=null) { win=win?win:window if (_canScanFrames(win)) { if (level==null) level=--window._peInputStackLevel var b=win.document.body,arr=b?b.getElementsByTagName("SELECT"):null,len=arr?arr.length:0 for (var i=0;i