/** * * GUI js variables * */ var _PFWGUI=Array(); _PFWGUI["navigation.sections"]="admin,task,cma,file,template"; _PFWGUI["navigation.section.admin"]="server,log,event,channel,user,role,workflow,dbc,table,cluster,report"; _PFWGUI["navigation.section.admin.icon"]="navadmin.gif"; _PFWGUI["navigation.section.admin.text"]="collapse admin"; _PFWGUI["navigation.section.admin.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.task"]="task"; _PFWGUI["navigation.section.task.icon"]="navtask.gif"; _PFWGUI["navigation.section.task.text"]="collapse tasks"; _PFWGUI["navigation.section.task.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.cma"]="cma"; _PFWGUI["navigation.section.cma.icon"]="navcma.gif"; _PFWGUI["navigation.section.cma.text"]="collapse cma"; _PFWGUI["navigation.section.cma.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.file"]="file,templatetags,cmatags"; _PFWGUI["navigation.section.file.icon"]="navfile.gif"; _PFWGUI["navigation.section.file.text"]="collapse files"; _PFWGUI["navigation.section.file.funcleft"]="/pfw/file/func.left.php"; _PFWGUI["navigation.section.template"]="template"; _PFWGUI["navigation.section.template.icon"]="navtemplate.gif"; _PFWGUI["navigation.section.template.text"]="collapse templates"; _PFWGUI["navigation.section.template.funcleft"]="/pfw/template/func.left.php"; _PFWGUI["navigation.section.admin.server.tree"]="server"; _PFWGUI["navigation.section.admin.server.text"]="tree_server"; _PFWGUI["navigation.section.admin.server.nosrvid"]="1"; _PFWGUI["navigation.section.admin.server.nochilds"]="1"; _PFWGUI["navigation.section.admin.server.url.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.admin.server.url.funcright"]="/pfw/server/func.right.php"; _PFWGUI["navigation.section.admin.server.url.list"]="/pfw/server/list.php"; _PFWGUI["navigation.section.admin.log.tree"]="log"; _PFWGUI["navigation.section.admin.log.text"]="tree_log"; _PFWGUI["navigation.section.admin.log.nosrvid"]="1"; _PFWGUI["navigation.section.admin.log.nochilds"]="1"; _PFWGUI["navigation.section.admin.log.url.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.admin.log.url.funcright"]="/pfw/log/func.right.php"; _PFWGUI["navigation.section.admin.log.url.list"]="/pfw/log/list.php"; _PFWGUI["navigation.section.admin.event.tree"]="event"; _PFWGUI["navigation.section.admin.event.text"]="tree_event"; _PFWGUI["navigation.section.admin.event.nochilds"]="1"; _PFWGUI["navigation.section.admin.event.url.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.admin.event.url.funcright"]="/pfw/event/func.right.php"; _PFWGUI["navigation.section.admin.event.url.list"]="/pfw/event/list.php"; _PFWGUI["navigation.section.admin.channel.tree"]="channel"; _PFWGUI["navigation.section.admin.channel.text"]="tree_channel"; _PFWGUI["navigation.section.admin.channel.nochilds"]="1"; _PFWGUI["navigation.section.admin.channel.url.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.admin.channel.url.funcright"]="/pfw/channel/func.right.php"; _PFWGUI["navigation.section.admin.channel.url.list"]="/pfw/channel/list.php"; _PFWGUI["navigation.section.admin.user.tree"]="usertype"; _PFWGUI["navigation.section.admin.user.text"]="tree_user"; _PFWGUI["navigation.section.admin.user.url.funcleft"]="/pfw/user/func.left.php?id=__ustid__"; _PFWGUI["navigation.section.admin.user.url.funcright"]="/pfw/user/func.right.php?id=__ustid__"; _PFWGUI["navigation.section.admin.user.url.list"]="/pfw/user/list.php?id=__ustid__"; _PFWGUI["navigation.section.admin.role.tree"]="rolecat"; _PFWGUI["navigation.section.admin.role.text"]="tree_role"; _PFWGUI["navigation.section.admin.role.url.funcleft"]="/pfw/role/func.left.php?id=__rlcid__"; _PFWGUI["navigation.section.admin.role.url.funcright"]="/pfw/role/func.right.php?id=__rlcid__"; _PFWGUI["navigation.section.admin.role.url.list"]="/pfw/role/list.php?id=__rlcid__"; _PFWGUI["navigation.section.admin.workflow.tree"]="workflowcat"; _PFWGUI["navigation.section.admin.workflow.text"]="tree_workflow"; _PFWGUI["navigation.section.admin.workflow.url.funcleft"]="/pfw/workflow/func.left.php?id=__wkcid__"; _PFWGUI["navigation.section.admin.workflow.url.funcright"]="/pfw/workflow/func.right.php?id=__wkcid__"; _PFWGUI["navigation.section.admin.workflow.url.list"]="/pfw/workflow/list.php?id=__wkcid__"; _PFWGUI["navigation.section.admin.dbc.tree"]="dbc"; _PFWGUI["navigation.section.admin.dbc.text"]="tree_dbc"; _PFWGUI["navigation.section.admin.dbc.nochilds"]="1"; _PFWGUI["navigation.section.admin.dbc.url.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.admin.dbc.url.funcright"]="/pfw/dbc/func.right.php"; _PFWGUI["navigation.section.admin.dbc.url.list"]="/pfw/dbc/list.php"; _PFWGUI["navigation.section.admin.table.tree"]="tablecat"; _PFWGUI["navigation.section.admin.table.text"]="tree_table"; _PFWGUI["navigation.section.admin.table.dtbtype"]="data"; _PFWGUI["navigation.section.admin.table.url.funcleft"]="/pfw/table/func.left.php?id=__dtcid__"; _PFWGUI["navigation.section.admin.table.url.funcright"]="/pfw/table/func.right.php?id=__dtcid__"; _PFWGUI["navigation.section.admin.table.url.list"]="/pfw/table/list.php?id=__dtcid__"; _PFWGUI["navigation.section.admin.cluster.tree"]="tablecat"; _PFWGUI["navigation.section.admin.cluster.text"]="tree_cluster"; _PFWGUI["navigation.section.admin.cluster.dtbtype"]="cluster"; _PFWGUI["navigation.section.admin.cluster.icon"]="cmacluster.gif"; _PFWGUI["navigation.section.admin.cluster.url.funcleft"]="/pfw/table/func.left.php?id=__dtcid__"; _PFWGUI["navigation.section.admin.cluster.url.funcright"]="/pfw/cluster/func.right.php?id=__dtcid__"; _PFWGUI["navigation.section.admin.cluster.url.list"]="/pfw/cluster/list.php?id=__dtcid__"; _PFWGUI["navigation.section.admin.report.tree"]="tablecat"; _PFWGUI["navigation.section.admin.report.text"]="tree_report"; _PFWGUI["navigation.section.admin.report.dtbtype"]="report"; _PFWGUI["navigation.section.admin.report.icon"]="cmareport.gif"; _PFWGUI["navigation.section.admin.report.url.funcleft"]="/pfw/table/func.left.php?id=__dtcid__"; _PFWGUI["navigation.section.admin.report.url.funcright"]="/pfw/report/func.right.php?id=__dtcid__"; _PFWGUI["navigation.section.admin.report.url.list"]="/pfw/report/list.php?id=__dtcid__"; _PFWGUI["navigation.section.task.task.tree"]="task"; _PFWGUI["navigation.section.task.task.text"]="tree_task"; _PFWGUI["navigation.section.task.task.nochilds"]="1"; _PFWGUI["navigation.section.task.task.url.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.task.task.url.funcright"]="/pfw/task/func.right.php?type=0"; _PFWGUI["navigation.section.task.task.url.list"]="/pfw/task/list.php?type=0"; _PFWGUI["navigation.section.cma.cma.tree"]="table"; _PFWGUI["navigation.section.cma.cma.text"]="tree_content"; _PFWGUI["navigation.section.cma.cma.role"]="read"; _PFWGUI["navigation.section.cma.cma.status"]="active"; _PFWGUI["navigation.section.cma.cma.icon"]="cma.gif"; _PFWGUI["navigation.section.cma.cma.counters"]="0"; _PFWGUI["navigation.section.cma.cma.url.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.cma.cma.url.funcright"]="/pfw/content/func.right.php?id=__dtbid__&type=__dtbtype__"; _PFWGUI["navigation.section.cma.cma.url.list"]="/pfw/content/list.php?id=__dtbid__&type=__dtbtype__"; _PFWGUI["navigation.section.file.file.tree"]="filecat"; _PFWGUI["navigation.section.file.file.text"]="tree_file"; _PFWGUI["navigation.section.file.file.role"]="read"; _PFWGUI["navigation.section.file.file.url.funcleft"]="/pfw/file/func.left.php?id=__flcid__&type=__flctype__"; _PFWGUI["navigation.section.file.file.url.funcright"]="/pfw/file/func.right.php?id=__flcid__&type=__flctype__"; _PFWGUI["navigation.section.file.file.url.list"]="/pfw/file/list.php?id=__flcid__&type=__flctype__"; _PFWGUI["navigation.section.file.templatetags.text"]="tree_file_tag_template"; _PFWGUI["navigation.section.file.templatetags.access"]="file"; _PFWGUI["navigation.section.file.templatetags.icon"]="filetag.gif"; _PFWGUI["navigation.section.file.templatetags.url.funcleft"]="/pfw/file/func.left.php"; _PFWGUI["navigation.section.file.templatetags.url.funcright"]="/pfw/file/func.right.php"; _PFWGUI["navigation.section.file.templatetags.url.list"]="/pfw/file/list.tags.php?type=0"; _PFWGUI["navigation.section.file.cmatags.text"]="tree_file_tag_cma"; _PFWGUI["navigation.section.file.cmatags.access"]="file"; _PFWGUI["navigation.section.file.cmatags.icon"]="filetag.gif"; _PFWGUI["navigation.section.file.cmatags.url.funcleft"]="/pfw/file/func.left.php"; _PFWGUI["navigation.section.file.cmatags.url.funcright"]="/pfw/file/func.right.php"; _PFWGUI["navigation.section.file.cmatags.url.list"]="/pfw/file/list.tags.php?type=1"; _PFWGUI["navigation.section.template.template.tree"]="templatecat"; _PFWGUI["navigation.section.template.template.text"]="tree_template"; _PFWGUI["navigation.section.template.template.role"]="read"; _PFWGUI["navigation.section.template.template.url.funcleft"]="/pfw/template/func.left.php?id=__tpcid__&channel=__tpcsch__"; _PFWGUI["navigation.section.template.template.url.funcright"]="/pfw/template/func.right.php?id=__tpcid__&channel=__tpcsch__"; _PFWGUI["navigation.section.template.template.url.list"]="/pfw/template/list.php?id=__tpcid__&channel=__tpcsch__"; _PFWGUI["navigation.plugins"]="bookmark,recent"; _PFWGUI["navigation.section.bookmark"]="bookmark"; _PFWGUI["navigation.section.bookmark.icon"]="bookmark.gif"; _PFWGUI["navigation.section.bookmark.text"]="collapse bookmarks"; _PFWGUI["navigation.section.bookmark.funcleft"]="/pfw/bookmark/func.left.php"; _PFWGUI["navigation.section.recent"]="recent"; _PFWGUI["navigation.section.recent.icon"]="recent.gif"; _PFWGUI["navigation.section.recent.text"]="collapse recent"; _PFWGUI["navigation.section.recent.funcleft"]="/main/func.left.php"; _PFWGUI["navigation.section.bookmark.bookmark.tree"]="bookmark"; _PFWGUI["navigation.section.bookmark.bookmark.text"]="tree_bookmark"; _PFWGUI["navigation.section.bookmark.bookmark.checkaccess"]="0"; _PFWGUI["navigation.section.bookmark.bookmark.autoreload"]="1"; _PFWGUI["navigation.section.bookmark.bookmark.autoopen"]="1"; _PFWGUI["navigation.section.bookmark.bookmark.url.funcleft"]="/pfw/bookmark/func.left.php"; _PFWGUI["navigation.section.bookmark.bookmark.url.funcright"]="/pfw/bookmark/func.right.php"; _PFWGUI["navigation.section.bookmark.bookmark.url.list"]="/pfw/bookmark/list.php"; _PFWGUI["navigation.section.recent.recent.tree"]="recent"; _PFWGUI["navigation.section.recent.recent.text"]="tree_recent"; _PFWGUI["navigation.section.recent.recent.checkaccess"]="0"; _PFWGUI["navigation.section.recent.recent.autoreload"]="1"; _PFWGUI["navigation.section.recent.recent.autoopen"]="1"; _PFWGUI["navigation.footer.actions"]="about,config,update,preferences,user,help,logout"; _PFWGUI["navigation.footer.actions.about.text"]="about"; _PFWGUI["navigation.footer.actions.about.url"]="javascript:ecmOpenDialog('/about.php',400,480)"; _PFWGUI["navigation.footer.actions.config.text"]="configure"; _PFWGUI["navigation.footer.actions.config.url"]="/pfw/config/admin.ini.php"; _PFWGUI["navigation.footer.actions.config.target"]="fRightApp"; _PFWGUI["navigation.footer.actions.config.onlyroot"]="1"; _PFWGUI["navigation.footer.actions.update.text"]="pfw update"; _PFWGUI["navigation.footer.actions.update.url"]="/pfw/config/admin.update.php"; _PFWGUI["navigation.footer.actions.update.target"]="fRightApp"; _PFWGUI["navigation.footer.actions.update.onlyroot"]="1"; _PFWGUI["navigation.footer.actions.preferences.text"]="preferences"; _PFWGUI["navigation.footer.actions.preferences.url"]="/pfw/config/admin.prefs.php"; _PFWGUI["navigation.footer.actions.preferences.target"]="fRightApp"; _PFWGUI["navigation.footer.actions.user.text"]="edit active user"; _PFWGUI["navigation.footer.actions.user.url"]="/pfw/user/admin.edit.php?edit=1"; _PFWGUI["navigation.footer.actions.user.target"]="fRightApp"; _PFWGUI["navigation.footer.actions.help.text"]="help"; _PFWGUI["navigation.footer.actions.help.url"]="/help"; _PFWGUI["navigation.footer.actions.help.target"]="_blank"; _PFWGUI["navigation.footer.actions.logout.text"]="logout"; _PFWGUI["navigation.footer.actions.logout.url"]="/logout.php"; _PFWGUI["navigation.footer.actions.logout.target"]="_top"; _PFWGUI["frame.funcleft.path"]="top.fApp.fLeftFunc"; _PFWGUI["frame.funcright.path"]="top.fApp.fRight.fRightApp.fRightFunc"; _PFWGUI["frame.list.path"]="top.fApp.fRight.fRightApp.fRightList"; _PFWGUI["frame.tree.path"]="top.fApp.fLeftTree"; _PFWGUI["frame.app.path"]="top.fApp.fRight.fRightApp"; _PFWGUI["frame.nav.path"]="top.fApp.fLeftNav"; _PFWGUI["frame.functions.addtoiconheight"]="20"; _PFWGUI["frame.nav.addtoiconheight"]="4"; _PFWGUI["frame.nav.addtoframeheight.sections"]="1"; _PFWGUI["frame.nav.addtoframeheight.plugins"]="1"; _PFWGUI["frame.tree.width"]="230"; _PFWGUI["frame.search.width"]="230"; _PFWGUI["icons.available_sizes.nav"]="48"; _PFWGUI["icons.available_sizes.functions"]="16"; _PFWGUI["icons.available_sizes.tree"]="16"; _PFWGUI["icons.available_sizes.detail"]="16"; _PFWGUI["icons.available_sizes.list_head"]="16"; _PFWGUI["icons.available_sizes.list"]="64"; _PFWGUI["icons.available_sizes.editor"]="24"; _PFWGUI["icons.default_size.nav"]="48"; _PFWGUI["icons.default_size.functions"]="16"; _PFWGUI["icons.default_size.tree"]="16"; _PFWGUI["icons.default_size.detail"]="16"; _PFWGUI["icons.default_size.list_head"]="16"; _PFWGUI["icons.default_size.list"]="64"; _PFWGUI["icons.default_size.editor"]="24"; _PFWGUI["list"]="#f4f4f4"; _PFWGUI["list_alt"]="#ededed"; _PFWGUI["list_selected"]="#d7e4ec"; _PFWGUI["list_over"]="#d7e4ec"; _PFWGUI["misc.presubmitfunction"]="ecmShowLoading()"; /** * * Generic js functions * */ document.getElementsByAttribute=function(attrN,attrV,multi){ attrV=attrV.replace(/\|/g,'\\|').replace(/\[/g,'\\[').replace(/\(/g,'\\(').replace(/\+/g,'\\+').replace(/\./g,'\\.').replace(/\*/g,'\\*').replace(/\?/g,'\\?').replace(/\//g,'\\/'); var multi=typeof multi!='undefined'? multi: false, cIterate=typeof document.all!='undefined'? document.all: document.getElementsByTagName('*'), aResponse=[], re=new RegExp(multi? '\\b'+attrV+'\\b': '^'+attrV+'$'), i=0, elm; while((elm=cIterate.item(i++))){ if(re.test(elm.getAttribute(attrN)||'')) aResponse[aResponse.length]=elm; } return aResponse; } /* * Author: Rob Reid * CreateDate: 20-Mar-09 * Description: Little helper function to return details about IE 8 and its various compatibility settings either use as it is * or incorporate into a browser object. Remember browser sniffing is not the best way to detect user-settings as spoofing is * very common so use with caution. */ function IEVersion(){ var _n=navigator,_w=window,_d=document; var version="NA"; var na=_n.userAgent; var ieDocMode="NA"; var ie8BrowserMode="NA"; // Look for msie and make sure its not opera in disguise if(/msie/i.test(na) && (!_w.opera)){ // also check for spoofers by checking known IE objects if(_w.attachEvent && _w.ActiveXObject){ // Get version displayed in UA although if its IE 8 running in 7 or compat mode it will appear as 7 version = (na.match( /.+ie\s([\d.]+)/i ) || [])[1]; // Its IE 8 pretending to be IE 7 or in compat mode if(parseInt(version)==7){ // documentMode is only supported in IE 8 so we know if its here its really IE 8 if(_d.documentMode){ version = 8; //reset? change if you need to // IE in Compat mode will mention Trident in the useragent if(/trident\/\d/i.test(na)){ ie8BrowserMode = "Compat Mode"; // if it doesn't then its running in IE 7 mode }else{ ie8BrowserMode = "IE 7 Mode"; } } }else if(parseInt(version)==8){ // IE 8 will always have documentMode available if(_d.documentMode){ ie8BrowserMode = "IE 8 Mode";} } // If we are in IE 8 (any mode) or previous versions of IE we check for the documentMode or compatMode for pre 8 versions ieDocMode = (_d.documentMode) ? _d.documentMode : (_d.compatMode && _d.compatMode=="CSS1Compat") ? 7 : 5;//default to quirks mode IE5 } } return { "UserAgent" : na, "Version" : version, "BrowserMode" : ie8BrowserMode, "DocMode": ieDocMode } } function inArray (needle,haystack) { for (i=0;i= arguments.length) { alert('Error! Not enough function arguments (' + (arguments.length - 1) + ', excluding the string)\nfor the number of substitution parameters in string (' + numSubstitutions + ' so far).'); } var param = arguments[numSubstitutions]; var pad = ''; if (pPad && pPad.substr(0,1) == "'") { pad = leftpart.substr(1,1); } else if (pPad) { pad = pPad; } var justifyRight = true; if (pJustify && pJustify === "-") justifyRight = false; var minLength = -1; if (pMinLength) minLength = parseInt(pMinLength); var precision = -1; if (pPrecision && pType == 'f') precision = parseInt(pPrecision.substring(1)); var subst = param; if (pType == 'b') subst = parseInt(param).toString(2); else if (pType == 'c') subst = String.fromCharCode(parseInt(param)); else if (pType == 'd') subst = parseInt(param) ? parseInt(param) : 0; else if (pType == 'u') subst = Math.abs(param); else if (pType == 'f') subst = (precision > -1) ? Math.round(parseFloat(param) * Math.pow(10, precision)) / Math.pow(10, precision): parseFloat(param); else if (pType == 'o') subst = parseInt(param).toString(8); else if (pType == 's') subst = param; else if (pType == 'x') subst = ('' + parseInt(param).toString(16)).toLowerCase(); else if (pType == 'X') subst = ('' + parseInt(param).toString(16)).toUpperCase(); } str = leftpart + subst + rightPart; } return str; } function callAction (action,extraqstr) { querystr=""; fields=document.getElementsByTagName("INPUT"); if (fields!=null) { for (i=0;i=0) { if ((source.options[ielement].selected)||(selectall)) { myoption = new Option(source.options[ielement].text,source.options[ielement].value,false,true); destination.options[destination.length]=myoption; source.options[ielement] = null; } ielement--; } } function selectAll (thefield) { if (thefield!=null) { for (i=0;i1) { if (document.getElementById(lastEcmAutocompleteName+"_"+(lastEcmAutocompletePos-1))!=null) { if (document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos)!=null) { ecmAutocompleteOut(document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos)); } lastEcmAutocompletePos--; ecmAutocompleteOver(document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos)); } } } } else if (event.keyCode==40) { // DOWN if (document.getElementById(lastEcmAutocompleteName).style.display=='none') { ecmDoAutocomplete(); } else { if (document.getElementById(lastEcmAutocompleteName+"_"+(lastEcmAutocompletePos+1))!=null) { if (document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos)!=null) { ecmAutocompleteOut(document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos)); } lastEcmAutocompletePos++; ecmAutocompleteOver(document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos)); } } } else if (event.keyCode==13) { // ENTER if (lastEcmAutocompletePos>0) { elm=document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos); if (elm.getAttribute("type")=="pageUp") { ecmDoAutocomplete(lastEcmAutocompleteBegin-10); lastEcmAutocompletePos=-1; } else if (elm.getAttribute("type")=="pageDown") { ecmDoAutocomplete(lastEcmAutocompleteBegin+10); lastEcmAutocompletePos=1; } else if (elm.getAttribute("type")!="noItems") { ecmAutocompleteSelect(elm); } } } else if (event.keyCode==27) { // ESCAPE ecmAutocompleteReset(true); } else { // Launch the autocomplete method after {ecmAutocompleteWait} miliseconds lastEcmAutocompleteCursor=field.selectionEnd; ecmAutocompleteReset(false); setTimeout("ecmDoAutocomplete()",ecmAutocompleteWait); } } } } function ecmDoAutocomplete(begin) { lastEcmAutocompleteBegin=0; // check the value has not changed in the last {ecmAutocompleteWait} milliseconds // useful if you're typing at fast speed and you don't wnat the autocomplete to // be triggered every now and then if (lastEcmAutocompleteValue==lastEcmAutocomplete.value) { url ="/pfw/browse/autocomplete.php"; url+="?type="+lastEcmAutocompleteType; url+="&value="+encodeURIComponent(lastEcmAutocomplete.value); url+="&name="+encodeURIComponent(lastEcmAutocompleteName); url+="&cursor="+encodeURIComponent(lastEcmAutocompleteCursor); if (begin!=null) { url+="&begin="+begin; lastEcmAutocompleteBegin=begin; } url+=lastEcmAutocompleteQuerystr; guiHTMLLoad(lastEcmAutocomplete.name+"_autocomplete",url); document.getElementById(lastEcmAutocompleteName).style.display=''; } } function ecmAutocompleteOver(elm) { if (lastEcmAutocompletePos>0) { if (document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos)!=null) { ecmAutocompleteOut(document.getElementById(lastEcmAutocompleteName+"_"+lastEcmAutocompletePos)); } } elm.className='autocompleteOver'; elm.style.cursor='pointer'; lastEcmAutocompletePos=parseInt(elm.getAttribute("paramnumber")); } function ecmAutocompleteOut(elm) { elm.className='autocompleteOut' } function ecmAutocompleteSelect(elm) { lastEcmAutocomplete.value=elm.getAttribute("paramvalue"); lastEcmAutocompleteValue=lastEcmAutocomplete.value; lastEcmAutocomplete.focus(); if (elm.getAttribute("paramclose")=="true") { document.getElementById(lastEcmAutocompleteName).style.display='none'; } if (elm.getAttribute("paramnext")=="true") { ecmDoAutocomplete(); } if (elm.getAttribute("paramid0")!="") { lastEcmAutocompleteId0.value=elm.getAttribute("paramid0"); } if (elm.getAttribute("paramid1")!="") { lastEcmAutocompleteId1.value=elm.getAttribute("paramid1"); } if (elm.getAttribute("paramid2")!="") { lastEcmAutocompleteId2.value=elm.getAttribute("paramid2"); } ecmAutocompleteReset(false); } function ecmAutocompleteReset(resetall) { if (resetall) { if (document.getElementById(lastEcmAutocompleteName)!=null) { document.getElementById(lastEcmAutocompleteName).style.display='none'; } lastEcmAutocompleteValue=""; } lastEcmAutocompletePos=0; } /** * * Common javascript functions * */ var dialogWin=new Object(); function ecmOpenDialog(url,width,height,returnFunc,args) { if (!dialogWin.win || (dialogWin.win && dialogWin.win.closed)) { // Initialize properties of the window object. dialogWin.returnFunc=returnFunc; dialogWin.returnedValue=""; dialogWin.args=args; dialogWin.url=url; dialogWin.width=width; dialogWin.height=height; // Keep name unique so Navigator doesn't overwrite an existing dialog. dialogWin.name=(new Date()).getSeconds().toString(); // Assemble window attributes and try to center the dialog. if (!document.all) { dialogWin.left=window.screenX + ((window.outerWidth - dialogWin.width) / 2); dialogWin.top=window.screenY + ((window.outerHeight - dialogWin.height) / 2); var attr="screenX="+dialogWin.left+",screenY="+dialogWin.top+",resizable=yes,scrollbars=yes,width="+dialogWin.width+",height="+dialogWin.height; } else { dialogWin.left=(screen.width - dialogWin.width) / 2; dialogWin.top=(screen.height - dialogWin.height) / 2; var attr="left="+dialogWin.left+",top="+dialogWin.top+",resizable=yes,scrollbars=yes,width="+dialogWin.width+",height="+dialogWin.height; } // Generate the dialog and make sure it has focus. dialogWin.win=window.open(dialogWin.url, dialogWin.name, attr) dialogWin.win.focus() } else { dialogWin.win.focus() } } function ecmLoad (funcleft,funcright,list) { if (funcleft!='') top.fApp.fLeftFunc.location.href=funcleft; if ((funcright!='')||(list!='')) { url="/ecm.php?template=framesrightapp&funclist="+escape(funcright)+"&list="+escape(list); if (document.all) { if (url.length>2054) url=url.substr(0,2054); } top.fApp.fRight.fRightApp.location.href=url; } } function ecmCancel (funcright,list,invoker) { if (opener) { window.close(); } else { ecmLoad('',funcright,list); } } function ecmClose (funcright,list) { if (opener) { try { if ((opener.top!=null)&&(opener.top.fApp!=null)) { opener.top.fApp.fRight.fRightApp.location.reload(); } } catch (e) {} window.close(); } else { ecmLoad('',funcright,list); } } function ecmCloseNoreload (funcright,list) { if (opener) { try { if ((opener.top!=null)&&(opener.top.fApp!=null)) { opener.top.fApp.fRight.fRightApp.fRightFunc.location.href=funcright; opener.top.fApp.fRight.fRightApp.fRightList.location.href=list; } } catch (e) {} window.close(); } else { ecmLoad('',funcright,list); } } function ecmGoto (url) { document.location.href=url; }