// Licensed Materials - Property of IBM // // IBM Cognos Products: pps // // (C) Copyright IBM Corp. 2005, 2017 // // 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 Toolbar // 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 isIE5 = isIE && version>4 var isNS3 = isNS && version<4 var isNS4 = isNS && version>=4 // Variables and constants //var _postable = isIE5 || isNS; //uncomments this line if support IE version before IE4 SP2. 4.72,3612,1713 update version SP2, 3283 var _postable = isIE4 || isNS;; //comments this line if support IE version before IIE4 SP2. 4.72,3612,1713 update version SP2, 3283. function winFocus(w){ if(w!=null&&w.focus!=null) w.focus(); } function compTail(s1, s2) { if (s1.indexOf(s2) == s1.length - s2.length) return true; return false; } function doOver(n,r,noStatus){ if (iconState[n] != -1/* hidden */) { if (!isIE3 && !bRenderAsIE3) { if(iconState[n]==2) // ignore rollover if disabled r=0; document.images[iconName[n]].src=img[n][iconState[n]*2+r].src; } if (!noStatus) { if(iconState[n]==1&&iconHelp2[n]!=null) window.status=iconHelp2[n]; else window.status=iconHelp1[n]; } } return true; } function set(n){ if(iconPress[n]){ for(var i=0;i 1) iconState[n]=0; } else { if(iconPress[n] > 1) iconState[n]=1; } doOver(n,0); eval(iconAction[n]); } function doit(s){ var winFX = parent.getWindow(); if(parent.FXloaded!=null && parent.FXloaded==1) winFX.doit(s); } // this function is used by alert agent function doit2(s){ var gparent = parent.parent; var winFX = gparent.getWindow(); if(gparent.FXloaded!=null && gparent.FXloaded==1) winFX.doit(s); } function isLeftPaneUp() { var winFX = parent.getWindow(); var fh = winFX.document.fhidden; var returnVal = false; if (fh.EXPL.value != 0 || fh.CUSX.value != 0 || fh.FIND.value != 0 || fh.OPTS.value != 0 || fh.PDFPO.value != 0) returnVal = true; return returnVal; } function ra( as ) { if( !parent.FXloaded || parent.FXloaded != 1 ) return; var winFX = parent.getWindow(); var fh = winFX.document.fhidden; if ( !winFX._fhchanged ) { winFX._fhchanged = true; winFX._fhtarget = fh.target; winFX._fhaction = fh.action; winFX._fhRA = fh.RA.value; } var RA_CSV = 1, RA_XLS = 11, RA_PDF = 12, RA_DRILLTHRU = 4, RA_BOOKMARK = 7, RA_SPECS = 98; RA_XLSX=13; var cnctTemp = fh.CNCT.value; if( as == RA_CSV || as == RA_PDF || as == RA_DRILLTHRU || as == RA_BOOKMARK || as == RA_XLS || as == RA_SPECS || as == RA_XLSX) { FTok = false; fh.RA.value = as; // self.window is the toolbar window (FT) so the target is our // parent window -- whatever that is. var targetWindow = self.window.parent; if( ! targetWindow.name || targetWindow.length == 0 ) targetWindow.name = "PPESTarget"; fh.target = targetWindow.name; if( as == RA_BOOKMARK ) { if( parent.parent != parent ) { fh.target = "_blank"; // open a new window because bookmarks set the location } fh.HTTPSBM.value = location.protocol.toLowerCase(); } else if (as == RA_DRILLTHRU ){ fh.target = "_blank"; } else if( as == RA_CSV ) { fh.action += "?MIME=.CSV"; } else if( as == RA_XLS ) { fh.action += "?MIME=.XLS"; fh.CNCT.value = 24; } else if( as == RA_XLSX ) { fh.action += "?MIME=.XLSX"; fh.CNCT.value = 24; }else if( as == RA_PDF ) { fh.action += "?MIME=.PDF"; fh.CO.value = ""; } else if( as == RA_SPECS ) { /* Show Specs (PPX & CFX) */ fh.target = "_blank"; } if( as == RA_PDF && document.cookie.length != 0 && getCookie("PageOrientation") ) submitExportIcon( winFX ); else fh.submit(); fh.CNCT.value=cnctTemp; } else { // We're not expecting it -- eat it } } function doParent(action){ var winFX = parent.getWindow(); if(parent.FXloaded!=null && parent.FXloaded==1) winFX.doParent(action); } function doSelect(action){ var winFX = parent.getWindow(); if(parent.FXloaded!=null && parent.FXloaded==1) winFX.doSelect(action); } function what(t){ window.status=t; return true; } function ret() { if( document.pqr != null ) document.pqr.submit(); } function hp(sTopic) { parent.getWindow().hp(sTopic); } function syncpg(){ if (ftr && ftr.R) { for(var i=0;i