//\/////
//\  coolTip Set On/Off Plugin
//\  This file requires coolTip 1.50 or later.
//\  Modified June 9, 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.50))alert('coolTip 1.50 or later is required for the Set On/Off Plugin.');else{registerCommands('seton,setoff');
function setOnOffVariables(obj){obj.setType=0;}
function parseOnOffExtras(pf,i,ar){var k=i,v;if(k<ar.length){if(ar[k]==SETON||ar[k]==SETOFF){if(pf!='cd_'){eval(pf+'setType=1');k=opt_MULTICOMMANDS(++k,ar);return k;} }}
return-1;}
function scanCommandSet(pf,args){var k=-1,j,je;pf=(pf!='cd_')?'po.':pf;if(eval(pf+'setType')){
while((k=hasCommand(++k,args,SETON))<args.length&&k>-1){je=opt_MULTICOMMANDS(k+1,args);for(j=k+1;j<(k+je);j++)setNoParamCommand(1,pf,args[j]);k+=(je-1);}
k=-1;while((k=hasCommand(++k,args,SETOFF))<args.length&&k>-1){je=opt_MULTICOMMANDS(k+1,args);for(j=k+1;j<(k+je);j++)setNoParamCommand(0,pf,args[j]);k+=(je-1);}}
return true;}
var tRe;
function setNoParamCommand(whichType,pf,COMMAND){var v=pms[COMMAND-1-pmStart];if(pmt&&!tRe)tRe=eval('/'+pmt.split(',').join('|')+'/');if(pf!='cd_'&&!/capturefirst/.test(v)){if(pf!='cd_'&&/wrap/.test(v)&&eval(pf+'wrap')&&(whichType==0)){nbspCleanup();eval(pf+'width=cd_width');}
if(tRe.test(v))eval(pf+v+'='+((whichType&&COMMAND==AUTOSTATUSCAP)?whichType++:whichType));}}
function opt_MULTICOMMANDS(i,ar){var k=i;while(k<ar.length&&typeof ar[k]=='number'&&ar[k]>pmStart){k++;if(ar[k-1]=='SETON'||ar[k-1]=='SETOFF')break;}
k-=(k<ar.length?2:1);return k;}
registerRunTimeFunction(setOnOffVariables);registerCmdLineFunction(parseOnOffExtras);registerPostParseFunction(scanCommandSet);}

