/*jslint nomen: false, evil: false, browser: true, eqeqeq: false, white: false, undef: false */ /* Oracle Database Application Express, Release 3.1 B32468-02 Copyright © 2003, 2008, Oracle. All rights reserved. The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065. The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party. */ /** * @fileOverview * This file holds all non namespaced functions and objects for Oracle Application Express * * */ 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; /** * Given a DOM node or string ID (pNd), this function returns a DOM node if the element is on the page, or returns false if it is not. * @function * @param {DOM node | string ID} pNd * @return {DOM node | false} */ function $x(pNd){var lItem = new apex.page.item(pNd);return lItem.node;} /** * Given a DOM node or string ID (pNd), this function returns a apex.page.item object. * @function * @param {DOM node | string ID} pNd * @return {DOM node | false} */ function $x_object(pNd){var lItem = new apex.page.item(pNd);return lItem;} $item = $x_object; /** * Given a DOM node or string ID (pNd), this function returns the value of an Application Express item in the same format as it would be posted. * @function * @param {DOM node | string ID} pNd */ function $v(pNd){ var lItem = new apex.page.item(pNd); return lItem.value(); } /** * Given a DOM node or string ID (pNd), this function sets the Application Express item value taking into account what type of item it is. * @function * @param {DOM node | string ID} pNd * @param {String , Array} pValue */ function $s(pNd,pValue){var lItem = new apex.page.item(pNd);return lItem.set(pValue);} /** * Given a DOM node or string ID or an Array (pNd), this function will try to return an Array. Used for creating DOM based functionality that can accept a single or multiple DOM nodes. * @function * @param {DOM node | string ID | Array} pNd * @return Array */ function $u_Carray(pNd){return ($x(pNd))?[pNd]:pNd;} /** * Given a DOM node or string ID or an Array (pNd), this function will try to return a single value, if an pNd is an array but only has one element the value of that element will be returned otherwise the array will be returned. Used for creating DOM based functionality that can accept a single or multiple DOM nodes. * @function * @param {DOM node | string ID | Array} pNd * @return {Array} Array or first value */ function $u_Narray(pNd){return (pNd.length == 1)?pNd[0]:pNd;} /** * If pTest is empty or false return pDefault otherwise return pTest. * @function * @param {String | Array} pTest * @param {String | Array} pDefault * @return {String | Array} */ function $nvl(pTest,pDefault){return (pTest!=null)?pTest:((!!pDefault)?pDefault:'');} /** * Submits the page setting the Application Express Request value (pRequest). * @function * @param {String} pRequest */ function doSubmit(pRequest){ var lSubmit = new apex.page.form(pRequest); lSubmit.submit(pRequest); } /** * Displays a confirmation showing a message (pMessage) and depending on user's choice, submits a page setting request value (pRequest) or cancels page submit. * @function * @param {String}[pMessage] * @param {String}[pRequest] */ function confirmDelete(pMessage,pRequest){ var lSubmit = new apex.page.form(pRequest); lSubmit.confirm(pMessage,pRequest); } /** * Check to see if this a compond object and if so return it's fieldset instead this helps get and items whole html structure instead of just the form element itself * @function * @param {DOM node | string ID} pNd */ function $x_Check_For_Compound(pNd){ var lNode = $x(pNd); if(lNode && $x(lNode.id + '_fieldset')){ return $x(lNode.id + '_fieldset'); }else{ return lNode; } } /** * Sets a specific style property (pStyle) to given value (pString) of a DOM node or DOM node Array (pNd). * @function * @param {DOM node | string ID | DOM node Array} pNd * @param {String} pStyle * @param {String} pString * @return {DOM node | DOM Array} */ function $x_Style(pNd,pStyle,pString){ pNd = $u_Carray(pNd); for(var i=0;i row that holds the item. In most cases, this will be the item and its label. * @function * @param {DOM node | string ID | DOM node Array} pNd * @param { String } pFunc ['TOGGLE','SHOW','HIDE'] * */ function $x_HideItemRow(pNd){ $x_ItemRow(pNd,'HIDE'); } /** * Given a page item name, this function shows the entire row that holds the item. In most cases, this will be the item and its label. * @function * @param {DOM node | string ID | DOM node Array} pNd * */ function $x_ShowItemRow(pNd){ $x_ItemRow(pNd,'SHOW'); } /** * Given a page item name (pNd), this function toggles the entire row that holds the item. In most cases, this will be the item and its label. * @function * @param {DOM node | string ID | DOM node Array} pNd * */ function $x_ToggleItemRow(pNd){ $x_ItemRow(pNd,'TOGGLE'); } /** * Hides all DOM nodes referenced in pNdArray and then shows the DOM node referenced by pNd. This is most useful when pNd is also a node in pNdArray. * @function * @param {DOM node | string ID | DOM node Array} pNd * @param {DOM node | String | Array} pNdArray * @return {DOM node | DOM Array} * */ function $x_HideAllExcept(pNd,pNdArray){ var l_Node = $x(pNd); if(l_Node){ $x_Hide(pNdArray); $x_Show(l_Node); } return l_Node; } /** * Hides all sibling nodes of given DOM node (pNd). * @function * @param {DOM node | string ID} pNd * @return {DOM node} * */ function $x_HideSiblings(pNd){ return $x_HideAllExcept(pNd,$x(pNd).parentNode.childNodes); } /** * Shows all sibling DOM nodes of given DOM nodes (pNd). * @function * @param {DOM node | string ID} pNd * @return {DOM node | false} * */ function $x_ShowSiblings(pNd){ var l_Node = $x(pNd); if(l_Node){ var l_NodeSibs = l_Node.parentNode.childNodes; $x_Show(l_NodeSibs); } return l_Node; } /** * Sets a DOM node or array of DOM nodes to a single class name. * @function * @param {DOM node | string ID | DOM node Array} pNd * @param {String} pClass * */ function $x_Class(pNd,pClass){ if($x(pNd)){pNd = [pNd];} var l=pNd.length; for(var i=0;i -1))?true:false; } /** * Sets the value (pValue) of a select item (pId). If the value is not found, this functions selects the first option (usually the NULL selection). * @function * @param {DOM node | String} pId * @param {String} pValue * */ function html_SetSelectValue(pId,pValue){ var lSelect = $x(pId); if(lSelect.nodeName == 'SELECT'){ lSelect.selectedIndex = 0; for(var i=0,l=lSelect.options.length;i to a table row (pThis). And sets the content to (pText). * @function * @param {DOM node | string ID} pThis * @param {String} pText * @return {DOM node} * */ function $tr_AddTD(pThis,pText){ return $dom_AddTag($x(pThis),'TD',pText); } /** * Appends a table header cell to a table row (pThis). And sets the content to (pText). * @function * @param {DOM node | string ID} pThis * @param {String} pText * @return {DOM node} * */ function $tr_AddTH(pThis,pText){return $dom_AddTag($x(pThis),'TH',pText);} /** * @function * @param {DOM node | string ID} pThis * @param {string} pThat * */ function $dom_Replace(pThis,pThat){ var lThis = $x(pThis),lParent = lThis.parentNode; lThat = $dom_AddTag(lParent,pThat); return lParent.replaceChild(lThat,lThis); } /** * Inserts the html form input element (pType) as a child node of a DOM node (pThis) with an id (pId) and name (pName) value set to (pValue). * @param {DOM node | string ID} pThis * @param {String} [pType] default is text input * @param {String} [pId] * @param {String} [pName] * @param {String} [pValue] * @return {DOM node} */ function $dom_AddInput(pThis,pType,pId,pName,pValue){ var lThis = $dom_AddTag(false,'INPUT'); lThis.type = (pType)?pType:'text'; lThis.id = (pId)?pId:''; lThis.name = (pName)?pName:''; lThis.value = (pValue)?pValue:''; if(pThis){$x(pThis).appendChild(lThis);} return lThis; } /** * Takes a DOM node (p_Node) and makes it a child of DOM node (p_Parent) and then returns the DOM node (pNode). * @param {DOM node | string ID} pThis * @param {DOM node | string ID} p_Parent * @return {DOM node} */ function $dom_MakeParent(pThis,p_Parent){ var l_Node = $x(pThis); var l_Parent = $x(p_Parent); if(l_Node && l_Parent && l_Node.parentNode != l_Parent){l_Parent.appendChild(l_Node);} return l_Node; } /** @ignore */ var gCurrentRow = false; /** * Give an table row DOM node (pThis), this function sets the background of all table cells to a color (pColor). A global variable gCurrentRow is set to the current table row (pThis). * @function * @param {DOM node | String} pThis * @param {String} pColor * */ function $x_RowHighlight(pThis,pColor){ var lThis = $x(pThis); if(lThis){$x_Style(lThis.getElementsByTagName('TD'),'backgroundColor',pColor);} gCurrentRow = lThis; return; } /** * Give an table row DOM node (pThis), this function sets the background of all table cells to NULL. * @function * @param {DOM node | String} pThis * */ function $x_RowHighlightOff(pThis){ var lThis = $x(pThis); if(lThis){$x_Style(lThis.getElementsByTagName('TD'),'backgroundColor','');} return; } /** * Sets the select option of a given select item to the first option. * @function * @param {DOM node | String } pNd * */ function html_ResetSelect(pNd){ var l_Node = $x(pNd); var tSelects = (l_Node.nodeName == 'SELECT')?l_Node:l_Node.getElementsByTagName('select')[0]; tSelects.selectedIndex = 0; return; } /* *Sets page items with return from plsql call apex_util.json_from_items('ITEM1:ITEM2:ITEM3'); * */ function json_SetItems(gReturn){ gReturn = eval('(' + gReturn + ')'); for (var j=0,len=gReturn.item.length;j 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? true : false; document.cookie = pName + "=" + escape (pValue) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : ""); } /** * @ignore * */ function html_GoToRelative(nURL){ var urlP = location.pathname.substring(0,location.pathname.lastIndexOf('/')); document.location = urlP+"/"+nURL; return; } /** * @ignore * */ function html_Allow_Copy(e){ l_return = false; var keyCode = document.layers ? evt.which :document.all ? event.keyCode :document.getElementById ? e.keyCode : 0; if (e.ctrlKey && keyCode == "c"){l_return = true;} return l_return; } /** * @ignore * */ function html_StringReplace(string,text,by) { if(!by){by = '';} var strLength = string.length, txtLength = text.length; if ((strLength === 0) || (txtLength === 0)) {return string;} var i = string.indexOf(text); if ((!i) && (text != string.substring(0,txtLength))) {return string;} if (i == -1) {return string;} var newstr = string.substring(0,i) + by; if (i+txtLength < strLength){newstr += html_StringReplace(string.substring(i+txtLength,strLength),text,by);} return newstr; } /** * @ignore * */ function formHasValue(what) { var result = false; var output = ''; for (var i=0,j=what.elements.length;i=!start && i<=end){$x_Show(tTable.rows[i]);} else{$x_Hide(tTable.rows[i]);} } } /** @ignore */ function timestamp(){ var d, s = "T:"; var c = ":"; d = new Date(); s += d.getHours() + c; s += d.getMinutes() + c; s += d.getSeconds() + c; s += d.getMilliseconds(); return(s); } /** * @ignore * */ var dbaseTime1 = null; /** * @ignore * */ var dbaseTime2 = null; /** * @ignore * */ function timeC(t){ if(dbaseTime1){ dbaseTime2 = new Date(); dbaseTime1 = null; dbaseTime2 = null; }else{ dbaseTime1 = new Date(); } } /** * calls eval for better compression *@ignore */ function $u_eval(pThis){ return eval(pThis); } /** * @ignore * */ function setSelectionRange(input, selectionStart, selectionEnd) { if (input.setSelectionRange){ input.focus(); input.setSelectionRange(selectionStart, selectionEnd); }else if(input.createTextRange){ var range = input.createTextRange(); range.collapse(true); range.moveEnd('character', selectionEnd); range.moveStart('character', selectionStart); range.select(); } } /** * @ignore * */ function setCaretToPos(input,pos){ setSelectionRange(input, pos, pos); } /** * @ignore * */ function html_ReturnToTextSelection(pText,pThis,pNoSpace){ var cmd = $x(pThis); var lSpace = ($v_IsEmpty(cmd)||!!pNoSpace)?'':' '; if (document.selection){//IE support for inserting HTML into textarea cmd.focus(); var sel = document.selection; var rng = sel.createRange(); rng.text = rng.text + lSpace + pText; }else{ // Mozilla/Netscape support for selecting textarea start = cmd.selectionStart; end = cmd.selectionEnd; cmd.value = cmd.value.slice(0,start) + lSpace + pText + cmd.value.slice(end,cmd.value.length); cmd.focus(); setCaretToPos (cmd, end +(pText.length + 2)); } } /** * @ignore * */ function setCaretToEnd(input){setSelectionRange(input, input.value.length, input.value.length);} /** * @ignore * */ function setCaretToBegin(input){setSelectionRange(input,0,0);} /** * @ignore * */ function selectString (input, string) { var match = new RegExp(string, "i").exec(input.value); if(match){setSelectionRange(input, match.index, match.index + match[0].length);} } /** * @ignore * */ function ob_PPR_TAB(l_URL){ top.gLastTab = l_URL; var lBody = document.body; var http = new htmldb_Get(lBody,null,null,null,null,'f',l_URL.substring(2)); var temp = http.get(null,'',''); get = null; if(document.all){ var ie_HACK = 'window.parent.obFrameSize()'; setTimeout(ie_HACK,100);} else{window.parent.obFrameSize();} } /** * @ignore * */ function flowSelectAll(){ var theList, lListLength,i; if (typeof(flowSelectArray)=="undefined"){return true;} else{ for (var a=0,len=flowSelectArray.length;a= maxNo) {textArea.value = textArea.value.substring(0, maxNo); textArea.style.color = 'red'; } else {msg = null; textArea.style.color = 'black';} } ctrF.innerHTML = textArea.value.length; maxF.innerHTML = maxNo; if (textArea.value.length > 0){ ctrBlk.style.visibility = 'visible'; }else{ ctrBlk.style.visibility = 'hidden'; } if (pctFull >= 90){ ctrBlk.style.color='red'; }else if (pctFull >= "80"){ ctrBlk.style.color='#EAA914'; }else{ ctrBlk.style.color='black'; } } /** * @ignore * */ function quickLinks(what){ if (what == 'HIDE'){ setClassByClass('a','eLinkOn','eLink'); setClassByClass('img','eLinkOn','eLink'); SetCookie('ORA_WWV_QUICK_EDIT',what); }else{ setClassByClass('a','eLink','eLinkOn'); setClassByClass('img','eLink','eLinkOn'); SetCookie('ORA_WWV_QUICK_EDIT',what); } $x_Toggle(['hideEdit','showEdit']); } /** * @ignore * */ var htmldb_ch=false; /** * @ignore * */ function htmldb_item_change(e){htmldb_ch=true;} /** * @ignore * */ function htmldb_doUpdate(r){ if(htmldb_ch){lc_SetChange();doSubmit(r);} else{doSubmit(r);} return; } /** * @ignore * */ function htmldb_goSubmit(r){ 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(r);} }else{ doSubmit(r); } return; } /** * @ignore * @function * @param pURL * @param pName * @param pWidth * @param pHeight * @param pScroll * @param pResizable * @return {Window Object} * */ function html_PopUp(pURL,pName,pWidth,pHeight,pScroll,pResizable){ if(!pURL){pURL = 'about:blank';} if(!pName){pName = '_blank';} if(!pWidth){pWidth = 600;} if(!pHeight){pHeight = 600;} if(!pScroll){pScroll = 'yes';} if(!pResizable){pResizable = 'yes';} l_Window = window.open(pURL,pName,'toolbar=no,scrollbars='+pScroll+',location=no,statusbar=no,menubar=no,resizable='+pResizable+',width='+pWidth+',height='+pHeight); if (l_Window.opener === null){l_Window.opener = self;} l_Window.focus(); return l_Window; } /** * @ignore * */ function popupFieldHelp(curentItemId, sessionId, closeButtonName){ var closeButton; if (closeButtonName){closeButton = '&p_close_button_name='+closeButtonName;} else{closeButton = '';} html_PopUp("wwv_flow_item_help.show_help?p_item_id=" + curentItemId + "&p_session=" + sessionId+closeButton,'Help',500,350); return; } /** *@function */ function $p_DatePicker(p_element_index,p_form_index,p_date_format,p_bgcolor,p_dd,p_hh,p_mi,p_pm,p_yyyy,p_lang,p_application_format,p_application_id,p_security_group_id,p_mm,p_height){ var w = open("wwv_flow_utilities.show_as_popup_calendar" + "?p_element_index=" + escape(p_element_index) + "&p_form_index=" + escape(p_form_index) + "&p_date_format=" + escape(p_date_format) + "&p_bgcolor=" + escape(p_bgcolor) + "&p_dd=" + escape(p_dd) + "&p_hh=" + escape(p_hh) + "&p_mi=" + escape(p_mi) + "&p_pm=" + escape(p_pm) + "&p_yyyy=" + escape(p_yyyy) + "&p_lang=" + escape(p_lang) + "&p_application_format=" + escape(p_application_format) + "&p_application_id=" + escape(p_application_id) + "&p_security_group_id=" + escape(p_security_group_id) + "&p_mm=" + escape(p_mm), "winLov","Scrollbars=no,resizable=yes,width=258,height="+p_height); if (w.opener == null){w.opener = self;} w.focus(); return w } /** Shows confrm box with message provided in p_Msg if confirm is true then submits the page with request value set to p_Req and then closes the window., mainly used in popup windows. @function @param {String} p_Msg @param {String} p_Req * */ function confirmDelete2(p_Msg,p_Req){ var l_req = (p_Req)?p_Req:'DELETE'; var l_msg = (p_Msg)?p_Msg:'Would you like to perform this delete action?'; if (confirm(l_msg)){ doSubmit(l_req); window.close(); } } /** * @ignore * similar to lpad (str, 2, '0') * */ function LZ(x){return(x<0||x>9?x:"0"+x);} /** * @ignore * */ 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)); } /** * @ignore * */ function nullFields(event, pField1, pField2, pField3) { var code = 0; code = event.keyCode; if (code > 45 && code < 106 || code == 8) { if (pField1) {pField1.value = "";} if (pField1) {pField2.value = "";} if (pField3) {pField3.value = "";} } } /** * @ignore * */ function selectAll(fromList){ var len=fromList.length; for(var i=0;i 0){ var l_Test = true; if(e){ var tPar = html_GetTarget(e); while(tPar.nodeName != 'BODY' && !force){ tPar = tPar.parentNode; if(tPar == g_Single_Menu){l_Test = !l_Test;} } } if(l_Test || force){ $x_Hide(g_Single_Menu); document.onclick = null; }else{} }else{ g_Single_Menu_Count = 1; } return; } /** @ignore */ function dhtml_SingeMenuOpen(pThis,pThat,pDir,pX,pY){ var lMenu = $x(pThat); var lThis = $x(pThis); lMenu.style.zIndex = 2001; document.body.appendChild(lMenu); if(!pDir || pDir == 'Right'){ lMenu.style.position = "absolute"; lMenu.style.top = (parseInt(findPosY(lThis),10)+"px"); lMenu.style.left = (parseInt(findPosX(lThis),10)+"px"); }else if(pDir == 'Bottom'){ lMenu.style.position = "absolute"; lMenu.style.top = (parseInt(findPosY(lThis),10) + parseInt(lThis.offsetHeight,10)+"px"); lMenu.style.left = (parseInt(findPosX(lThis),10)+"px"); }else if(pDir == 'BottomRight'){ lMenu.style.position = "absolute"; lMenu.style.top = (parseInt(findPosY(lThis),10) + parseInt(lThis.offsetHeight,10)+"px"); lMenu.style.left = (parseInt(findPosX(lThis),10) - parseInt(lThis.offsetWidth,10)+"px"); }else if(pDir == 'Set'){ lMenu.style.position = "absolute"; lMenu.style.top = (parseInt(pY,10)+"px"); lMenu.style.left = (parseInt(pX,10)+"px"); }else { lMenu.style.position = "absolute"; lMenu.style.top = (parseInt(findPosY(lThis),10)+"px"); lMenu.style.left = (parseInt(findPosX(lThis),10) + parseInt(lThis.offsetWidth,10)+"px"); } $x_Show(lMenu); dhtml_FixLeft(lThis,lMenu,pDir); htmldb_IE_Select_Item_Fix(true); g_Single_Menu_Count = 0; g_Single_Menu = lMenu; document.onclick = dhtml_DocMenuSingleCheck; return; } /** @ignore */ function dhtml_FixLeft(pThis,pMenu,pDir){ var l_Width; if(document.all){ l_Width = document.body.clientWidth; } else { l_Width = window.innerWidth; } if (pDir=='bottom') { if(parseInt(l_Width,10) < parseInt(findPosX(pThis),10) + parseInt(pThis.offsetWidth,10) + parseInt(pMenu.offsetWidth,10)){ pMenu.style.position = "absolute"; pMenu.style.left = (parseInt(findPosX(pThis),10) - parseInt(pMenu.offsetWidth,10))+"px"; } } else { if(parseInt(l_Width,10) < parseInt(findPosX(pThis),10) + parseInt(pMenu.offsetWidth,10)){ pMenu.style.position = "absolute"; pMenu.style.left = (parseInt(findPosX(pThis),10) - parseInt(pMenu.offsetWidth,10))+"px"; } } return; } /** @ignore */ function htmldb_IE_Select_Item_Fix(pTest){ /* only run in IE and only if there is a select in the page*/ var lSel = document.getElementsByTagName('SELECT').length >= 1; if(document.all && pTest && lSel){ if(pTest.firstChild && pTest.firstChild.nodeName != 'IFRAME'){ pTest.innerHTML = '' + pTest.innerHTML; } } return; } /** @ignore */ var g_dhtmlMenuOn = "dhtmlMenuOn"; /** @ignore */ function app_AppMenuMultiOpenBottom(pThis,pThat,pSub){ var lMenu = $x(pThat); if(pThis != gCurrentAppMenuImage){ app_AppMenuMultiClose(); var l_That = pThis.previousSibling.firstChild ; pThis.className = g_dhtmlMenuOn; dhtml_MenuOpen(l_That,pThat,false,'Bottom'); gCurrentAppMenuImage = pThis; }else{ dhtml_CloseAllSubMenus(); app_AppMenuMultiClose(); } return; } /** @ignore */ function app_AppMenuMultiOpenBottom2(pThis,pThat,pSub){ var lMenu = $x(pThat); if(pThis != gCurrentAppMenuImage){ app_AppMenuMultiClose(); var l_That = pThis.parentNode; pThis.className = g_dhtmlMenuOn; dhtml_MenuOpen(l_That,pThat,false,'Bottom'); gCurrentAppMenuImage = pThis; }else{ dhtml_CloseAllSubMenus(); app_AppMenuMultiClose(); } return; } /** @ignore */ function $a_report(pId,pMin,pMax,pFetched,pSort){ lThis = $u_js_temp_drop(); var lOld = $x('report_'+pId+'_catch'); lOld.id = 'report_'+pId+'_catch_old'; var l_URL = 'p='+$v('pFlowId')+':'+$v('pFlowStepId')+':'+$v('pInstance')+':FLOW_PPR_OUTPUT_R'+pId+'_'; if(!!pSort){l_URL += pSort+'::RP&fsp_region_id='+pId;} else{l_URL += 'pg_R_'+pId+':NO&pg_max_rows='+pMax+'&pg_min_row='+pMin+'&pg_rows_fetched='+pFetched;} var ajax = new htmldb_Get(null,null,null,null,null,'f',l_URL); var gReturn = ajax.get(); lThis.innerHTML = gReturn; lOld.innerHTML = $x('report_'+pId+'_catch').innerHTML; lOld.id = 'report_'+pId+'_catch'; lThis.innerHTML = ''; return; } /** * puts an invisible and temporary div in the page to capture html coming in from an ajax call * @function */ function $u_js_temp_drop(){ var lThis = $x('apex_js_temp_drop'); if(!lThis){ lThis = $dom_AddTag(document.body,'DIV'); lThis.id = 'apex_js_temp_drop'; $x_Hide(lThis); } lThis.innerHTML = ''; return lThis; } function $u_js_temp_clear(){ var lThis = $x('apex_js_temp_drop'); if(lThis){lThis.innerHTML = '';} return lThis; } /** @ignore */ function $a_report_Split(pThis,pArgs){ var lArgs=pArgs.split("_"); $a_report(pThis,lArgs[0],lArgs[1],lArgs[2]); } /* Begin Smart Table Code */ /** @ignore */ function html_RemoveRow(pId){ var l_Table = $x('htmldbAddRowTable'); var l_Row = $x_UpTill(pId,'TR'); if(l_Table.childNodes.length >= 2 && l_Row){ l_Table.removeChild(l_Row); l_Table.normalize(); } return; } /* inits the Add Row Table */ /** @ignore */ var g_CheckedArray_IE; /** @ignore */ function ie_RowFixStart(pThis){ if(document.all){ var l_Items = $x_FormItems(pThis,'checkbox'); g_CheckedArray_IE = []; for (var i=0,len=l_Items.length;i=0;i--){ if(!!pShuttle.options[i].selected){if(pDir == 'D'){if(i!=lLength-1){pShuttle.insertBefore(pShuttle.options[i], pShuttle.options[i+2]);}}} } }else{ var l_Opt = []; for (i=0;i=0;i--){pShuttle.insertBefore(l_Opt[i],pShuttle.firstChild);} } } }; /** * @extends dhtml_ShuttleObject */ this.sort1 = function (pDir){this.sort(this.Select1,pDir);}; /** * @extends dhtml_ShuttleObject */ this.sort2 = function (pDir){this.sort(this.Select2,pDir);}; return; } /** * @ignore * @function * */ function $d_Overlap(pThis,pThat){ var lReturn = true; var lReturn2 = true; var l = findPos(pThis); var lX = l[0]; var lY = l[1]; var lT = findPos(pThat); var lTX = lT[0]; var lTY = lT[1]; if(lTX > lX || lX > lTX + pThat.offsetWidth){lReturn = false;} if(lTY > lY || lY > lTY + pThat.offsetHeight){lReturn = false;} return lReturn; } /** * @ignore * @function * */ function apex_RefreshChart(page_id,region_id,browser_lang) { var get = new htmldb_Get(null,$v('pFlowId'), 'FLOW_FLASH_CHART_R' + region_id + '_' + browser_lang, page_id); var gReturn = get.get(); get = null; if(ie){window["c"+region_id].SetXMLText(gReturn);} else{document["c"+region_id].SetXMLText(gReturn);} } /** * @ignore * @function * */ function apex_SWFFormFix(swfname){ if(!ie){return false;} var testnodename = "SWFFormFix"; document.write(''); $x(testnodename).onclick(); } /** * @ignore * @function * */ function apex_SWFFormFixCallback(obj,swfname){ var path = document; var testnode = obj; while(obj == obj.parentNode){ if(obj.nodeName.toLowerCase() == "form"){ if(!!obj.name && obj.name.length > 0){ path = path.forms[obj.name]; } } } testnode.parentNode.removeChild(testnode); window[swfname]=path[swfname]; return true; } /** * @ignore * @function * */ function colorPopUp(pItemName){ return html_PopUp("wwv_flow_utilities.gen_popup_color?p_item_name=" + escape(pItemName),"ColorPicker",250,255,'no','no'); } /** * @ignore * @function * */ function changePreviewColor(pThis){ var x = $x(pThis).value; $x_Style(pThis.id+'_PREVIEW','background',x); } /** * @deprecated * @function * */ function html_processing(){ var t = $x("htmldbWait"); if (!t) { var l_newDiv = document.createElement('DIV'); l_newDiv.className="htmldbProcessing"; l_newDiv.style.zIndex=20000; l_newDiv.id = "htmldbDisablePage"; l_newDiv.style.width = "100%"; l_newDiv.style.height = "100%"; l_newDiv.onclick = "return false;"; l_newDiv.style.position="absolute"; l_newDiv.style.top="0"; l_newDiv.style.left="0"; document.body.insertBefore(l_newDiv,document.body.firstChild); } } /** * @deprecated * @function * */ function html_enableBase(){ var t = $x("htmldbDisablePage"); if (t){t.parentNode.removeChild(t);} } /** * @deprecated * @function * */ function html_disableBase(z,c){ var t = $x("htmldbDisablePage"); if (!t) { var l_newDiv = document.createElement('DIV'); l_newDiv.className = (!!c)?c:"htmldbDisablePage"; l_newDiv.style.zIndex=z; l_newDiv.id = "htmldbDisablePage"; l_newDiv.style.width = "100%"; l_newDiv.style.height = "100%"; l_newDiv.onclick = "return false;"; l_newDiv.style.position="absolute"; l_newDiv.style.top="0"; l_newDiv.style.left="0"; document.body.insertBefore(l_newDiv,document.body.firstChild); } } /** * @deprecated * @function * */ function dhtml_CloseDialog(pThis){ html_enableBase(); $x_Hide($x_UpTill(pThis,'TABLE')); toolTip_disable(); } /** * @deprecated * @function * */ function html_Centerme(id){ var t = $x(id); if(document.all){ l_Width = document.body.clientWidth; l_Height = document.body.clientHeigth; }else{ l_Width = window.innerWidth; l_Height = window.innerHeight; } var tW=t.offsetWidth; var tH=t.offsetHeight; t.style.top = '40%'; t.style.left = '40%'; } /** * @deprecated * @function * */ function hideShow(objectID,imgID,showImg,hideImg){ var theImg = $x(imgID); var theDiv = $x(objectID); if(theDiv.style.display == 'none' || theDiv.style.display == '' || theDiv.style == null){ theImg.src = hideImg; $x(objectID).style.display = 'block';} else{ theImg.src = showImg; $x(objectID).style.display = 'none';} return; } /** * @deprecated * @function * */ 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'; } } } } /** * @deprecated * @function * */ function htmldbCheckCookie(pThis){ SetCookie ('ISCOOKIE','true'); flow = GetCookie ('ISCOOKIE'); return; } /** * @deprecated * @function * */ function shuttleItem(theSource, theDest, moveAll) { var srcList = $x(theSource),destList = $x(theDest),arrsrcList = [],arrdestList = [],arrLookup = [],i; if (moveAll){ for (i = 0;i <= srcList.length-1; i++ ){ srcList.options[i].selected = true;} } for (i = 0; i < destList.options.length; i++) { arrLookup[destList.options[i].text] = destList.options[i].value; arrdestList[i] = destList.options[i].text;} var fLength = 0; var tLength = arrdestList.length; for(i = 0; i < srcList.options.length; i++) { arrLookup[srcList.options[i].text] = srcList.options[i].value; if (!!srcList.options[i].selected && !!srcList.options[i].value) { arrdestList[tLength] = srcList.options[i].text; tLength++;} else { arrsrcList[fLength] = srcList.options[i].text; fLength++;} } arrsrcList.sort(); arrdestList.sort(); srcList.length = 0; destList.length = 0; var c,no; for(c = 0; c < arrsrcList.length; c++) { no = new Option(); no.value = arrLookup[arrsrcList[c]]; no.text = arrsrcList[c]; srcList[c] = no; } for(c = 0; c < arrdestList.length; c++) { no = new Option(); no.value = arrLookup[arrdestList[c]]; no.text = arrdestList[c]; destList[c] = no; } } /** * @deprecated * @function * */ function cDebug(pThis,pThat){} /** * @deprecated * @function * */ function html_VisibleElement(pNd){var l_Node = $x(pNd);if(l_Node){l_Node.style.visibility = "visible";}return l_Node;} /** * @deprecated * @function * */ function html_HiddenElement(pNd){var l_Node = $x(pNd);if(l_Node){l_Node.style.visibility = "hidden";}return l_Node;} /** * @deprecated use * @function * */ function html_TabMakeCurrent(pThis){var node = $x(pThis);if(node){var nodeSibs = node.parentNode.parentNode.childNodes;for(var i=0;i < nodeSibs.length;i++){if(nodeSibs[i] && nodeSibs[i].nodeType == 1 && nodeSibs[i].getElementsByTagName('A')[0]){nodeSibs[i].getElementsByTagName('A')[0].className = "";}}pThis.className = "tabcurrent";}return node;} /** * @deprecated use $x_HideSiblings * @function * */ html_HideSiblings = $x_HideSiblings; /** * @deprecated use $x_ShowSiblings * @function * */ html_ShowSiblings = $x_ShowSiblings; /** * @deprecated * @function * */ function html_ShowAllByClass(pThis,pClass,pTag) {$x_ShowAllByClass(pThis,pClass,pTag);} /** * @deprecated * @function * */ function f_Hide_On_Value_Item(pThis,pThat,pValue){return $f_Hide_On_Value_Item(pThis,pThat,pValue);} /** * @deprecated * @function * */ function f_Hide_On_Value_Item_Row(pThis,pThat,pValue){return $f_Hide_On_Value_Item_Row(pThis,pThat,pValue);} /** * @deprecated * @function * */ function html_disableItems(a,nd){if(nd){var lArray = [];for (var i=1,len=arguments.length;i= 0){l_Rid = l_Rid.substring(0,l_PTest); }else if (l_CTest >= 0){l_Rid = l_Rid.substring(0,l_CTest);} return l_Rid; } /** * @deprecated * @function * */ function init_htmlPPRReport2(pId){ var l_Table = $x('report'+pId); if(l_Table){ var l_THS = l_Table.getElementsByTagName('TH'); for(var i = 0;i',''); if(pHeader){$x('report'+ l_pRid).innerHTML = pHeader + $x('report'+ l_pRid).innerHTML;} if(pFooter){$x('report'+ l_pRid).innerHTML += pFooter;} document.body.style.cursor = ''; init_htmlPPRReport(l_pRid); http = null; return; } /** * @deprecated * @function * */ function PPR_Tabluar_Submit(pId,pFlowID,pPageId,pRequest,pInsertReturn,pReportId,pReplacementOveride){ var pThis = $x(pId),get,i,q; if(pInsertReturn){get = new htmldb_Get(pId,pFlowID,pRequest,pPageId,null,'wwv_flow.accept');} else{get = new htmldb_Get(null,pFlowID,pRequest,pPageId,null,'wwv_flow.accept');} var lItems = $x_FormItems(pThis); for(i=0;i',''); }else{ q = get.get(null,'',''); } if(pReportId){init_htmlPPRReport(pReportId);} get = null; return q; } /** * @deprecated * @function * */ function removeMessageTimeout(){setTimeout(function(){$x('htmldbMessageHolder').innerHTML = '';},5000);} /** * @deprecated * */ html_RowHighlight = $x_RowHighlight; /** * @deprecated * @function * */ html_RowHighlightOff = $x_RowHighlightOff; /** * @deprecated * @function * */ html_SelectedOptions = $f_SelectedOptions; /** * @deprecated * @function * */ html_SelectValue = $f_SelectValue;