//\/////
//\  coolTip Popup-In-Popup (PIP) Plugin
//\  Modified July 27, 2005
//\
//\  You may not remove or change this notice.
//\  Copyright Robert E Boughner 2005. All rights reserved.
//\  
//\  This plugin is governed by the same restrictions set forth
//\  in the prologue to cCore.js.
//\/////
//\  THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
if(typeof cInfo==cUdf||!cInfo.meets(1.63))alert('coolTip 1.63 or later is required for the Popup-In-Popup Plugin.');else{registerCommands('closeall,clearparams');setDefaultVariables('closeall|1');
if(typeof parentLyrs==cUdf)parentLyrs=new Array();if(typeof cParams==cUdf)var cParams=new Array();
function parsePUExtras(pf,i,ar){var k=i,v;if(k<ar.length){if(ar[k]==CLOSEALL){v=(typeof ar[k+1]=='string'?ar[++k]:null);if(pf=='cd_'&&!v)cd_closeall=(cd_closeall==1)?0:1;else setParentCloseall(v);return k;}}
return-1;}
function setParentCloseall(parentId){var pId=(parentId||'ctDiv'),i,pLyr;pId=pId.split(',');for(i=0;i<pId.length;i++){pLyr=fetchObjectLyr(pId[i]);if(!pLyr)continue;pLyr.pop.closeall=cd_closeall;parentLyrs[parentLyrs.length++]=pLyr;}}
function ctPageDefaults(){var clrID,args=(typeof ctPageDefaults.arguments[0]=='object'?ctPageDefaults.arguments[0]:ctPageDefaults.arguments),id=divID(args);if((clrID=hasClearFlag(args))){if(typeof clrID=='boolean')for(var j in cParams)cParams[j].length=0;else{clrID=clrID.split(',');for(var l=0;l<clrID.length;l++)cParams[clrID[l]].length=0;}
return;}
if(id){var i,k=new Array()
if(typeof cParams==cUdf)cParams=new Array();for(i=0;i<args.length;i++){if(typeof args[i]=='number'&&args[i]==PUID){i++;continue;}
k[k.length++]=args[i];}
args=k
k=new Array()
if(typeof cParams[id]!=cUdf&&cParams[id].length){if(typeof args[0]=='string'){if(typeof cParams[id][0]=='string')cParams[id][0]=args[0];else{k[0]=args[0];k=k.concat(cParams[id]);cParams[id]=k;}
args=args.slice(1);}
cParams[id]=cParams[id].concat(args);}else cParams[id]=args;}else parseTokens('cd_',args);}
function hasClearFlag(args){for(var i=0;i<args.length;i++){if(typeof args[i]!='number')continue;if(args[i]==CLEARPARAMS){if(typeof args[i+1]=='string')return args[i+1];return true;}}
return false;}
registerCmdLineFunction(parsePUExtras);}

