var gDebug=true;var gkeyPressTime;var gLastTab=false;var gRegex=false;var ie=(document.all)?true:false;if(ie){document.expando=true}var gDebugWindow=false;function $x(B){var A=new apex.page.item(B);return A.node}function $x_object(B){var A=new apex.page.item(B);return A}$item=$x_object;function $v(B){var A=new apex.page.item(B);return A.value()}function $s(C,B){var A=new apex.page.item(C);return A.set(B)}function $u_Carray(A){return($x(A))?[A]:A}function $u_Narray(A){return(A.length==1)?A[0]:A}function $nvl(B,A){return(B!=null)?B:((!!A)?A:"")}function doSubmit(B){var A=new apex.page.form(B);A.submit(B)}function confirmDelete(C,B){var A=new apex.page.form(B);A.confirm(C,B)}function $x_Check_For_Compound(B){var A=$x(B);if(A&&$x(A.id+"_fieldset")){return $x(A.id+"_fieldset")}else{return A}}function $x_Style(B,A,E){B=$u_Carray(B);for(var C=0;C-1))?true:false}function html_SetSelectValue(D,B){var E=$x(D);if(E.nodeName=="SELECT"){E.selectedIndex=0;for(var C=0,A=E.options.length;C2)?A[2]:null;var G=(H>3)?A[3]:null;var E=(H>4)?A[4]:null;var F=(H>5)?true:false;document.cookie=C+"="+escape(D)+((B===null)?"":("; expires="+B.toGMTString()))+((G===null)?"":("; path="+G))+((E===null)?"":("; domain="+E))+((F===true)?"; secure":"")}function html_GoToRelative(A){var B=location.pathname.substring(0,location.pathname.lastIndexOf("/"));document.location=B+"/"+A;return }function html_Allow_Copy(B){l_return=false;var A=document.layers?evt.which:document.all?event.keyCode:document.getElementById?B.keyCode:0;if(B.ctrlKey&&A=="c"){l_return=true}return l_return}function html_StringReplace(A,G,E){if(!E){E=""}var C=A.length,F=G.length;if((C===0)||(F===0)){return A}var B=A.indexOf(G);if((!B)&&(G!=A.substring(0,F))){return A}if(B==-1){return A}var D=A.substring(0,B)+E;if(B+F=!E&&B<=A){$x_Show(D.rows[B])}else{$x_Hide(D.rows[B])}}}function timestamp(){var B,A="T:";var C=":";B=new Date();A+=B.getHours()+C;A+=B.getMinutes()+C;A+=B.getSeconds()+C;A+=B.getMilliseconds();return(A)}var dbaseTime1=null;var dbaseTime2=null;function timeC(A){if(dbaseTime1){dbaseTime2=new Date();dbaseTime1=null;dbaseTime2=null}else{dbaseTime1=new Date()}}function $u_eval(pThis){return eval(pThis)}function setSelectionRange(B,C,D){if(B.setSelectionRange){B.focus();B.setSelectionRange(C,D)}else{if(B.createTextRange){var A=B.createTextRange();A.collapse(true);A.moveEnd("character",D);A.moveStart("character",C);A.select()}}}function setCaretToPos(A,B){setSelectionRange(A,B,B)}function html_ReturnToTextSelection(F,G,B){var E=$x(G);var C=($v_IsEmpty(E)||!!B)?"":" ";if(document.selection){E.focus();var D=document.selection;var A=D.createRange();A.text=A.text+C+F}else{start=E.selectionStart;end=E.selectionEnd;E.value=E.value.slice(0,start)+C+F+E.value.slice(end,E.value.length);E.focus();setCaretToPos(E,end+(F.length+2))}}function setCaretToEnd(A){setSelectionRange(A,A.value.length,A.value.length)}function setCaretToBegin(A){setSelectionRange(A,0,0)}function selectString(A,C){var B=new RegExp(C,"i").exec(A.value);if(B){setSelectionRange(A,B.index,B.index+B[0].length)}}function ob_PPR_TAB(A){top.gLastTab=A;var D=document.body;var C=new htmldb_Get(D,null,null,null,null,"f",A.substring(2));var B=C.get(null,'',"");get=null;if(document.all){var E="window.parent.obFrameSize()";setTimeout(E,100)}else{window.parent.obFrameSize()}}function flowSelectAll(){var C,B,E;if(typeof (flowSelectArray)=="undefined"){return true}else{for(var D=0,A=flowSelectArray.length;D=C){A.value=A.value.substring(0,C);A.style.color="red"}else{msg=null;A.style.color="black"}}H.innerHTML=A.value.length;I.innerHTML=C;if(A.value.length>0){G.style.visibility="visible"}else{G.style.visibility="hidden"}if(J>=90){G.style.color="red"}else{if(J>="80"){G.style.color="#EAA914"}else{G.style.color="black"}}}function quickLinks(A){if(A=="HIDE"){setClassByClass("a","eLinkOn","eLink");setClassByClass("img","eLinkOn","eLink");SetCookie("ORA_WWV_QUICK_EDIT",A)}else{setClassByClass("a","eLink","eLinkOn");setClassByClass("img","eLink","eLinkOn");SetCookie("ORA_WWV_QUICK_EDIT",A)}$x_Toggle(["hideEdit","showEdit"])}var htmldb_ch=false;function htmldb_item_change(A){htmldb_ch=true}function htmldb_doUpdate(A){if(htmldb_ch){lc_SetChange();doSubmit(A)}else{doSubmit(A)}return }function htmldb_goSubmit(A){if(htmldb_ch){if(!htmldb_ch_message||htmldb_ch_message===null){htmldb_ch_message="Are you sure you want to leave this page without saving? /n Please use translatable string."}if(window.confirm(htmldb_ch_message)){doSubmit(A)}}else{doSubmit(A)}return }function html_PopUp(C,B,A,E,D,F){if(!C){C="about:blank"}if(!B){B="_blank"}if(!A){A=600}if(!E){E=600}if(!D){D="yes"}if(!F){F="yes"}l_Window=window.open(C,B,"toolbar=no,scrollbars="+D+",location=no,statusbar=no,menubar=no,resizable="+F+",width="+A+",height="+E);if(l_Window.opener===null){l_Window.opener=self}l_Window.focus();return l_Window}function popupFieldHelp(C,D,A){var B;if(A){B="&p_close_button_name="+A}else{B=""}html_PopUp("wwv_flow_item_help.show_help?p_item_id="+C+"&p_session="+D+B,"Help",500,350);return }function $p_DatePicker(G,H,I,E,D,J,O,K,F,B,N,A,P,L,C){var M=open("wwv_flow_utilities.show_as_popup_calendar?p_element_index="+escape(G)+"&p_form_index="+escape(H)+"&p_date_format="+escape(I)+"&p_bgcolor="+escape(E)+"&p_dd="+escape(D)+"&p_hh="+escape(J)+"&p_mi="+escape(O)+"&p_pm="+escape(K)+"&p_yyyy="+escape(F)+"&p_lang="+escape(B)+"&p_application_format="+escape(N)+"&p_application_id="+escape(A)+"&p_security_group_id="+escape(P)+"&p_mm="+escape(L),"winLov","Scrollbars=no,resizable=yes,width=258,height="+C);if(M.opener==null){M.opener=self}M.focus();return M}function confirmDelete2(C,A){var B=(A)?A:"DELETE";var D=(C)?C:"Would you like to perform this delete action?";if(confirm(D)){doSubmit(B);window.close()}}function LZ(A){return(A<0||A>9?A:"0"+A)}function whichElement(pForm,pElement,pOffset){n=parseInt(pElement.substring(3,pElement.length),10);m=n+parseInt(pOffset,10);return eval("document."+pForm+".p_t"+LZ(m))}function nullFields(D,E,C,A){var B=0;B=D.keyCode;if(B>45&&B<106||B==8){if(E){E.value=""}if(E){C.value=""}if(A){A.value=""}}}function selectAll(C){var A=C.length;for(var B=0;B0){var D=true;if(C){var A=html_GetTarget(C);while(A.nodeName!="BODY"&&!B){A=A.parentNode;if(A==g_Single_Menu){D=!D}}}if(D||B){$x_Hide(g_Single_Menu);document.onclick=null}else{}}else{g_Single_Menu_Count=1}return }function dhtml_SingeMenuOpen(G,D,C,B,A){var E=$x(D);var F=$x(G);E.style.zIndex=2001;document.body.appendChild(E);if(!C||C=="Right"){E.style.position="absolute";E.style.top=(parseInt(findPosY(F),10)+"px");E.style.left=(parseInt(findPosX(F),10)+"px")}else{if(C=="Bottom"){E.style.position="absolute";E.style.top=(parseInt(findPosY(F),10)+parseInt(F.offsetHeight,10)+"px");E.style.left=(parseInt(findPosX(F),10)+"px")}else{if(C=="BottomRight"){E.style.position="absolute";E.style.top=(parseInt(findPosY(F),10)+parseInt(F.offsetHeight,10)+"px");E.style.left=(parseInt(findPosX(F),10)-parseInt(F.offsetWidth,10)+"px")}else{if(C=="Set"){E.style.position="absolute";E.style.top=(parseInt(A,10)+"px");E.style.left=(parseInt(B,10)+"px")}else{E.style.position="absolute";E.style.top=(parseInt(findPosY(F),10)+"px");E.style.left=(parseInt(findPosX(F),10)+parseInt(F.offsetWidth,10)+"px")}}}}$x_Show(E);dhtml_FixLeft(F,E,C);htmldb_IE_Select_Item_Fix(true);g_Single_Menu_Count=0;g_Single_Menu=E;document.onclick=dhtml_DocMenuSingleCheck;return }function dhtml_FixLeft(D,C,B){var A;if(document.all){A=document.body.clientWidth}else{A=window.innerWidth}if(B=="bottom"){if(parseInt(A,10)=1;if(document.all&&A&&B){if(A.firstChild&&A.firstChild.nodeName!="IFRAME"){A.innerHTML=''+A.innerHTML}}return }var g_dhtmlMenuOn="dhtmlMenuOn";function app_AppMenuMultiOpenBottom(E,A,D){var C=$x(A);if(E!=gCurrentAppMenuImage){app_AppMenuMultiClose();var B=E.previousSibling.firstChild;E.className=g_dhtmlMenuOn;dhtml_MenuOpen(B,A,false,"Bottom");gCurrentAppMenuImage=E}else{dhtml_CloseAllSubMenus();app_AppMenuMultiClose()}return }function app_AppMenuMultiOpenBottom2(E,A,D){var C=$x(A);if(E!=gCurrentAppMenuImage){app_AppMenuMultiClose();var B=E.parentNode;E.className=g_dhtmlMenuOn;dhtml_MenuOpen(B,A,false,"Bottom");gCurrentAppMenuImage=E}else{dhtml_CloseAllSubMenus();app_AppMenuMultiClose()}return }function $a_report(G,D,F,C,A){lThis=$u_js_temp_drop();var B=$x("report_"+G+"_catch");B.id="report_"+G+"_catch_old";var E="p="+$v("pFlowId")+":"+$v("pFlowStepId")+":"+$v("pInstance")+":FLOW_PPR_OUTPUT_R"+G+"_";if(!!A){E+=A+"::RP&fsp_region_id="+G}else{E+="pg_R_"+G+":NO&pg_max_rows="+F+"&pg_min_row="+D+"&pg_rows_fetched="+C}var H=new htmldb_Get(null,null,null,null,null,"f",E);var I=H.get();lThis.innerHTML=I;B.innerHTML=$x("report_"+G+"_catch").innerHTML;B.id="report_"+G+"_catch";lThis.innerHTML="";return }function $u_js_temp_drop(){var A=$x("apex_js_temp_drop");if(!A){A=$dom_AddTag(document.body,"DIV");A.id="apex_js_temp_drop";$x_Hide(A)}A.innerHTML="";return A}function $u_js_temp_clear(){var A=$x("apex_js_temp_drop");if(A){A.innerHTML=""}return A}function $a_report_Split(C,A){var B=A.split("_");$a_report(C,B[0],B[1],B[2])}function html_RemoveRow(B){var A=$x("htmldbAddRowTable");var C=$x_UpTill(B,"TR");if(A.childNodes.length>=2&&C){A.removeChild(C);A.normalize()}return }var g_CheckedArray_IE;function ie_RowFixStart(D){if(document.all){var C=$x_FormItems(D,"checkbox");g_CheckedArray_IE=[];for(var B=0,A=C.length;B";B.className=A.rows[0].cells[A.rows[0].cells.length-2].className;return }var gLastRowMoved=null;var gLastRowMovedColor="#CCCCCC";var gLastRowHighlight=true;function $tr_RowMoveFollow(B,A){if(gLastRowHighlight){if(A&&gLastRowMoved){html_RowHighlightOff(gLastRowMoved)}html_RowHighlight(B,gLastRowMovedColor)}gLastRowMoved=B}function html_RowUp(E,D){var C=$x_UpTill(E,"TR");ie_RowFixStart(C);$tr_RowMoveFollow(C,D);var A=C.parentNode;var B=C.previousSibling;while(!!B){if(B.nodeType==1){break}B=B.previousSibling}if(!!B&&!!B.firstChild&&B.firstChild.nodeName!="TH"&&B.nodeName=="TR"){oElement=A.insertBefore(C,B)}else{oElement=A.appendChild(C)}ie_RowFixFinish(oElement);return oElement}function html_RowDown(E,D){var C=$x_UpTill(E,"TR");ie_RowFixStart(C);$tr_RowMoveFollow(C,D);var B=C.parentNode;var A=C.nextSibling;while(!!A){if(A.nodeType==1){break}A=A.nextSibling}if(!!A&&A.nodeName=="TR"){oElement=B.insertBefore(C,A.nextSibling)}else{oElement=B.insertBefore(C,B.getElementsByTagName("TR")[1])}ie_RowFixFinish(oElement);return oElement}var tt_target;var gToolTipGraphic="arrow2.gif";var gToolTip=false;var gToopTipPointer=false;var gToolTipContent=false;function toolTip_init(){if(document&&document.body){gToolTipContent=$x("gToolTipContent");gToolTip=$x("dhtmltooltip");if(!gToolTip){gToolTip=$dom_AddTag(document.body,"DIV");gToolTip.id="dhtmltooltip";gToolTip.className="htmldbToolTip";gToolTip.style.position="absolute";gToolTip.style.border="1px solid black";gToolTip.style.padding="2px";gToolTip.style.backgroundColor="";gToolTip.style.visibility="hidden";gToolTip.style.zIndex=10000}gToopTipPointer=$x("dhtmlpointer");if(!gToopTipPointer){gToopTipPointer=$dom_AddTag(document.body,"IMG");gToopTipPointer.id="dhtmlpointer";gToopTipPointer.src=htmldb_Img_Dir+gToolTipGraphic;gToopTipPointer.style.position="absolute";gToopTipPointer.style.zIndex=10001}return true}else{return false}}function toolTip_disable(){if(toolTip_init()){tt_target=null;gToolTip.style.visibility="hidden";gToolTip.style.backgroundColor="";gToolTip.style.width="";gToopTipPointer.style.visibility="hidden";if(gToolTipContent){gToolTipContent.innerHTML=""}else{gToolTip.innerHTML=""}}}function toolTip_enable(A,H,F,E,B){A=(A)?A:((window.event)?event:null);var D=A.pageX?A.pageX:A.clientX+getScrollXY()[0];var C=A.pageY?A.pageY:A.clientY+getScrollXY()[1];if(toolTip_init()){tt_target=H;if(!F){F=H.getAttribute("htmldb:tip")}if(gToolTipContent){gToolTipContent.innerHTML=F}else{gToolTip.innerHTML=F}if(!!E){gToolTip.style.width=E+"px"}if(!!B){gToolTip.style.backgroundColor=B}else{gToolTip.style.backgroundColor="lightyellow"}gToopTipPointer.style.left=(10+D)+"px";gToopTipPointer.style.top=(15+C)+"px";gToolTip.style.left=(7+D)+"px";gToolTip.style.top=(28+C)+"px";gToolTip.style.visibility="visible";gToolTip.style.zIndex=10000;gToopTipPointer.style.zIndex=10001;gToopTipPointer.style.visibility="visible";try{H.addEventListener("mouseout",toolTip_disable,false)}catch(G){H.attachEvent("onmouseout",toolTip_disable)}}return false}function toolTip_follow(A,D){A=(A)?A:((window.event)?event:null);var C=A.pageX?A.pageX:A.clientX+getScrollXY()[0];var B=A.pageY?A.pageY:A.clientY+getScrollXY()[1];if(gToolTip){gToolTip.style.left=(7+C)+"px";gToolTip.style.top=(28+B)+"px";gToolTip.style.visibility="visible";gToolTip.style.zIndex=10000;gToopTipPointer.style.left=(10+C)+"px";gToopTipPointer.style.top=(15+B)+"px";gToopTipPointer.style.zIndex=10001;gToopTipPointer.style.visibility="visible"}return false}function dhtml_ShuttleValue(F,C){var D=[];var E=$x(F);var A=$x(C);D=html_SelectedOptions(E);if($x(D)){D=[D]}for(var B=0;B=0;E--){if(!!G.options[E].selected){if(F=="D"){if(E!=D-1){G.insertBefore(G.options[E],G.options[E+2])}}}}}else{var C=[];for(E=0;E=0;E--){G.insertBefore(C[E],G.firstChild)}}}}}};this.sort1=function(C){this.sort(this.Select1,C)};this.sort2=function(C){this.sort(this.Select2,C)};return }function $d_Overlap(E,A){var G=true;var I=true;var B=findPos(E);var H=B[0];var F=B[1];var J=findPos(A);var D=J[0];var C=J[1];if(D>H||H>D+A.offsetWidth){G=false}if(C>F||F>C+A.offsetHeight){G=false}return G}function apex_RefreshChart(A,D,C){var B=new htmldb_Get(null,$v("pFlowId"),"FLOW_FLASH_CHART_R"+D+"_"+C,A);var E=B.get();B=null;if(ie){window["c"+D].SetXMLText(E)}else{document["c"+D].SetXMLText(E)}}function apex_SWFFormFix(B){if(!ie){return false}var A="SWFFormFix";document.write('');$x(A).onclick()}function apex_SWFFormFixCallback(C,D){var B=document;var A=C;while(C==C.parentNode){if(C.nodeName.toLowerCase()=="form"){if(!!C.name&&C.name.length>0){B=B.forms[C.name]}}}A.parentNode.removeChild(A);window[D]=B[D];return true}function colorPopUp(A){return html_PopUp("wwv_flow_utilities.gen_popup_color?p_item_name="+escape(A),"ColorPicker",250,255,"no","no")}function changePreviewColor(B){var A=$x(B).value;$x_Style(B.id+"_PREVIEW","background",A)}function html_processing(){var B=$x("htmldbWait");if(!B){var A=document.createElement("DIV");A.className="htmldbProcessing";A.style.zIndex=20000;A.id="htmldbDisablePage";A.style.width="100%";A.style.height="100%";A.onclick="return false;";A.style.position="absolute";A.style.top="0";A.style.left="0";document.body.insertBefore(A,document.body.firstChild)}}function html_enableBase(){var A=$x("htmldbDisablePage");if(A){A.parentNode.removeChild(A)}}function html_disableBase(C,D){var B=$x("htmldbDisablePage");if(!B){var A=document.createElement("DIV");A.className=(!!D)?D:"htmldbDisablePage";A.style.zIndex=C;A.id="htmldbDisablePage";A.style.width="100%";A.style.height="100%";A.onclick="return false;";A.style.position="absolute";A.style.top="0";A.style.left="0";document.body.insertBefore(A,document.body.firstChild)}}function dhtml_CloseDialog(A){html_enableBase();$x_Hide($x_UpTill(A,"TABLE"));toolTip_disable()}function html_Centerme(D){var B=$x(D);if(document.all){l_Width=document.body.clientWidth;l_Height=document.body.clientHeigth}else{l_Width=window.innerWidth;l_Height=window.innerHeight}var A=B.offsetWidth;var C=B.offsetHeight;B.style.top="40%";B.style.left="40%"}function hideShow(F,B,A,C){var E=$x(B);var D=$x(F);if(D.style.display=="none"||D.style.display==""||D.style==null){E.src=C;$x(F).style.display="block"}else{E.src=A;$x(F).style.display="none"}return }function disableItems(testString,item1,item2,item3,item4,item5,item6,item7,item8,item9,item10){var theTest=eval(testString);var i=1;if(theTest){for(i;i<12;i++){if(!!arguments[i]){disItem=$x(arguments[i]);disItem.style.background="#cccccc";disItem.disabled=true}}}else{for(i;i<12;i++){if(!!arguments[i]){disItem=$x(arguments[i]);disItem.disabled=false;disItem.style.background="#ffffff"}}}}function htmldbCheckCookie(A){SetCookie("ISCOOKIE","true");flow=GetCookie("ISCOOKIE");return }function shuttleItem(F,B,E){var J=$x(F),M=$x(B),C=[],G=[],K=[],D;if(E){for(D=0;D<=J.length-1;D++){J.options[D].selected=true}}for(D=0;D=0){A=A.substring(0,C)}else{if(B>=0){A=A.substring(0,B)}}return A}function init_htmlPPRReport2(D){var B=$x("report"+D);if(B){var E=B.getElementsByTagName("TH");for(var C=0;C","");if(C){$x("report"+F).innerHTML=C+$x("report"+F).innerHTML}if(H){$x("report"+F).innerHTML+=H}document.body.style.cursor="";init_htmlPPRReport(F);I=null;return }function PPR_Tabluar_Submit(K,G,D,M,N,L,I){var H=$x(K),C,F,B;if(N){C=new htmldb_Get(K,G,M,D,null,"wwv_flow.accept")}else{C=new htmldb_Get(null,G,M,D,null,"wwv_flow.accept")}var J=$x_FormItems(H);for(F=0;F","")}else{B=C.get(null,"","")}if(L){init_htmlPPRReport(L)}C=null;return B}function removeMessageTimeout(){setTimeout(function(){$x("htmldbMessageHolder").innerHTML=""},5000)}html_RowHighlight=$x_RowHighlight;html_RowHighlightOff=$x_RowHighlightOff;html_SelectedOptions=$f_SelectedOptions;html_SelectValue=$f_SelectValue;