Auszug Javasscript-Teil aus Startseite VRC-Day.shtm (ohne HTML-Tags)
// JavaScript Diagram Builder 3.33
// Copyright (c) 2001-2005 Lutz Tautenhahn, all rights reserved.
//
// The Author grants you a non-exclusive, royalty free, license to use,
// modify and redistribute this software, provided that this copyright notice
// and license appear on all copies of the software.
// This software is provided "as is", without a warranty of any kind.
var _N_Dia=0, _N_Bar=0, _N_Box=0, _N_Dot=0, _N_Pix=0, _N_Line=0, _N_Area=0, _N_Arrow=0, _N_Pie=0, _zIndex=0;
var _dSize = (navigator.appName == "Microsoft Internet Explorer") ? 1 : -1;
if (navigator.userAgent.search("Opera")>=0) _dSize=-1;
var _IE=0;
if (_dSize==1)
{ _IE=1;
if (window.document.documentElement.clientHeight) _dSize=-1; //IE in standards-compliant mode
}
var _nav4 = (document.layers) ? 1 : 0;
var _DiagramTarget=window;
var _BFont="font-family:Verdana;font-weight:bold;font-size:10pt;line-height:13pt;"
var _PathToScript="";
function Diagram()
{ this.xtext="";
this.ytext="";
this.title="";
this.XScale=1;
this.YScale=1;
this.XScalePosition="bottom";
this.YScalePosition="left";
this.Font="font-family:Verdana;font-weight:normal;font-size:10pt;line-height:13pt;";
this.ID="Dia"+_N_Dia; _N_Dia++; _zIndex++;
this.zIndex=_zIndex;
this.logsub=new Array(0.301, 0.477, 0.602, 0.699, 0.778, 0.845, 0.903, 0.954);
this.SetFrame=_SetFrame;
this.SetBorder=_SetBorder;
this.SetText=_SetText;
this.SetGridColor=_SetGridColor;
this.SetXGridColor=_SetXGridColor;
this.SetYGridColor=_SetYGridColor;
this.ScreenX=_ScreenX;
this.ScreenY=_ScreenY;
this.RealX=_RealX;
this.RealY=_RealY;
this.XGrid=new Array(3);
this.GetXGrid=_GetXGrid;
this.YGrid=new Array(3);
this.GetYGrid=_GetYGrid;
this.XGridDelta=0;
this.YGridDelta=0;
this.XSubGrids=0;
this.YSubGrids=0;
this.SubGrids=0;
this.XGridColor="";
this.YGridColor="";
this.XSubGridColor="";
this.YSubGridColor="";
this.MaxGrids=0;
this.DateInterval=_DateInterval;
this.Draw=_Draw;
this.SetVisibility=_SetVisibility;
this.SetTitle=_SetTitle;
this.Delete=_Delete;
return(this);
}
function _SetFrame(theLeft, theTop, theRight, theBottom)
{ this.left = theLeft;
this.right = theRight;
this.top = theTop;
this.bottom = theBottom;
}
function _SetBorder(theLeftX, theRightX, theBottomY, theTopY)
{ this.xmin = theLeftX;
this.xmax = theRightX;
this.ymin = theBottomY;
this.ymax = theTopY;
}
function _SetText(theScaleX, theScaleY, theTitle)
{ this.xtext=theScaleX;
this.ytext=theScaleY;
this.title=theTitle;
}
function _SetGridColor(theGridColor, theSubGridColor)
{ this.XGridColor=theGridColor;
this.YGridColor=theGridColor;
if ((theSubGridColor)||(theSubGridColor==""))
{ this.XSubGridColor=theSubGridColor;
this.YSubGridColor=theSubGridColor;
}
}
function _SetXGridColor(theGridColor, theSubGridColor)
{ this.XGridColor=theGridColor;
if ((theSubGridColor)||(theSubGridColor==""))
this.XSubGridColor=theSubGridColor;
}
function _SetYGridColor(theGridColor, theSubGridColor)
{ this.YGridColor=theGridColor;
if ((theSubGridColor)||(theSubGridColor==""))
this.YSubGridColor=theSubGridColor;
}
function _ScreenX(theRealX)
{ return(Math.round((theRealX-this.xmin)/(this.xmax-this.xmin)*(this.right-this.left)+this.left));
}
function _ScreenY(theRealY)
{ return(Math.round((this.ymax-theRealY)/(this.ymax-this.ymin)*(this.bottom-this.top)+this.top));
}
function _RealX(theScreenX)
{ return(this.xmin+(this.xmax-this.xmin)*(theScreenX-this.left)/(this.right-this.left));
}
function _RealY(theScreenY)
{ return(this.ymax-(this.ymax-this.ymin)*(theScreenY-this.top)/(this.bottom-this.top));
}
function _sign(rr)
{ if (rr<0) return(-1); else return(1);
}
function _DateInterval(vv)
{ var bb=140*24*60*60*1000; //140 days
this.SubGrids=4;
if (vv>=bb) //140 days < 5 months
{ bb=8766*60*60*1000;//1 year
if (vv=bb) { this.SubGrids=7; return(bb/5); } //14 days
bb/=2; //35 days
if (vv>=bb) { this.SubGrids=7; return(bb/5); } //7 days
bb/=7; bb*=4; //20 days
if (vv>=bb) return(bb/5); //4 days
bb/=2; //10 days
if (vv>=bb) return(bb/5); //2 days
bb/=2; //5 days
if (vv>=bb) return(bb/5); //1 day
bb/=2; //2.5 days
if (vv>=bb) return(bb/5); //12 hours
bb*=3; bb/=5; //1.5 day
if (vv>=bb) { this.SubGrids=6; return(bb/6); } //6 hours
bb/=2; //18 hours
if (vv>=bb) { this.SubGrids=6; return(bb/6); } //3 hours
bb*=2; bb/=3; //12 hours
if (vv>=bb) return(bb/6); //2 hours
bb/=2; //6 hours
if (vv>=bb) return(bb/6); //1 hour
bb/=2; //3 hours
if (vv>=bb) { this.SubGrids=6; return(bb/6); } //30 mins
bb/=2; //1.5 hours
if (vv>=bb) { this.SubGrids=5; return(bb/6); } //15 mins
bb*=2; bb/=3; //1 hour
if (vv>=bb) { this.SubGrids=5; return(bb/6); } //10 mins
bb/=3; //20 mins
if (vv>=bb) { this.SubGrids=5; return(bb/4); } //5 mins
bb/=2; //10 mins
if (vv>=bb) return(bb/5); //2 mins
bb/=2; //5 mins
if (vv>=bb) return(bb/5); //1 min
bb*=3; bb/=2; //3 mins
if (vv>=bb) { this.SubGrids=6; return(bb/6); } //30 secs
bb/=2; //1.5 mins
if (vv>=bb) { this.SubGrids=5; return(bb/6); } //15 secs
bb*=2; bb/=3; //1 min
if (vv>=bb) { this.SubGrids=5; return(bb/6); } //10 secs
bb/=3; //20 secs
if (vv>=bb) { this.SubGrids=5; return(bb/4); } //5 secs
bb/=2; //10 secs
if (vv>=bb) return(bb/5); //2 secs
return(bb/10); //1 sec
}
function _DayOfYear(dd,mm,yy) //Unused, you can use this for your own date format
{ DOM=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
var ii, nn=dd;
for (ii=0; ii2)&&(yy%4==0)) nn++;
return(nn);
}
function _GetKWT(dd,mm,yy) //Unused, you can use this for your own date format
{ //this is the implementation of DIN 1355, not of the american standard!
var ss=new Date(yy,0,1);
var ww=ss.getDay(); //0=Sun,1=Mon,2=Tue,3=Wed,4=Thu,5=Fri,6=Sat
ww=(ww+2)%7-3; //0=Mon,1=Tue,2=Wed,3=Thu,-3=Fri,-2=Sat,-1=Sun
ww+=(_DayOfYear(dd,mm,yy)-1);
if (ww<0) return(_GetKWT(31+dd,12,yy-1));
if ((mm==12)&&(dd>28))
{ if (ww%7+29<=dd) return("01/"+eval(ww%7+1)); //31: Mon-Wed, 30: Mon-Tue, 29: Mon
}
ss=Math.floor(ww/7+1);
if (ss<10) ss="0"+ss;
return(ss+"/"+eval(ww%7+1));
}
function _DateFormat(vv, ii, ttype)
{ var yy, mm, dd, hh, nn, ss, vv_date=new Date(vv);
Month=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
Weekday=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
if (ii>15*24*60*60*1000)
{ if (ii<365*24*60*60*1000)
{ vv_date.setTime(vv+15*24*60*60*1000);
yy=vv_date.getUTCFullYear()%100;
if (yy<10) yy="0"+yy;
mm=vv_date.getUTCMonth()+1;
if (ttype==5) ;//You can add your own date format here
if (ttype==4) return(Month[mm-1]);
if (ttype==3) return(Month[mm-1]+" "+yy);
return(mm+"/"+yy);
}
vv_date.setTime(vv+183*24*60*60*1000);
yy=vv_date.getUTCFullYear();
return(yy);
}
vv_date.setTime(vv);
yy=vv_date.getUTCFullYear();
mm=vv_date.getUTCMonth()+1;
dd=vv_date.getUTCDate();
ww=vv_date.getUTCDay();
hh=vv_date.getUTCHours();
nn=vv_date.getUTCMinutes();
ss=vv_date.getUTCSeconds();
if (ii>=86400000)//1 day
{ if (ttype==5) ;//You can add your own date format here
if (ttype==4) return(Weekday[ww]);
if (ttype==3) return(mm+"/"+dd);
return(dd+"."+mm+".");
}
if (ii>=21600000)//6 hours
{ if (hh==0)
{ if (ttype==5) ;//You can add your own date format here
if (ttype==4) return(Weekday[ww]);
if (ttype==3) return(mm+"/"+dd);
return(dd+"."+mm+".");
}
else
{ if (ttype==5) ;//You can add your own date format here
if (ttype==4) return((hh<=12) ? hh+"am" : hh%12+"pm");
if (ttype==3) return((hh<=12) ? hh+"am" : hh%12+"pm");
return(hh+":00");
}
}
if (ii>=60000)//1 min
{ if (nn<10) nn="0"+nn;
if (ttype==5) ;//You can add your own date format here
if (ttype==4) return((hh<=12) ? hh+"."+nn+"am" : hh%12+"."+nn+"pm");
if (nn=="00") nn="";
else nn=":"+nn;
if (ttype==3) return((hh<=12) ? hh+nn+"am" : hh%12+nn+"pm");
if (nn=="") nn=":00";
return(hh+nn);
}
if (ss<10) ss="0"+ss;
return(nn+":"+ss);
}
function _GetXGrid()
{ var x0,i,j,l,x,r,dx,xr,invdifx,deltax;
dx=(this.xmax-this.xmin);
if (Math.abs(dx)>0)
{ invdifx=(this.right-this.left)/(this.xmax-this.xmin);
if ((this.XScale==1)||(isNaN(this.XScale)))
{ r=1;
while (Math.abs(dx)>=100) { dx/=10; r*=10; }
while (Math.abs(dx)<10) { dx*=10; r/=10; }
if (Math.abs(dx)>=50) { this.SubGrids=5; deltax=10*r*_sign(dx); }
else
{ if (Math.abs(dx)>=20) { this.SubGrids=5; deltax=5*r*_sign(dx); }
else { this.SubGrids=4; deltax=2*r*_sign(dx); }
}
}
else deltax=this.DateInterval(Math.abs(dx))*_sign(dx);
if (this.XGridDelta!=0) deltax=this.XGridDelta;
if (this.XSubGrids!=0) this.SubGrids=this.XSubGrids;
x=Math.floor(this.xmin/deltax)*deltax;
i=0;
this.XGrid[1]=deltax;
if (deltax!=0) this.MaxGrids=Math.floor(Math.abs((this.xmax-this.xmin)/deltax))+2;
else this.MaxGrids=0;
for (j=this.MaxGrids; j>=-1; j--)
{ xr=x+j*deltax;
x0=Math.round(this.left+(-this.xmin+xr)*invdifx);
if ((x0>=this.left)&&(x0<=this.right))
{ if (i==0) this.XGrid[2]=xr;
this.XGrid[0]=xr;
i++;
}
}
}
return(this.XGrid);
}
function _GetYGrid()
{ var y0,i,j,l,y,r,dy,yr,invdify,deltay;
dy=this.ymax-this.ymin;
if (Math.abs(dy)>0)
{ invdify=(this.bottom-this.top)/(this.ymax-this.ymin);
if ((this.YScale==1)||(isNaN(this.YScale)))
{ r=1;
while (Math.abs(dy)>=100) { dy/=10; r*=10; }
while (Math.abs(dy)<10) { dy*=10; r/=10; }
if (Math.abs(dy)>=50) { this.SubGrids=5; deltay=10*r*_sign(dy); }
else
{ if (Math.abs(dy)>=20) { this.SubGrids=5; deltay=5*r*_sign(dy); }
else { this.SubGrids=4; deltay=2*r*_sign(dy); }
}
}
else deltay=this.DateInterval(Math.abs(dy))*_sign(dy);
if (this.YGridDelta!=0) deltay=this.YGridDelta;
if (this.YSubGrids!=0) this.SubGrids=this.YSubGrids;
y=Math.floor(this.ymax/deltay)*deltay;
this.YGrid[1]=deltay;
i=0;
if (deltay!=0) this.MaxGrids=Math.floor(Math.abs((this.ymax-this.ymin)/deltay))+2;
else this.MaxGrids=0;
for (j=-1; j<=this.MaxGrids; j++)
{ yr=y-j*deltay;
y0=Math.round(this.top+(this.ymax-yr)*invdify);
if ((y0>=this.top)&&(y0<=this.bottom))
{ if (i==0) this.YGrid[2]=yr;
this.YGrid[0]=yr;
i++;
}
}
}
return(this.YGrid);
}
function _nvl(vv, rr)
{ if (vv==null) return(rr);
var ss=String(vv);
while (ss.search("'")>=0) ss=ss.replace("'","'");
return(ss);
}
function _cursor(aa)
{ if (aa)
{ if (_dSize==1) return("cursor:hand;");
else return("cursor:pointer;");
}
return("");
}
function _GetArrayMin(aa)
{ var ii, mm=aa[0];
for (ii=1; iiaa[ii]) mm=aa[ii];
}
return(mm);
}
function _GetArrayMax(aa)
{ var ii, mm=aa[0];
for (ii=1; ii");
if (_IsImage(theDrawColor))
divtext="
";
else
divtext=" ";
if ((this.XScale==1)||(isNaN(this.XScale)))
{ u="";
fn="";
if (isNaN(this.XScale))
{ if (this.XScale.substr(0,9)=="function ") fn=eval("window."+this.XScale.substr(9));
else u=this.XScale;
}
dx=(this.xmax-this.xmin);
if (Math.abs(dx)>0)
{ invdifx=(this.right-this.left)/(this.xmax-this.xmin);
r=1;
while (Math.abs(dx)>=100) { dx/=10; r*=10; }
while (Math.abs(dx)<10) { dx*=10; r/=10; }
if (Math.abs(dx)>=50) { this.SubGrids=5; deltax=10*r*_sign(dx); }
else
{ if (Math.abs(dx)>=20) { this.SubGrids=5; deltax=5*r*_sign(dx); }
else { this.SubGrids=4; deltax=2*r*_sign(dx); }
}
if (this.XGridDelta!=0) deltax=this.XGridDelta;
if (this.XSubGrids!=0) this.SubGrids=this.XSubGrids;
sub=deltax*invdifx/this.SubGrids;
sshift=0;
if ((this.XScalePosition=="top-left")||(this.XScalePosition=="bottom-left")) sshift=-Math.abs(deltax*invdifx/2);
if ((this.XScalePosition=="top-right")||(this.XScalePosition=="bottom-right")) sshift=Math.abs(deltax*invdifx/2);
x=Math.floor(this.xmin/deltax)*deltax;
itext=0;
if (deltax!=0) this.MaxGrids=Math.floor(Math.abs((this.xmax-this.xmin)/deltax))+2;
else this.MaxGrids=0;
for (j=this.MaxGrids; j>=-1; j--)
{ xr=x+j*deltax;
x0=Math.round(this.left+(-this.xmin+xr)*invdifx);
if (this.XSubGridColor)
{ for (k=1; kthis.left+1)&&(x0-k*sub";
}
if (this.SubGrids==-1)
for (k=0; k<8; k++)
{ if ((x0-this.logsub[k]*sub*_sign(deltax)>this.left+1)&&(x0-this.logsub[k]*sub*_sign(deltax)";
}
}
if ((x0>=this.left)&&(x0<=this.right))
{ itext++;
if ((itext!=2)||(!isScaleText))
{ if (r>1)
{ if (fn) l=fn(xr)+"";
else l=xr+""+u;
}
else
{ if (fn) l=fn(Math.round(10*xr/r)/Math.round(10/r))+"";
else l=Math.round(10*xr/r)/Math.round(10/r)+""+u;
}
if (l.charAt(0)==".") l="0"+l;
if (l.substr(0,2)=="-.") l="-0"+l.substr(1,100);
}
else l=this.xtext;
if (this.XScalePosition.substr(0,3)!="top")
{ if ((x0+sshift>=this.left)&&(x0+sshift<=this.right))
divtext+=""+l+"";
divtext+="";
}
else
{ if ((x0+sshift>=this.left)&&(x0+sshift<=this.right))
divtext+=""+l+"";
divtext+="";
}
if ((this.XGridColor)&&(x0>this.left)&&(x0";
}
}
}
}
if ((!isNaN(this.XScale))&&(this.XScale>1))
{ dx=(this.xmax-this.xmin);
if (Math.abs(dx)>0)
{ invdifx=(this.right-this.left)/(this.xmax-this.xmin);
deltax=this.DateInterval(Math.abs(dx))*_sign(dx);
if (this.XGridDelta!=0) deltax=this.XGridDelta;
if (this.XSubGrids!=0) this.SubGrids=this.XSubGrids;
sub=deltax*invdifx/this.SubGrids;
sshift=0;
if ((this.XScalePosition=="top-left")||(this.XScalePosition=="bottom-left")) sshift=-Math.abs(deltax*invdifx/2);
if ((this.XScalePosition=="top-right")||(this.XScalePosition=="bottom-right")) sshift=Math.abs(deltax*invdifx/2);
x=Math.floor(this.xmin/deltax)*deltax;
itext=0;
if (deltax!=0) this.MaxGrids=Math.floor(Math.abs((this.xmax-this.xmin)/deltax))+2;
else this.MaxGrids=0;
for (j=this.MaxGrids; j>=-2; j--)
{ xr=x+j*deltax;
x0=Math.round(this.left+(-this.xmin+x+j*deltax)*invdifx);
if (this.XSubGridColor)
{ for (k=1; kthis.left+1)&&(x0-k*sub";
}
}
if ((x0>=this.left)&&(x0<=this.right))
{ itext++;
if ((itext!=2)||(!isScaleText)) l=_DateFormat(xr, Math.abs(deltax), this.XScale);
else l=this.xtext;
if (this.XScalePosition.substr(0,3)!="top")
{ if ((x0+sshift>=this.left)&&(x0+sshift<=this.right))
divtext+=""+l+"";
divtext+="";
}
else
{ if ((x0+sshift>=this.left)&&(x0+sshift<=this.right))
divtext+=""+l+"";
divtext+="";
}
if ((this.XGridColor)&&(x0>this.left)&&(x0";
}
}
}
}
if ((this.YScale==1)||(isNaN(this.YScale)))
{ u="";
fn="";
if (isNaN(this.YScale))
{ if (this.YScale.substr(0,9)=="function ") fn=eval("window."+this.YScale.substr(9));
else u=this.YScale;
}
dy=this.ymax-this.ymin;
if (Math.abs(dy)>0)
{ invdify=(this.bottom-this.top)/(this.ymax-this.ymin);
r=1;
while (Math.abs(dy)>=100) { dy/=10; r*=10; }
while (Math.abs(dy)<10) { dy*=10; r/=10; }
if (Math.abs(dy)>=50) { this.SubGrids=5; deltay=10*r*_sign(dy); }
else
{ if (Math.abs(dy)>=20) { this.SubGrids=5; deltay=5*r*_sign(dy); }
else { this.SubGrids=4; deltay=2*r*_sign(dy); }
}
if (this.YGridDelta!=0) deltay=this.YGridDelta;
if (this.YSubGrids!=0) this.SubGrids=this.YSubGrids;
sub=deltay*invdify/this.SubGrids;
sshift=0;
if ((this.YScalePosition=="left-top")||(this.YScalePosition=="right-top")) sshift=-Math.abs(deltay*invdify/2);
if ((this.YScalePosition=="left-bottom")||(this.YScalePosition=="right-bottom")) sshift=Math.abs(deltay*invdify/2);
y=Math.floor(this.ymax/deltay)*deltay;
itext=0;
if (deltay!=0) this.MaxGrids=Math.floor(Math.abs((this.ymax-this.ymin)/deltay))+2;
else this.MaxGrids=0;
for (j=-1; j<=this.MaxGrids; j++)
{ yr=y-j*deltay;
y0=Math.round(this.top+(this.ymax-yr)*invdify);
if (this.YSubGridColor)
{ for (k=1; kthis.top+1)&&(y0+k*sub"+nbsp+"";
}
if (this.SubGrids==-1)
{ for (k=0; k<8; k++)
{ if ((y0+this.logsub[k]*sub*_sign(deltay)>this.top+1)&&(y0+this.logsub[k]*sub*_sign(deltay)"+nbsp+"";
}
}
}
if ((y0>=this.top)&&(y0<=this.bottom))
{ itext++;
if ((itext!=2)||(!isScaleText))
{ if (r>1)
{ if (fn) l=fn(yr)+"";
else l=yr+""+u;
}
else
{ if (fn) l=fn(Math.round(10*yr/r)/Math.round(10/r))+"";
else l=Math.round(10*yr/r)/Math.round(10/r)+""+u;
}
if (l.charAt(0)==".") l="0"+l;
if (l.substr(0,2)=="-.") l="-0"+l.substr(1,100);
}
else l=this.ytext;
if (this.YScalePosition.substr(0,5)!="right")
{ if ((y0+sshift>=this.top)&&(y0+sshift<=this.bottom))
divtext+=""+l+"";
divtext+=""+nbsp+"";
}
else
{ if ((y0+sshift>=this.top)&&(y0+sshift<=this.bottom))
divtext+=""+l+"";
divtext+=""+nbsp+"";
}
if ((this.YGridColor)&&(y0>this.top)&&(y0"+nbsp+"";
}
}
}
}
if ((!isNaN(this.YScale))&&(this.YScale>1))
{ dy=this.ymax-this.ymin;
if (Math.abs(dy)>0)
{ invdify=(this.bottom-this.top)/(this.ymax-this.ymin);
deltay=this.DateInterval(Math.abs(dy))*_sign(dy);
if (this.YGridDelta!=0) deltay=this.YGridDelta;
if (this.YSubGrids!=0) this.SubGrids=this.YSubGrids;
sub=deltay*invdify/this.SubGrids;
sshift=0;
if ((this.YScalePosition=="left-top")||(this.YScalePosition=="right-top")) sshift=-Math.abs(deltay*invdify/2);
if ((this.YScalePosition=="left-bottom")||(this.YScalePosition=="right-bottom")) sshift=Math.abs(deltay*invdify/2);
y=Math.floor(this.ymax/deltay)*deltay;
itext=0;
if (deltay!=0) this.MaxGrids=Math.floor(Math.abs((this.ymax-this.ymin)/deltay))+2;
else this.MaxGrids=0;
for (j=-2; j<=this.MaxGrids; j++)
{ yr=y-j*deltay;
y0=Math.round(this.top+(this.ymax-y+j*deltay)*invdify);
if (this.YSubGridColor)
{ for (k=1; kthis.top+1)&&(y0+k*sub"+nbsp+"";
}
}
if ((y0>=this.top)&&(y0<=this.bottom))
{ itext++;
if ((itext!=2)||(!isScaleText)) l=_DateFormat(yr, Math.abs(deltay), this.YScale);
else l=this.ytext;
if (this.YScalePosition.substr(0,5)!="right")
{ if ((y0+sshift>=this.top)&&(y0+sshift<=this.bottom))
divtext+=""+l+"";
divtext+=""+nbsp+"";
}
else
{ if ((y0+sshift>=this.top)&&(y0+sshift<=this.bottom))
divtext+=""+l+"";
divtext+=""+nbsp+"";
}
if ((this.YGridColor)&&(y0>this.top)&&(y0"+nbsp+"";
}
}
}
}
if (this.XScalePosition.substr(0,3)!="top")
divtext+=""+this.title+"";
else
divtext+=""+this.title+"";
if (lay<-1)
selObj.innerHTML=divtext;
else
_DiagramTarget.document.writeln(divtext+"");
}
function Bar(theLeft, theTop, theRight, theBottom, theDrawColor, theText, theTextColor, theTooltipText, theOnClickAction, theOnMouseoverAction, theOnMouseoutAction)
{ this.ID="Bar"+_N_Bar; _N_Bar++; _zIndex++;
this.left=theLeft;
this.top=theTop;
this.width=theRight-theLeft;
this.height=theBottom-theTop;
this.DrawColor=theDrawColor;
this.Text=String(theText);
this.TextColor=theTextColor;
this.BorderWidth="";
this.BorderColor="";
this.Cursor=_cursor(theOnClickAction);
this.SetVisibility=_SetVisibility;
this.SetColor=_SetBarColor;
this.SetText=_SetBarText;
this.SetTitle=_SetTitle;
this.MoveTo=_MoveTo;
this.ResizeTo=_ResizeTo;
this.Delete=_Delete;
var EventActions="";
if (_nvl(theOnClickAction,"")!="") EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";
if (_nvl(theOnMouseoverAction,"")!="") EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";
if (_nvl(theOnMouseoutAction,"")!="") EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";
if (_nvl(theText,"")!="")
{ var tt=theText;
if (_IsImage(theText)) tt="
";
_DiagramTarget.document.writeln(""+tt+"");
}
else
{ var vv=(this.height>0) ? "" : ";visibility:hidden";
_DiagramTarget.document.writeln(" ");
}
return(this);
}
function Box(theLeft, theTop, theRight, theBottom, theDrawColor, theText, theTextColor, theBorderWidth, theBorderColor, theTooltipText, theOnClickAction, theOnMouseoverAction, theOnMouseoutAction)
{ this.ID="Box"+_N_Box; _N_Box++; _zIndex++;
this.left=theLeft;
this.top=theTop;
this.width=theRight-theLeft;
this.height=theBottom-theTop;
this.DrawColor=theDrawColor;
this.Text=String(theText);
this.TextColor=theTextColor;
this.BorderWidth=theBorderWidth;
this.BorderColor=theBorderColor;
this.Cursor=_cursor(theOnClickAction);
this.SetVisibility=_SetVisibility;
this.SetColor=_SetBarColor;
this.SetText=_SetBarText;
this.SetTitle=_SetTitle;
this.MoveTo=_MoveTo;
this.ResizeTo=_ResizeTo;
this.Delete=_Delete;
var EventActions="";
if (_nvl(theOnClickAction,"")!="") EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";
if (_nvl(theOnMouseoverAction,"")!="") EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";
if (_nvl(theOnMouseoutAction,"")!="") EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";
var bb="";
var ww=theBorderWidth;
if (_nvl(theBorderWidth,"")=="") ww=0;
if ((_nvl(theBorderWidth,"")!="")&&(_nvl(theBorderColor,"")!=""))
bb="border-style:solid;border-width:"+theBorderWidth+"px;border-color:"+theBorderColor+";";
if (_nvl(theText,"")!="")
{ var tt=theText;
if (_IsImage(theText)) tt="
";
_DiagramTarget.document.writeln(""+tt+"");
}
else
{ var vv=(this.height>=2*ww) ? "" : ";visibility:hidden";
_DiagramTarget.document.writeln(" ");
}
return(this);
}
function _SetBarColor(theColor)
{ var id=this.ID, selObj;
this.DrawColor=theColor;
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
selObj.style.backgroundColor=theColor;
}
function _SetBarText(theText)
{ var id=this.ID, selObj;
this.Text=String(theText);
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
var tt=theText;
if (_IsImage(theText))
{ var ww=0;
if (this.BorderWidth) ww=this.BorderWidth;
tt="
";
}
selObj.innerHTML=tt;
}
function Dot(theX, theY, theSize, theType, theColor, theTooltipText, theOnClickAction, theOnMouseoverAction, theOnMouseoutAction)
{ this.Size=theSize;
this.ID="Dot"+_N_Dot; _N_Dot++; _zIndex++;
this.X=theX;
this.Y=theY;
this.dX=Math.round(theSize/2);
this.dY=Math.round(theSize/2);
this.Type=theType;
this.Color=theColor;
this.Cursor=_cursor(theOnClickAction);
this.SetVisibility=_SetVisibility;
this.SetColor=_SetDotColor;
this.SetTitle=_SetTitle;
this.MoveTo=_DotMoveTo;
this.Delete=_Delete;
var EventActions="";
if (_nvl(theOnClickAction,"")!="") EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";
if (_nvl(theOnMouseoverAction,"")!="") EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";
if (_nvl(theOnMouseoutAction,"")!="") EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";
_DiagramTarget.document.write("");
if (isNaN(theType))
{ _DiagramTarget.document.write("");
_DiagramTarget.document.write("
");
}
else
{ if (theType%6==0)
{ _DiagramTarget.document.write("");
_DiagramTarget.document.write("");
}
if (theType%6==1)
{ _DiagramTarget.document.write("");
_DiagramTarget.document.write("");
}
if (theType%6==2)
_DiagramTarget.document.write("");
if (theType%6==3)
{ _DiagramTarget.document.write("");
_DiagramTarget.document.write("");
}
if (theType%6==4)
{ _DiagramTarget.document.write("");
_DiagramTarget.document.write("");
}
if (theType%6==5)
{ if (_dSize==1)
_DiagramTarget.document.write("");
else
_DiagramTarget.document.write("");
}
}
_DiagramTarget.document.writeln("");
return(this);
}
function _SetDotColor(theColor)
{ this.Color=theColor;
var tt="", selObj;
if (document.all) selObj=eval("_DiagramTarget.document.all."+this.ID);
else selObj=_DiagramTarget.document.getElementById(this.ID);
if (isNaN(this.Type))
{ tt+="";
tt+="
";
}
else
{ if (this.Type%6==0)
{ tt+="";
tt+="";
}
if (this.Type%6==1)
{ tt+="";
tt+="";
}
if (this.Type%6==2)
tt+="";
if (this.Type%6==3)
{ tt+="";
tt+="";
}
if (this.Type%6==4)
{ tt+="";
tt+="";
}
if (this.Type%6==5)
{ if (_dSize==1)
tt+="";
else
tt+="";
}
}
selObj.innerHTML=tt;
}
function _DotMoveTo(theX, theY)
{ var id=this.ID, selObj;
if (!isNaN(parseInt(theX))) this.X=theX;
if (!isNaN(parseInt(theY))) this.Y=theY;
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
with (selObj.style)
{ if (!isNaN(parseInt(theX))) left=eval(theX-this.dX)+"px";
if (!isNaN(parseInt(theY))) top=eval(theY-this.dY)+"px";
visibility="visible";
}
}
function Pixel(theX, theY, theColor)
{ this.ID="Pix"+_N_Pix; _N_Pix++; _zIndex++;
this.left=theX;
this.top=theY;
this.dX=0;
this.dY=0;
this.Color=theColor;
this.SetVisibility=_SetVisibility;
this.SetColor=_SetPixelColor;
this.MoveTo=_DotMoveTo;
this.Delete=_Delete;
_DiagramTarget.document.writeln("");
return(this);
}
function _SetPixelColor(theColor)
{ var id=this.ID, selObj;
this.Color=theColor;
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
selObj.style.backgroundColor=theColor;
}
function _SetVisibility(isVisible)
{ var ll, id=this.ID, selObj;
if (document.all)
{ selObj=eval("_DiagramTarget.document.all."+id);
if (isVisible) selObj.style.display="inline";
else selObj.style.display="none";
}
else
{ selObj=_DiagramTarget.document.getElementById(id);
if (isVisible) selObj.style.display="inline";
else selObj.style.display="none";
if (id.substr(0,3)=='Dia')
{ var ii=0;
selObj=_DiagramTarget.document.getElementById(id+'i'+eval(ii++));
while (selObj!=null)
{ if (isVisible) selObj.style.display="inline";
else selObj.style.display="none";
selObj=_DiagramTarget.document.getElementById(id+'i'+eval(ii++));
}
}
}
}
function _SetTitle(theTitle)
{ var id=this.ID, selObj;
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
selObj.title=theTitle;
}
function _MoveTo(theLeft, theTop)
{ var id=this.ID, selObj, ww=0;
if (this.BorderWidth) ww=this.BorderWidth;
if (!isNaN(parseInt(theLeft))) this.left=theLeft;
if (!isNaN(parseInt(theTop))) this.top=theTop;
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
with (selObj.style)
{ if (!isNaN(parseInt(theLeft))) left=theLeft+"px";
if (!isNaN(parseInt(theTop))) top=theTop+"px";
if (this.height<=2*ww) visibility="hidden";
else visibility="visible";
}
}
function _ResizeTo(theLeft, theTop, theWidth, theHeight)
{ var id=this.ID, selObj, ww=0;
if (this.BorderWidth) ww=this.BorderWidth;
if (!isNaN(parseInt(theLeft))) this.left=theLeft;
if (!isNaN(parseInt(theTop))) this.top=theTop;
if (!isNaN(parseInt(theWidth))) this.width=theWidth;
if (!isNaN(parseInt(theHeight))) this.height=theHeight;
if (_IsImage(this.Text)) this.SetText(this.Text);
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
with (selObj.style)
{ if (!isNaN(parseInt(theLeft))) left=theLeft+"px";
if (!isNaN(parseInt(theTop))) top=theTop+"px";
if (!isNaN(parseInt(theWidth))) width=eval(theWidth-ww+ww*_dSize)+"px";
if (!isNaN(parseInt(theHeight))) height=eval(theHeight-ww+ww*_dSize)+"px";
if (this.height<=2*ww) visibility="hidden";
else visibility="visible";
}
}
function _Delete()
{ var id=this.ID, selObj;
if (document.all)
{ selObj=eval("_DiagramTarget.document.all."+id);
selObj.outerHTML="";
}
else
{ selObj=_DiagramTarget.document.getElementById(id);
selObj.parentNode.removeChild(selObj);
}
}
function _SetColor(theColor)
{ this.Color=theColor;
if ((theColor!="")&&(theColor.lengththis.Y0)&&(this.X1>this.X0))||((this.Y1");
if ((ww==0)||(hh==0))
_DiagramTarget.document.write(""+nbsp+"");
else
{ if (ww>hh)
{ ccr=0;
cct=0;
while (ccr"+nbsp+"");
else
_DiagramTarget.document.write(""+nbsp+"");
cct++;
}
}
else
{ ccb=0;
ccl=0;
while (ccb"+nbsp+"");
else
_DiagramTarget.document.write(""+nbsp+"");
ccl++;
}
}
}
_DiagramTarget.document.writeln("");
return(this);
}
function _LineResizeTo(theX0, theY0, theX1, theY1)
{ var xx0, yy0, xx1, yy1, ll, rr, tt, bb, ww, hh, ccl, ccr, cct, ccb, id=this.ID,selObj="",divtext="";
var ss2=Math.floor(this.Size/2), nbsp=(_IE)? " " : "";
if (!isNaN(parseInt(theX0))) this.X0=theX0;
if (!isNaN(parseInt(theY0))) this.Y0=theY0;
if (!isNaN(parseInt(theX1))) this.X1=theX1;
if (!isNaN(parseInt(theY1))) this.Y1=theY1;
var ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1"+nbsp+"";
else
{ if (ww>hh)
{ ccr=0;
cct=0;
while (ccr"+nbsp+"";
else
divtext+=""+nbsp+"";
cct++;
}
}
else
{ ccb=0;
ccl=0;
while (ccb"+nbsp+"";
else
divtext+=""+nbsp+"";
ccl++;
}
}
}
selObj.innerHTML=divtext;
}
function _LineMoveTo(theLeft, theTop)
{ var id=this.ID, selObj;
var ss2=Math.floor(this.Size/2);
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
with (selObj.style)
{ if (!isNaN(parseInt(theLeft))) left=eval(theLeft-ss2)+"px";
if (!isNaN(parseInt(theTop))) top=eval(theTop-ss2)+"px";
visibility="visible";
}
}
//You can delete the following 2 functions, if you do not use Area objects
function Area(theX0, theY0, theX1, theY1, theColor, theBase, theTooltipText, theOnClickAction, theOnMouseoverAction, theOnMouseoutAction)
{ this.ID="Area"+_N_Area; _N_Area++; _zIndex++;
this.X0=theX0;
this.Y0=theY0;
this.X1=theX1;
this.Y1=theY1;
this.Color=theColor;
if ((theColor!="")&&(theColor.length==6)) this.Color="#"+theColor;
this.Base=theBase;
this.Cursor=_cursor(theOnClickAction);
this.SetVisibility=_SetVisibility;
this.SetColor=_SetColor;
this.SetTitle=_SetTitle;
this.MoveTo=_MoveTo;
this.ResizeTo=_AreaResizeTo;
this.Delete=_Delete;
this.EventActions="";
if (_nvl(theOnClickAction,"")!="") this.EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";
if (_nvl(theOnMouseoverAction,"")!="") this.EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";
if (_nvl(theOnMouseoutAction,"")!="") this.EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";
var ii, dd, ll, rr, tt, bb, ww, hh, nbsp=(_IE)? " " : "";
if (theX0<=theX1) { ll=Math.round(theX0); rr=Math.round(theX1); }
else { ll=Math.round(theX1); rr=Math.round(theX0); }
if (theY0<=theY1) { tt=Math.round(theY0); bb=Math.round(theY1); }
else { tt=Math.round(theY1); bb=Math.round(theY0); }
ww=rr-ll; hh=bb-tt;
if (theBase<=tt)
_DiagramTarget.document.write("");
else
_DiagramTarget.document.write("");
if (theBase<=tt)
{ if ((theBase0))
{ _DiagramTarget.document.write(""+nbsp+"");
}
if (((theY0theY1)&&(theX0>theX1)))
{ for (ii=0; ii"+nbsp+" ");
}
if (((theY0>theY1)&&(theX0theX1)))
{ for (ii=0; ii"+nbsp+" ");
}
}
if ((theBase>tt)&&(theBasetheY1)&&(theX0>theX1)))
{ for (ii=0; ii"+nbsp+"");
for (ii=0; ii"+nbsp+"");
}
if (((theY0>theY1)&&(theX0theX1)))
{ for (ii=0; ii"+nbsp+"");
for (ii=0; ii"+nbsp+"");
}
}
if (theBase>=bb)
{ if ((theBase>bb)&&(ww>0))
{ _DiagramTarget.document.write(""+nbsp+"");
}
if (((theY0theY1)&&(theX0>theX1)))
{ for (ii=0; ii"+nbsp+"");
}
if (((theY0>theY1)&&(theX0theX1)))
{ for (ii=0; ii"+nbsp+"");
}
}
_DiagramTarget.document.writeln("");
}
function _AreaResizeTo(theX0, theY0, theX1, theY1)
{ var dd, ll, rr, tt, bb, ww, hh, id=this.ID,selObj="",divtext="", nbsp=(_IE)? " " : "";
if (!isNaN(parseInt(theX0))) this.X0=theX0;
if (!isNaN(parseInt(theY0))) this.Y0=theY0;
if (!isNaN(parseInt(theX1))) this.X1=theX1;
if (!isNaN(parseInt(theY1))) this.Y1=theY1;
if (this.X0<=this.X1) { ll=Math.round(this.X0); rr=Math.round(this.X1); }
else { ll=Math.round(this.X1); rr=Math.round(this.X0); }
if (this.Y0<=this.Y1) { tt=Math.round(this.Y0); bb=Math.round(this.Y1); }
else { tt=Math.round(this.Y1); bb=Math.round(this.Y0); }
ww=rr-ll; hh=bb-tt;
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
with (selObj.style)
{ if (this.Base<=tt) { left=ll+"px"; top=this.Base+"px"; width=ww+"px"; height=hh+"px"; }
else { left=ll+"px"; top=tt+"px"; width=ww+"px"; height=Math.max(hh, this.Base-tt)+"px";}
}
if (this.Base<=tt)
{ if ((this.Base0))
{ divtext+=""+nbsp+"";
}
if (((this.Y0this.Y1)&&(this.X0>this.X1)))
{ for (ii=0; ii"+nbsp+"";
}
if (((this.Y0>this.Y1)&&(this.X0this.X1)))
{ for (ii=0; ii"+nbsp+"";
}
}
if ((this.Base>tt)&&(this.Basethis.Y1)&&(this.X0>this.X1)))
{ for (ii=0; ii"+nbsp+"";
for (ii=0; ii"+nbsp+"";
}
if (((this.Y0>this.Y1)&&(this.X0this.X1)))
{ for (ii=0; ii"+nbsp+"";
for (ii=0; ii"+nbsp+"";
}
}
if (this.Base>=bb)
{ if ((this.Base>bb)&&(ww>0))
{ divtext+=""+nbsp+"";
}
if (((this.Y0this.Y1)&&(this.X0>this.X1)))
{ for (ii=0; ii"+nbsp+"";
}
if (((this.Y0>this.Y1)&&(this.X0this.X1)))
{ for (ii=0; ii"+nbsp+"";
}
}
selObj.innerHTML=divtext;
}
//You can delete the following 3 functions, if you do not use Arrow objects
function Arrow(theX0, theY0, theX1, theY1, theColor, theSize, theTooltipText, theOnClickAction, theOnMouseoverAction, theOnMouseoutAction)
{ this.ID="Arrow"+_N_Arrow; _N_Arrow++; _zIndex++;
this.X0=theX0;
this.Y0=theY0;
this.X1=theX1;
this.Y1=theY1;
this.Color=theColor;
if ((theColor!="")&&(theColor.length==6)) this.Color="#"+theColor;
this.Size=Number(_nvl(theSize,1));
this.Cursor=_cursor(theOnClickAction);
this.Border=8*this.Size;
this.SetVisibility=_SetVisibility;
this.SetColor=_SetColor;
this.SetTitle=_SetTitle;
this.MoveTo=_ArrowMoveTo;
this.ResizeTo=_ArrowResizeTo;
this.Delete=_Delete;
this.EventActions="";
if (_nvl(theOnClickAction,"")!="") this.EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";
if (_nvl(theOnMouseoverAction,"")!="") this.EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";
if (_nvl(theOnMouseoutAction,"")!="") this.EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";
var xx0, yy0, xx1, yy1, ll, rr, tt, bb, ww, hh, ccl, ccr, cct, ccb;
var ddir, ss2=Math.floor(this.Size/2), nbsp=(_IE)? " " : "";
ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1");
if ((ww==0)||(hh==0))
_DiagramTarget.document.write(""+nbsp+"");
else
{ if (ww>hh)
{ ccr=0;
cct=0;
while (ccr"+nbsp+"");
else
_DiagramTarget.document.write(""+nbsp+"");
cct++;
}
}
else
{ ccb=0;
ccl=0;
while (ccb"+nbsp+"");
else
_DiagramTarget.document.write(""+nbsp+"");
ccl++;
}
}
}
var LL=1, ll0=ll, tt0=tt;
var ccL=8*theSize+4, ccB=2*theSize+1;
var DDX=theX1-theX0, DDY=theY1-theY0;
if ((DDX!=0)||(DDY!=0)) LL=Math.sqrt((DDX*DDX)+(DDY*DDY));
this.X0=theX1-Math.round(1/LL*(ccL*DDX-ccB*DDY));
this.Y0=theY1-Math.round(1/LL*(ccL*DDY+ccB*DDX));
ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1"+nbsp+"");
else
{ if (ww>hh)
{ ccr=0;
cct=0;
while (ccr"+nbsp+"");
else
_DiagramTarget.document.write(""+nbsp+"");
cct++;
}
}
else
{ ccb=0;
ccl=0;
while (ccb"+nbsp+"");
else
_DiagramTarget.document.write(""+nbsp+"");
ccl++;
}
}
}
this.X0=theX1-Math.round(1/LL*(ccL*DDX+ccB*DDY));
this.Y0=theY1-Math.round(1/LL*(ccL*DDY-ccB*DDX));
ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1"+nbsp+"");
else
{ if (ww>hh)
{ ccr=0;
cct=0;
while (ccr"+nbsp+"");
else
_DiagramTarget.document.write(""+nbsp+"");
cct++;
}
}
else
{ ccb=0;
ccl=0;
while (ccb"+nbsp+"");
else
_DiagramTarget.document.write(""+nbsp+"");
ccl++;
}
}
}
_DiagramTarget.document.writeln("");
this.X0=theX0;
this.Y0=theY0;
return(this);
}
function _ArrowResizeTo(theX0, theY0, theX1, theY1)
{ var xx0, yy0, xx1, yy1, ll, rr, tt, bb, ww, hh, ccl, ccr, cct, ccb, id=this.ID,selObj="",divtext="";
var ss2=Math.floor(this.Size/2), nbsp=(_IE)? " " : "";
if (!isNaN(parseInt(theX0))) this.X0=theX0;
if (!isNaN(parseInt(theY0))) this.Y0=theY0;
if (!isNaN(parseInt(theX1))) this.X1=theX1;
if (!isNaN(parseInt(theY1))) this.Y1=theY1;
var tmpX0=this.X0, tmpY0=this.Y0;
var ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1"+nbsp+"";
else
{ if (ww>hh)
{ ccr=0;
cct=0;
while (ccr"+nbsp+"";
else
divtext+=""+nbsp+"";
cct++;
}
}
else
{ ccb=0;
ccl=0;
while (ccb"+nbsp+"";
else
divtext+=""+nbsp+"";
ccl++;
}
}
}
var LL=1, ll0=ll, tt0=tt;
var ccL=8*this.Size+4, ccB=2*this.Size+1;
var DDX=this.X1-tmpX0, DDY=this.Y1-tmpY0;
if ((DDX!=0)||(DDY!=0)) LL=Math.sqrt(0+(DDX*DDX)+(DDY*DDY));
this.X0=this.X1-Math.round(1/LL*(ccL*DDX-ccB*DDY));
this.Y0=this.Y1-Math.round(1/LL*(ccL*DDY+ccB*DDX));
ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1"+nbsp+"";
else
{ if (ww>hh)
{ ccr=0;
cct=0;
while (ccr"+nbsp+"";
else
divtext+=""+nbsp+"";
cct++;
}
}
else
{ ccb=0;
ccl=0;
while (ccb"+nbsp+"";
else
divtext+=""+nbsp+"";
ccl++;
}
}
}
this.X0=this.X1-Math.round(1/LL*(ccL*DDX+ccB*DDY));
this.Y0=this.Y1-Math.round(1/LL*(ccL*DDY-ccB*DDX));
ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1"+nbsp+"";
else
{ if (ww>hh)
{ ccr=0;
cct=0;
while (ccr"+nbsp+"";
else
divtext+=""+nbsp+"";
cct++;
}
}
else
{ ccb=0;
ccl=0;
while (ccb"+nbsp+"";
else
divtext+=""+nbsp+"";
ccl++;
}
}
}
selObj.innerHTML=divtext;
this.X0=tmpX0;
this.Y0=tmpY0;
}
function _ArrowMoveTo(theLeft, theTop)
{ var id=this.ID, selObj;
var ss2=Math.floor(this.Size/2);
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
with (selObj.style)
{ if (!isNaN(parseInt(theLeft))) left=eval(theLeft-ss2-this.Border)+"px";
if (!isNaN(parseInt(theTop))) top=eval(theTop-ss2-this.Border)+"px";
visibility="visible";
}
}
//You can delete the following 3 functions, if you do not use Pie objects
function Pie(theXCenter, theYCenter, theOffset, theRadius, theAngle0, theAngle1, theColor, theTooltipText, theOnClickAction, theOnMouseoverAction, theOnMouseoutAction)
{ this.ID="Pie"+_N_Pie; _N_Pie++; _zIndex++;
this.XCenter=theXCenter;
this.YCenter=theYCenter;
this.Offset=theOffset;
this.Radius=theRadius;
this.dX=theRadius;
this.dY=theRadius;
this.Angle0=theAngle0;
this.Angle1=theAngle1;
this.Color=theColor;
if ((theColor!="")&&(theColor.length==6)) this.Color="#"+theColor;
this.Cursor=_cursor(theOnClickAction);
this.SetVisibility=_SetVisibility;
this.SetColor=_SetColor;
this.SetTitle=_SetTitle;
this.MoveTo=_PieMoveTo;
this.ResizeTo=_PieResizeTo;
this.Delete=_Delete;
this.EventActions="";
if (_nvl(theOnClickAction,"")!="") this.EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";
if (_nvl(theOnMouseoverAction,"")!="") this.EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";
if (_nvl(theOnMouseoutAction,"")!="") this.EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";
var aa0, aa1, xx, yy, tt, xxo=0, yyo=0, rr2=this.Radius*this.Radius, xx0, yy0, xx1, yy1, pid180=Math.PI/180, ss0, ss1;
var nbsp=(_IE)? " " : "";
aa0=this.Angle0;
aa1=this.Angle1;
while (aa0>=360) aa0-=360;
while (aa0<0) aa0+=360;
while (aa1>=360) aa1-=360;
while (aa1<0) aa1+=360;
if (aa0aa1)
{ xxo=Math.sin((aa0+aa1+360)*pid180/2)*this.Offset;
yyo=-Math.cos((aa0+aa1+360)*pid180/2)*this.Offset;
}
_DiagramTarget.document.write("");
if (aa0==aa1)
{ if (this.Angle0"+nbsp+" ");
}
}
}
else
{ xx0=Math.sin(aa0*pid180)*this.Radius;
yy0=-Math.cos(aa0*pid180)*this.Radius;
xx1=Math.sin(aa1*pid180)*this.Radius;
yy1=-Math.cos(aa1*pid180)*this.Radius;
for (yy=-this.Radius+0.5; yy<0; yy++)
{ xx=Math.round(Math.sqrt(rr2-(yy)*(yy)));
tt=Math.round(yy+this.Radius-0.5);
if ((yy0>=0)&&(yy1>=0))
{ if (xx0"+nbsp+"");
}
else if ((yy0<0)&&(yy1<0))
{ if ((yy0))||((xx0<0)&&(xx1<=xx0))||((xx1>0)&&(xx0>=xx1)))
_DiagramTarget.document.write(""+nbsp+"");
}
else if ((yy>=yy0)&&(yy>=yy1))
{ ss0=Math.round(yy*xx0/yy0);
ss1=Math.round(yy*xx1/yy1);
if (xx0"+nbsp+"");
else
{ _DiagramTarget.document.write(""+nbsp+"");
_DiagramTarget.document.write(""+nbsp+"");
}
}
else if (yy>=yy0)
{ ss0=yy*xx0/yy0;
_DiagramTarget.document.write(""+nbsp+"");
}
else
{ ss1=yy*xx1/yy1;
_DiagramTarget.document.write(""+nbsp+"");
}
}
else if (yy0<0)
{ if (yy>=yy0)
{ ss0=yy*xx0/yy0;
_DiagramTarget.document.write(""+nbsp+"");
}
else if (xx0<0)
_DiagramTarget.document.write(""+nbsp+"");
}
else
{ if (yy>=yy1)
{ ss1=yy*xx1/yy1;
_DiagramTarget.document.write(""+nbsp+"");
}
else if (xx1>0)
_DiagramTarget.document.write(""+nbsp+"");
}
}
for (yy=0.5; yyxx1)
_DiagramTarget.document.write(""+nbsp+"");
}
else if ((yy0>0)&&(yy1>0))
{ if ((yy>yy0)&&(yy>yy1))
{ if (((xx1<0)&&(xx0>0))||((xx1<0)&&(xx0<=xx1))||((xx0>0)&&(xx1>=xx0)))
_DiagramTarget.document.write(""+nbsp+"");
}
else if ((yy<=yy0)&&(yy<=yy1))
{ ss0=Math.round(yy*xx0/yy0);
ss1=Math.round(yy*xx1/yy1);
if (xx0>xx1)
_DiagramTarget.document.write(""+nbsp+"");
else
{ _DiagramTarget.document.write(""+nbsp+"");
_DiagramTarget.document.write(""+nbsp+"");
}
}
else if (yy<=yy0)
{ ss0=yy*xx0/yy0;
_DiagramTarget.document.write(""+nbsp+"");
}
else
{ ss1=yy*xx1/yy1;
_DiagramTarget.document.write(""+nbsp+"");
}
}
else if (yy0>0)
{ if (yy<=yy0)
{ ss0=yy*xx0/yy0;
_DiagramTarget.document.write(""+nbsp+"");
}
else if (xx0>0)
_DiagramTarget.document.write(""+nbsp+"");
}
else
{ if (yy<=yy1)
{ ss1=yy*xx1/yy1;
_DiagramTarget.document.write(""+nbsp+"");
}
else if (xx1<0)
_DiagramTarget.document.write(""+nbsp+"");
}
}
}
_DiagramTarget.document.writeln("");
return(this);
}
function _PieResizeTo(theXCenter, theYCenter, theOffset, theRadius, theAngle0, theAngle1)
{ var id=this.ID,selObj="",divtext="";
if (!isNaN(parseInt(theXCenter))) this.XCenter=theXCenter;
if (!isNaN(parseInt(theYCenter))) this.YCenter=theYCenter;
if (!isNaN(parseInt(theOffset))) this.Offset=theOffset;
if (!isNaN(parseInt(theRadius))) this.Radius=theRadius;
if (!isNaN(parseInt(theAngle0))) this.Angle0=theAngle0;
if (!isNaN(parseInt(theAngle1))) this.Angle1=theAngle1;
var aa0, aa1, xx, yy, tt, xxo=0, yyo=0, rr2=this.Radius*this.Radius, xx0, yy0, xx1, yy1, pid180=Math.PI/180, ss0, ss1;
var nbsp=(_IE)? " " : "";
aa0=this.Angle0;
aa1=this.Angle1;
if (aa0aa1)
{ xxo=Math.sin((aa0+aa1+360)*pid180/2)*this.Offset;
yyo=-Math.cos((aa0+aa1+360)*pid180/2)*this.Offset;
}
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
with (selObj.style)
{ left=Math.round(this.XCenter-this.Radius+xxo)+"px";
top=Math.round(this.YCenter-this.Radius+yyo)+"px";
width=eval(2*this.Radius)+"px";
height=eval(2*this.Radius)+"px";
}
if (aa0==aa1)
{ if (this.Angle0"+nbsp+"";
}
}
}
else
{ xx0=Math.sin(aa0*pid180)*this.Radius;
yy0=-Math.cos(aa0*pid180)*this.Radius;
xx1=Math.sin(aa1*pid180)*this.Radius;
yy1=-Math.cos(aa1*pid180)*this.Radius;
for (yy=-this.Radius+0.5; yy<0; yy++)
{ xx=Math.round(Math.sqrt(rr2-(yy)*(yy)));
tt=Math.round(yy+this.Radius-0.5);
if ((yy0>=0)&&(yy1>=0))
{ if (xx0"+nbsp+"";
}
else if ((yy0<0)&&(yy1<0))
{ if ((yy0))||((xx0<0)&&(xx1<=xx0))||((xx1>0)&&(xx0>=xx1)))
divtext+=""+nbsp+"";
}
else if ((yy>=yy0)&&(yy>=yy1))
{ ss0=Math.round(yy*xx0/yy0);
ss1=Math.round(yy*xx1/yy1);
if (xx0"+nbsp+"";
else
{ divtext+=""+nbsp+"";
divtext+=""+nbsp+"";
}
}
else if (yy>=yy0)
{ ss0=yy*xx0/yy0;
divtext+=""+nbsp+"";
}
else
{ ss1=yy*xx1/yy1;
divtext+=""+nbsp+"";
}
}
else if (yy0<0)
{ if (yy>=yy0)
{ ss0=yy*xx0/yy0;
divtext+=""+nbsp+"";
}
else if (xx0<0)
divtext+=""+nbsp+"";
}
else
{ if (yy>=yy1)
{ ss1=yy*xx1/yy1;
divtext+=""+nbsp+"";
}
else if (xx1>0)
divtext+=""+nbsp+"";
}
}
for (yy=0.5; yyxx1)
divtext+=""+nbsp+"";
}
else if ((yy0>0)&&(yy1>0))
{ if ((yy>yy0)&&(yy>yy1))
{ if (((xx1<0)&&(xx0>0))||((xx1<0)&&(xx0<=xx1))||((xx0>0)&&(xx1>=xx0)))
divtext+=""+nbsp+"";
}
else if ((yy<=yy0)&&(yy<=yy1))
{ ss0=Math.round(yy*xx0/yy0);
ss1=Math.round(yy*xx1/yy1);
if (xx0>xx1)
divtext+=""+nbsp+"";
else
{ divtext+=""+nbsp+"";
divtext+=""+nbsp+"";
}
}
else if (yy<=yy0)
{ ss0=yy*xx0/yy0;
divtext+=""+nbsp+"";
}
else
{ ss1=yy*xx1/yy1;
divtext+=""+nbsp+"";
}
}
else if (yy0>0)
{ if (yy<=yy0)
{ ss0=yy*xx0/yy0;
divtext+=""+nbsp+"";
}
else if (xx0>0)
divtext+=""+nbsp+"";
}
else
{ if (yy<=yy1)
{ ss1=yy*xx1/yy1;
divtext+=""+nbsp+"";
}
else if (xx1<0)
divtext+=""+nbsp+"";
}
}
}
selObj.innerHTML=divtext;
}
function _PieMoveTo(theXCenter, theYCenter, theOffset)
{ var xxo=0, yyo=0, pid180=Math.PI/180, id=this.ID, selObj;
if (!isNaN(parseInt(theXCenter))) this.XCenter=theXCenter;
if (!isNaN(parseInt(theYCenter))) this.YCenter=theYCenter;
if (!isNaN(parseInt(theOffset))) this.Offset=theOffset;
if (this.Angle0this.Angle1)
{ xxo=Math.sin((this.Angle0+this.Angle1+360)*pid180/2)*this.Offset;
yyo=-Math.cos((this.Angle0+this.Angle1+360)*pid180/2)*this.Offset;
}
if (document.all) selObj=eval("_DiagramTarget.document.all."+id);
else selObj=_DiagramTarget.document.getElementById(id);
with (selObj.style)
{ left=Math.round(this.XCenter-this.Radius+xxo)+"px";
top=Math.round(this.YCenter-this.Radius+yyo)+"px";
width=eval(2*this.Radius)+"px";
height=eval(2*this.Radius)+"px";
visibility="visible";
}
}