/* overlibmws_bubble.js plug-in module - Copyright Foteos Macrides 2003-2007. All rights reserved. For support of the BUBBLE feature. Initial: July 26, 2003 - Last Revised: January 1, 2007 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'; OLregCmds(OLbubbleCmds); // DEFAULT CONFIGURATION if(OLud('bubble'))var ol_bubble=0; if(OLud('bubbletype'))var ol_bubbletype=''; if(OLud('adjbubble'))var ol_adjbubble=0; // END CONFIGURATION if(typeof OLbubbleImages=='undefined') var OLbubbleImages='flower,oval,square,pushpin,quotation,roundcorners'; if(typeof OLbubbleImageDir=='undefined')var OLbubbleImageDir='./'; OLregisterImages('flower,oval,square,pushpin,quotation,roundcorners',OLbubbleImageDir); var OLimgWidth=[250,330,144,202,200]; var OLimgHeight=[150,160,190,221,66]; var OLcontentWidth=[200,250,130,184,190]; var OLcontentHeight=[80,85,150,176,46]; var OLpadLeft=[30,40,7,9,5]; var OLpadTop=[25,48,10,34,4]; var OLarwTipX=[180,50,51,9,19]; var OLarwTipY=[148,5,180,221,64]; var OLbI,OLbContentWd=OLcontentWidth; var o3_bubble=0,o3_bubbletype='',o3_adjbubble=0,OLbubbleHt=0; function OLloadBubble(){ OLload(OLbubbleCmds);OLbubbleHt=0; } function OLparseBubble(pf,i,ar){ var k=i,t=OLtoggle; if(k0)bPadDiff=(bHtDiff<2)?0:parseInt(0.5*bHtDiff); Y=(bHtDiff<0)?fc*bTopPad[OLbI]:fc*bTopPad[OLbI]+bPadDiff; X=fc*bLeftPad[OLbI]; Y=Math.round(Y); X=Math.round(X); o3_width=fc*bWd[OLbI]; OLbubbleHt=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=fc*OLbContentWd[OLbI]; bCobj.zIndex=1;} if(fc*bArwTipY[OLbI]<0.5*fc*bHt[OLbI])sY=fc*bArwTipY[OLbI]; else sY= -(fc*bHt[OLbI]+20); o3_offsetx -=fc*bArwTipX[OLbI]; o3_offsety +=sY; } function OLdoRoundCorners(content) { var txt,wd,ht,o=OLbubbleImg[OLbI]; wd=(OLns4)?over.clip.width:over.offsetWidth; ht=(OLns4)?over.clip.height:over.offsetHeight; txt='' +'' +''+'
'+content +'
' +'
'; OLlayerWrite(txt); o3_width=wd+28; OLbubbleHt=ht+28; } function OLresizeBubble(h1,dF,fold){ var df,h2,fnew,alpha,cnt=0; while(cnt<2){ df= -OLsignOf(h1)*dF; fnew=fold+df; h2=OLgetHeightDiff(fnew)[0]; if(Math.abs(h2)<11)break; if(OLsignOf(h1)!=OLsignOf(h2)){ alpha=Math.abs(h1)/(Math.abs(h1)+Math.abs(h2)); if(h1<0)fnew=alpha*fnew+(1.0-alpha)*fold; else fnew=(1.0-alpha)*fnew+alpha*fold; }else{ alpha=Math.abs(h1)/(Math.abs(h2)-Math.abs(h1)); if(h1<0)fnew=(1.0+alpha)*fold-alpha*fnew; else fnew=(1.0+alpha)*fnew-alpha*fold;} fold=fnew; h1=h2; dF*=0.5; cnt++;} return fnew; } function OLgetHeightDiff(f){ var lyrhtml; o3_width=f*OLcontentWidth[OLbI]; lyrhtml=OLcontentSimple(o3_text); OLlayerWrite(lyrhtml) return [f*OLcontentHeight[OLbI]-((OLns4)?over.clip.height:over.offsetHeight),lyrhtml]; } function OLsignOf(x){ return (x<0)? -1:1; } OLregRunTimeFunc(OLloadBubble); OLregCmdLineFunc(OLparseBubble); if(OLns4) document.write( '