//\/////
//\  coolTip MouseCapture Plugin
//\  This file requires coolTip 1.00 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.
//\/////
if(typeof cInfo==cUdf||!cInfo.meets(1.00))alert('coolTip 1.00 or later is required for the MouseCapture Plugin.');else{registerCommands('capturefirst');setDefaultVariables('capturefirst|0');
function parseMouseCaptureExtras(pf,i,ar){var k=i;if(k<ar.length){if(ar[k]==CAPTUREFIRST){if(pf=='cd_'){cd_capturefirst=(cd_capturefirst==0)?1:0;reorderMouseCapture();} return k;}}
return-1;}
function reorderMouseCapture(){var l,j,sS,str='',re=/function[ ]*(\w*)\(/;var capStr=capExtent.onmousemove.toString();var capFun=capStr.match(re);if(capFun&&capFun[1]!='ctMouseMove'){if(cd_capturefirst){l=capStr.indexOf('{')+1;j=capStr.lastIndexOf('}');str=capStr.substring(l,j);re=/ctMouseMove\(e\)/;if((l=str.search(re))!=-1){sS=str.substring(l+14);str=str.substring(0,l);j=0;while(sS.charAt(j)==';'||sS.charAt(j)=='\n'){j++;}
str+=sS.substring(j);}
str='ctMouseMove(e);'+str;capExtent.onmousemove=new Function('e',str);}}}
registerCmdLineFunction(parseMouseCaptureExtras);if(cInfo.meets(1.00))registerNoParameterCommands('capturefirst');}
