123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*
- Licensed Materials - Property of IBM
- IBM Cognos Products: DOCS
- © Copyright IBM Corp. 1999, 2013.
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- function fHlp( contextHelpFile )
- {
- var sCurrentTopic = "";
- var sDirTopics = "";
- var contentLocation = parent.content.location.href || '';
- var pathnameLocation = parent.content.location.pathname || '';
- var stringLocation = parent.content.location.hash || '';
- //crop off the hash symbol and get the topic section
- var topicSection = stringLocation.substring(1, stringLocation.length) || '';
- //determine the topic i.e. referenced HTML file
- sCurrentTopic = contentLocation.substring( contentLocation.lastIndexOf("/") + 1, contentLocation.length );
- //strip off the .html or extension and any link anchors (#)
- sCurrentTopic = sCurrentTopic.substring(0, sCurrentTopic.lastIndexOf(".") ) || '';
- //determine the full URL and remove any filename reference (strictly path)
- sDirTopics = contentLocation.substring(0, contentLocation.lastIndexOf('/') + 1) || '';
- if( contentLocation ) {
- var locationTarget = sDirTopics + contextHelpFile;
- if( sCurrentTopic )
- locationTarget = locationTarget + '?topic=' + sCurrentTopic;
- if( topicSection )
- locationTarget = locationTarget + '§ion=' + topicSection;
- top.location.href = locationTarget;
- }
- }
- function findObj(n, d) {
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
- if(!x && document.getElementById) x=document.getElementById(n); return x;
- }
- function showHideTabs() {
- var i,p,v,obj,args=showHideTabs.arguments;
- for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
- if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
- obj.visibility=v; }
- }
|