// Licensed Materials - Property of IBM // // IBM Cognos Products: pps // // (C) Copyright IBM Corp. 2005, 2019 // // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. // This forms the javascript functions used for PowerPlay Studio. // except for those functions involved with HTML4 // The functions handle any minor browser differences. // Browser detection code var version = parseInt(navigator.appVersion); var isIE = navigator.appVersion.indexOf("MSIE")>0; var isNS = navigator.appName.indexOf("Netscape")>=0; if( navigator.appVersion == "" ) isIE = true; var isIE3 = isIE && version<4; var isIE4 = isIE && version>=4; var isNS3 = isNS && version<4; var isNS4 = isNS && version>=4; var fh, fdb, fm, img, iconHelp; var imgNm; var FTok = false; var _fhchanged = false; var _fhtarget; var _fhaction; var _fhRA; var gparent = getGrandParentofFXWindow(); var sparent = getGrandParentofFXWindowAsString(); var hasFinishedLoading = 0; var pdb; //for primitive debugger... //used in formURL() var _essHidden = new Array(); _essHidden[0] = "DC"; _essHidden[1] = "E"; _essHidden[2] = "I"; _essHidden[3] = "LA"; _essHidden[4] = "LO"; _essHidden[5] = "M"; _essHidden[6] = "RC"; _essHidden[7] = "DM"; _essHidden[8] = "DX"; _essHidden[9] = "PH"; _essHidden[10] = "PT"; _essHidden[11] = "FC"; _essHidden[12] = "Y"; _essHidden[13] = "G"; _essHidden[14] = "H"; _essHidden[15] = "J"; _essHidden[16] = "K"; _essHidden[17] = "SHN"; function winFocus(w) { if(w!=null&&w.focus!=null) w.focus(); } function checkFrame() { var fh=document.fhidden; if (parent == self || !gparent.sync) { resetHiddenForm(); // Invoked without frameset fh.CNCT.value=0; fh.submit(); } } function sync( ){ img=gparent.FT.img; iconHelp=gparent.FT.iconHelp1; FTok = true; } function NoDebugger () { window.onerror=function (msg,url,line){ return true }; this.out = noFunc; this.dump = noFunc; this.dumpArgs = noFunc; this.getObjectName = noFunc; this.getFunctionName = noFunc; this.checkHide = noFunc; } function noFunc() { return true; } function initDebug() { if (typeof Debugger != "undefined") { pdb = new Debugger (); } else { pdb = new NoDebugger (); } } function initVars(){ initDebug(); fh=document.fhidden; fh.CO.value = ""; if (!gparent.is_save && fh.DSHSP) { fh.removeChild(fh.DSHSP); } captureScreenRes(fh); fdb=document.fdimbar; if (isIE3) fm=document.fmeasure; else fm=document.fmain; if(gparent.FXloaded!=null){ if (!fh.YS) gparent.FXloaded=1; else { if (window.name == "FX1") { gparent.FX1loaded=1; } if (window.name == "FX2") { gparent.FX2loaded=1; } if (gparent.FX1loaded && gparent.FX2loaded) { gparent.FXloaded=1; } } gparent.sync(); } } function captureScreenRes(fh){ setCookie("BRes",screen.availWidth + "*" + screen.availHeight,(10*365),cookieSecure); } function initNormal(){ checkFrame(); if ( parseInt(QPversion) != parseInt(JavaScriptVersion) ) alert(invalidVersion); } function getIContext() { var str = "window.parent.parent.parent." + window.parent.parent.name + "iContext"; var icontext = eval(str); if (icontext != null && typeof icontext != "undefined" && icontext.iEvents != null && icontext.iEvents.fireEvent != null) { return icontext; } return null; } function fireEvent(evt, params, payload) { var icontext = getIContext(); if (icontext != null) { icontext.iEvents.fireEvent(evt, params, payload); } } function updateToolbar() { var icontext = getIContext(); if (icontext != null && icontext.scope) { icontext.scope.initOnDemandToolbar(); } } function init(){ initVars(); fh.RA.value = ""; initNormal(); updateToolbar(); if (gparent.initialOpen) { gparent.initialOpen = false; if (!gparent.is_save && !gparent.no_auto_resize) { fireEvent('com.ibm.bux.widget.autoResize', null); } else { handleSaveDone(); } } else { fireEvent('com.ibm.bux.widget.modified', null, { 'modified': true }); } } function resize(){ initVars(); } function finish(){ if(gparent.FXloaded!=null) gparent.FXloaded=0; if(gparent.FX1loaded!=null) gparent.FX1loaded=0; if(gparent.FX2loaded!=null) gparent.FX2loaded=0; FTok = false; } function resetHiddenForm(){ if ( _fhchanged ) { fh.RA.value = _fhRA; fh.action = _fhaction; fh.target = _fhtarget; } if (fh.RA.value > 0) fh.RA.value = 0; } function isLeftPaneManipulateCmd() { var sCommand = fh.CO.value; var cmd = sCommand.charAt(0); var cmdOption = sCommand.charAt(1); if ( cmd != "M" ) return false; if ( cmdOption != "X" && cmdOption != "E" && cmdOption != "A" && cmdOption != "F" && cmdOption != "T" && cmdOption != "P") return false; return true; } function isLeftPaneUp() { var returnVal = false; if (fh.EXPL.value != 0 || fh.CUSX.value != 0 || fh.FIND.value != 0 || fh.OPTS.value != 0 || fh.PDFPO.value != 0 || fh.ZS_OPTS.value != 0) returnVal = true; return returnVal; } function crosstab() { if( parent.FE ) { var sTemplate = ""; var sCommand = fh.CO.value; if (fh.TMPL) { sTemplate = fh.TMPL.value; } if (fh.CNCT.value != 11 && fh.target != "_self" && fh.CO.value.substring(0,2)!='GE') { fh.CNCT.value=4; } } else if ( fh.target == "_self"){ if(parent.name == "") parent.name= "parentname"; fh.target = parent.name; } FTok=false; fh.submit(); resetAllForms(); } function setFormValue(aForm, name, value) { for (var j=0; j 0) { url += q; url += cgiEscape(ele.name); url += "="; if ( ele.name == "E" ) url += form.EC.value; else url += cgiEscape(ele.value); q="&"; } } } return (url); }