function loadBanner() { if (window.screen.availWidth < 900) { if (document.forms[0].banner800_600.value != "") { $("#divBanner").html(""); } else $("#divBanner").html(""); } else { if (window.screen.availWidth > 1100) { if (document.forms[0].bannerwide.value != "") { $("#divBanner").html(""); } else { if (document.forms[0].banner1024_786.value != "") $("#divBanner").html(""); else $("#divBanner").html(""); } } else { if (document.forms[0].banner1024_786.value != "") { $("#divBanner").html(""); } else $("#divBanner").html(""); } } } function Click_Field(ModalDialog_Name,Sour){ var pathname = window.location.pathname.toUpperCase(); var pathname=pathname.substring(0,pathname.lastIndexOf('NSF'))+'nsf/'; var giatri = window.showModalDialog(pathname+ModalDialog_Name+'?OpenForm','Address','status:no;resizable=no;scrollbars:no;screenX:100;screenY:100;dialogWidth:300px;dialogHeight:300px'); if (giatri!=null){ Sour.value=giatri; } } function openDBRelativeURL( elemName ){ pathName = location.pathname.split('.nsf'); location.href = pathName[0] + '.nsf/' + elemName; } function doDelete( setSubmitVar) { if ( confirm('B\u1EA1n c\u00F3 mu\u1ED1n xo\u00E1 b\u1EA3n ghi \u0111\u00F3 kh\u00F4ng?') ){ isDocBeingSubmitted = true; location.search = "?DeleteDocument"; } } function trim(aStr) { return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, "") } if (!String.prototype.trim) { String.prototype.trim=function(){return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');}; } //Ham SelectOne(Sour,Dest,inUse) dung de xu ly lua chon torng listbox //no chuyen mot selectedIndex trong truong Sour chuyen sang truong Dest function SelectOne(Sour,Dest,inUse){ var flag=true; var SLength = Sour.options.length; var DLength = 0; DLength=(Dest.options.length); if(SLength > 0){ if(Sour.options[Sour.selectedIndex].value != "" && Sour.options[Sour.selectedIndex].value != "-1" ){ if(DLength==0){ Dest.options.length = Dest.options.length + 1; Dest.options[Dest.options.length - 1].value=Sour.options[Sour.selectedIndex].value; Dest.options[Dest.options.length - 1].text=Sour.options[Sour.selectedIndex].text;} else{ for(i=0;i0){ for (i=0;i0){ for (i=0;i=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