//\/////
//\  coolTip Centerpopup 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.
//\  
//\  For more information, see the prologue in cCore.js.
//\/////
//\  THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
if(typeof cInfo==cUdf||!cInfo.meets(1.00))alert('coolTip 1.00 or later is required for the Centerpopup Plugin.');else{registerCommands('centerpopup,centeroffset');
setDefaultVariables('centerpopup|0|centeroffset|');
function setCenterPopupVariables(obj){obj.centerpopup=cd_centerpopup;obj.centeroffset=cd_centeroffset;}
function parseCenterPopupExtras(pf,i,ar){var k=i,v;if(k<ar.length){if(ar[k]==CENTERPOPUP){eval(pf+'centerpopup=('+pf+'centerpopup==0)?1:0');return k;}
if(ar[k]==CENTEROFFSET){k=opt_MULTIPLEARGS(++k,ar,(pf+'centeroffset'));return k;}}
return-1;}
function centerPopupHorizontal(browserWidth,horizontalScrollAmount,widthFix){if(!po.centerpopup)return void(0);var vdisp=po.centeroffset.split(','),placeX,iwidth=browserWidth,winoffset=horizontalScrollAmount,pWd;pWd=(!isNaN(po.width))?parseInt(po.width):(cNs4?cTip.clip.width:cTip.offsetWidth);placeX=winoffset+Math.round((iwidth-widthFix-pWd)/2)+Number(vdisp[0]);with(po){if(typeof followscroll!=cUdf&&followscroll&&sticky)relx=placeX;}
return placeX;}
function centerPopupVertical(browserHeight,verticalScrollAmount){if(!po.centerpopup)return void(0);var placeY,iheight=browserHeight,scrolloffset=verticalScrollAmount;with(po){var vdisp=centeroffset.split(',');var pHeight=(!isNaN(aboveheight)?parseInt(aboveheight):(cNs4?cTip.clip.height:cTip.offsetHeight));placeY=scrolloffset+Math.round((iheight-pHeight)/2)+(vdisp.length>1?Number(vdisp[1]):0);if(typeof followscroll!=cUdf&&followscroll&&sticky)rely=placeY;}
return placeY;}
registerRunTimeFunction(setCenterPopupVariables);registerCmdLineFunction(parseCenterPopupExtras);registerHook('horizontalPlacement',centerPopupHorizontal,FCHAIN);registerHook('verticalPlacement',centerPopupVertical,FCHAIN);if(cInfo.meets(1.00))registerNoParameterCommands('centerpopup');}
