/* overlibmws_bubble.js plug-in module - Copyright Foteos Macrides 2003-2008. All rights reserved. For support of the BUBBLE feature. Initial: July 26, 2003 - Last Revised: January 26, 2008 See the Change History and Command Reference for overlibmws via: http://www.macridesweb.com/oltest/ Published under an open source license: http://www.macridesweb.com/oltest/license.html */ OLloaded=0; var OLbubbleCmds='bubble,bubbletype,adjbubble,rcbubblecolor,bubbleclose';OLregCmds(OLbubbleCmds); // DEFAULT CONFIGURATION if(OLud('bubble'))var ol_bubble=0; if(OLud('bubbletype'))var ol_bubbletype=''; if(OLud('adjbubble'))var ol_adjbubble=0; if(OLud('rcbubblecolor'))var ol_rcbubblecolor='#ffffcc'; if(OLud('bubbleclose'))var ol_bubbleclose=0; // END CONFIGURATION function OLund(v){return eval('typeof '+v+'=="undefined"')?1:0;} if(OLund('OLbubbleImageSet'))var OLbubbleImageSet='flower,oval,square,pushpin,quotation,roundcorners'; if(OLund('OLbubbleImages'))var OLbubbleImages=OLbubbleImageSet; if(OLund('OLbubbleImageDir'))var OLbubbleImageDir='./'; if(OLund('OLbubbleIMGsuffix'))var OLbubbleIMGsuffix=''; if(OLund('OLbubbleRCsuffix'))var OLbubbleRCsuffix=''; if(OLund('OLimgWidth'))var OLimgWidth=[250,330,144,202,200]; if(OLund('OLimgHeight'))var OLimgHeight=[150,160,190,221,66]; if(OLund('OLcontentWidth'))var OLcontentWidth=[200,250,130,184,190]; if(OLund('OLcontentHeight'))var OLcontentHeight=[80,85,150,176,46]; if(OLund('OLpadLeft'))var OLpadLeft=[30,40,7,9,5]; if(OLund('OLpadTop'))var OLpadTop=[25,48,10,34,4]; if(OLund('OLarwTipX'))var OLarwTipX=[180,50,51,9,19]; if(OLund('OLarwTipY'))var OLarwTipY=[148,5,180,221,64]; var o3_bubble=0,o3_bubbletype='',o3_adjbubble=0,o3_rcbubblecolor='',o3_bubbleclose=0, OLbubbleHt=0,OLbI,OLbContentWd=OLcontentWidth; OLregisterImages(OLbubbleImageSet,OLbubbleImageDir,OLbubbleIMGsuffix,OLbubbleRCsuffix); function OLloadBubble(){ OLload(OLbubbleCmds);OLbubbleHt=0; } function OLparseBubble(pf,i,ar){ var k=i,t=OLtoggle,q=OLparQuo;if(k12)?bT.substring(12):'')+rs; o[0]=new Image();o[0].src=p+'/cornerTL'+su+'.gif';o[1]=new Image();o[1].src=p+'/edgeT'+su+'.gif'; o[2]=new Image();o[2].src=p+'/cornerTR'+su+'.gif';o[3]=new Image();o[3].src=p+'/edgeL'+su+'.gif'; o[4]=new Image();o[4].src=p+'/edgeR'+su+'.gif';o[5]=new Image();o[5].src=p+'/cornerBL'+su+'.gif'; o[6]=new Image();o[6].src=p+'/edgeB'+su+'.gif';o[7]=new Image();o[7].src=p+'/cornerBR'+su+'.gif';} else{OLbubbleImg[i]=new Image();OLbubbleImg[i].src=p+'/'+bT+is+'.gif';}}} } function OLgenerateBubble(content){ if(!o3_bubble)return;if(o3_bubbletype.indexOf('roundcorners')==0)return OLdoRoundCorners(content); var ar,X,Y,W,fc=1.0,txt,sY,bHtDiff,bPadDiff=0,bLobj,bCobj,bTopPad=OLpadTop,bLeftPad=OLpadLeft, bContentHt=OLcontentHeight,bHt=OLimgHeight,bWd=OLimgWidth,bArwTipX=OLarwTipX,bArwTipY=OLarwTipY; bHtDiff=fc*bContentHt[OLbI]-(OLns4?over.clip.height:over.offsetHeight);if(o3_adjbubble){ fc=OLresizeBubble(bHtDiff,0.5,fc);ar=OLgetHeightDiff(fc);bHtDiff=ar[0];content=ar[1];} if(bHtDiff>0)bPadDiff=(bHtDiff<2)?0:parseInt(0.5*bHtDiff); Y=(bHtDiff<0)?fc*bTopPad[OLbI]:fc*bTopPad[OLbI]+bPadDiff;X=fc*bLeftPad[OLbI]; Y=Math.ceil(Y);X=Math.ceil(X);o3_width=Math.ceil(fc*bWd[OLbI]);W=Math.ceil(fc*OLbContentWd[OLbI]); OLbubbleHt=Math.ceil((bHtDiff<0?fc*bHt[OLbI]-bHtDiff:fc*bHt[OLbI])); txt='' +(OLns4?'
':'
')+content+'
';OLlayerWrite(txt); if(OLns4){bCobj=over.document.layers['bContent'];if(typeof bCobj=='undefined')return; bCobj.top=Y;bCobj.left=X;bCobj.clip.width=W;bCobj.zIndex=1;} if(fc*bArwTipY[OLbI]<0.5*fc*bHt[OLbI])sY=Math.ceil(fc*bArwTipY[OLbI]);else sY= -(OLbubbleHt+20); o3_offsetx -=Math.ceil(fc*bArwTipX[OLbI]);o3_offsety +=sY; } function OLdoRoundCorners(content){ var wd=(OLns4)?over.clip.width:over.offsetWidth,ht=(OLns4)?over.clip.height:over.offsetHeight, o=OLbubbleImg[OLbI],ids=(OLns6?' style="display:block;"':''),wd14='" width="14',ht14='" height="14"', t='
' +content+'
\n\n<'+'\/style>'); OLbubblePI=1; OLloaded=1;