//\/////
//\  coolTip Pointer Plugin
//\  This file requires coolTip 1.50 or later.
//\  Modified August 21, 2006
//\
//\  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 Pointer Plugin.');else{var XPOINTER=8;
var lImg=new Image(64,154),rImg=new Image(64,154);registerCommands('usepointer');
setDefaultVariables('usepointer|0');
function setPointerVariables(obj){obj.usepointer=cd_usepointer;}
function parsePointerExtras(pf,i,ar){var k=i;if(k<ar.length){if(ar[k]==USEPOINTER){eval(pf+'usepointer=('+pf+'usepointer==0)?1:0'); setPointerProperties((typeof ar[k+1]=='string')?ar[++k]:'');return k;}}
return-1;}
function chkPointerUse(pf,args){var po=cTip.pop;if(po.usepointer){with(po){if((cNs4||cSaf)&&shadow)shadow=0;if(typeof bubble!=cUdf&&bubble)bubble=0;if(hauto)hauto=0;if(vauto)vauto=0;}}
return true;}
function setPointerProperties(path){var nImg;path=(path||'images/');if(!/\/$/.test(path))path+='/';lImg.src=path+'left_pointer.gif';rImg.src=path+'right_pointer.gif';nImg=(po.hpos==RIGHT?lImg:(po.hpos==LEFT?rImg:''));if(nImg)po.ptrImg=new ImgProperty(nImg.src,nImg.width,nImg.height);}
function pointer_cursorOff(){var left,top,right,bottom,lS=false;if(typeof po.ptrImg!=cUdf)lS=/left/.test(po.ptrImg.src);top=parseInt(cTip.style.top);left=parseInt(cTip.style.left);if(lS)left+=po.ptrImg.width;right=left+(po.shadow&&!isNaN(po.width)?parseInt(po.width):cTip.offsetWidth);if(!lS)right-=po.ptrImg.width;bottom=top+(po.shadow&&!isNaN(po.aboveheight)?parseInt(po.aboveheight):cTip.offsetHeight);return(cMx<left||cMx>right||cMy<top||cMy>bottom);}
function generatePointer(content){if(po.usepointer&&po.ptrImg.src){var imgW,imgH,lS,wd,ht,txt='';with(po){if(shadow){generateShadow(content);content=cTip.innerHTML;}
lS=/left/.test(ptrImg.src);wd=(cNs4)?cTip.clip.width:(shadow?width:cTip.offsetWidth);ht=(cNs4)?cTip.clip.height:(shadow?aboveheight:cTip.offsetHeight);imgH=ptrImg.height=ht;imgW=ptrImg.width=Math.round(imgH/2.5);offsety=-parseInt(imgH/2);offsetx=(lS?1:-1)*4;txt='<div id="ptrContent" style="position: absolute;top:0;left:'+(lS?imgW+'px;':'0;')+' width: '+wd+'px;z-index:0;">'+(doXml&XPOINTER?'':content)+'</div>';txt+='<div style="position: absolute;left:'+(!lS?wd+'px;':'0;')+' top:0;width: '+imgW+'px;height: '+imgH+'px;z-index: 0;">';txt+='<img src="'+ptrImg.src+'" width="'+imgW+'" height="'+imgH+'" /></div>';if(cNs4){layerWrite(txt);ht=cTip.clip.height;l=txt.lastIndexOf('height=');sTxt=txt.substring(l);k=sTxt.lastIndexOf(' />');txt=txt.substring(0,l)+'height="'+ht+'"'+sTxt.substring(k);l=txt.lastIndexOf('height: ');sTxt=txt.substring(l);k=sTxt.lastIndexOf('px')
txt=txt.substring(0,l)+'height: '+ht+sTxt.substring(k);}
(doXml&XPOINTER)?setPluginXmlCode(txt,null,3):layerWrite(txt);width=wd+imgW;aboveheight=ht;}}}
function ImgProperty(src,width,height){this.src=(src)?src:'';this.width=(width)?width:0;this.height=(height)?height:0;}
function setDoXml_ptr(){with(cTip.pop){if(xml){doXml|=XPOINTER;}}
return void(0);}
function cleanUpXml_ptr(obj){with(obj.pop){if(doXml&&!(cNs4||cIe4)){if(doXml&XPOINTER)doXml^=XPOINTER;}}
return void(0);}
registerRunTimeFunction(setPointerVariables);registerCmdLineFunction(parsePointerExtras);registerPostParseFunction(chkPointerUse);registerHook("cleanUpXml",cleanUpXml_ptr,FCHAIN);registerHook("setDoXml",setDoXml_ptr,FCHAIN);registerHook("cursorOff",pointer_cursorOff,FREPLACE);registerHook("ctCreatePopup",generatePointer,FAFTER);if(cInfo.meets(1.50))registerNoParameterCommands('usepointer');
}
