VAR JG_IHTM, JG_IE, JG_FAST, JG_DOM, JG_MOZ, JG_N4 = (Document.Layers && TypeOf Document.Classes! = "undefined"); Function Chkdhtm (x, i) {x = document.body || null; jg_ie = x && ! typeof x.insertAdjacentHTML = "undefined"; jg_dom = (x && jg_ie && typeof x.appendChild = "undefined" && typeof document.createRange = "undefined" && typeof (i = document.createRange ()) setStartBefore = "!!!.! undefined "&& typeof i.createContextualFragment =!" undefined "); jg_ihtm = jg_ie && jg_dom && x && typeof x.innerHTML =!!!" undefined "; jg_fast = jg_ie && document.all && window.opera;! jg_moz = jg_dom && TypeOf x.style.mozopacity! = "undefined";} function pntdoc () {this.wnd.document.write (jg_fast? this.htmrpc (): this.htm); this.htm = '';} function PNTCNVDOM ) {var x = document.createraNge (); x.setStartBefore (this.cnv); x = x.createcontextualfragment (jg_fast? this.htmrpc (): this.htm); this.cnv.appendchild (x); this. HTM = '';} function pntcnvie () {this.cnv.insertadjacenthtml ("beforeend", jg_fast? this.htmrpc (): this.htm); TH IS.HTM = '';} function pntcnvihtm () {this.cnv.innerhtml = this.htm; this.htm = '';} function pntcnv () {this.htm = ';} function mkdiv (x, Y, w, h) {this.htm = '
Div Style = "Overflow: Hidden; Position: Absolute; Background-Color: ' ' $ 1; Left: $ 2; top: $ 3; Width: $ 4; Height: $ 5; Border-Left: $ 4px solid $ 1> div > / n ');} function mklin (x1, y1, x2, y2) {IF (x1> x2) {var _x2 = x2; var _y2 = y2; x2 = x1; y2 = y1; x1 = _x2; y1 = _Y2;} var DX = x2-x1, dy = math.abs (Y2-y1), x = x1, y = y1, yincr = (Y1> Y2)? -1: 1; if (dx> = DY) { VAR PR = DY << 1, PRU = Pr - (DX << 1), P = Pr-DX, OX = x; while ((DX -)> 0) { x; if (p> 0) {THIS.MKDIV (OX, Y, X-OX, 1); Y = YINCR; P = PRU; ox = x;} else p = pr;} this.mkdiv (OX, Y, X2-OX 1, 1);} else {var = DX << 1, PRU = PR - (DY << 1), P = Pr-DY, OY = Y; IF (Y2 <= Y1) {while ((DY- -)> 0) {IF (p> 0) {THIS.MKDIV (x , y, 1, opt-y 1); y = yincr; p = PRU; = y;} else {y = Yincr; p = pr;}} this.mkdiv (x2, y2, 1, opt-y2 1);} else {while ((dy--)> 0) {y = yincr; if (p> 0 ) {THIS.MKDIV (X , OY, 1, Y-OY); P = PRU; OY = Y;} else p = pr;} this.mkdiv (x2, oo, 1, y2-= 1) }}} function mklin2d (x1, y1, x2, y2) {IF (x1> x2) {var _x2 = x2; var _y2 = y2; x2 = x1; y2 = y1; x1 = _x2; y1 = _y2;} VAR DX = X 2-x1, dy = math.abs (Y2-Y1), x = x1, y = y1, yincr = (Y1> Y2)? -1: 1; var s = this.Stroke; if (dx> = DY) {IF (S-3> 0) {var _s = (s * dx * math.sqrt (1 DY * DY / (DX * DX)) - DX- (S >> 1) * DY) / DX; _S = (! (S-4)? Math.ceil (_s): Math.Round (_s)) 1;} else var _s = s; var ad = math.ceil (s / 2); var = DY < <1, PRU = PR - (DX << 1), P = Pr-DX, OX = x;
While ((DX -)> 0) { x; if (p> 0) {THIS.MKDIV (OX, Y, X-OX AD, _S); Y = YINCR; P = PRU; ox = x;} else p = pr;} this.mkdiv (ox, y, x2-ox ad 1, _s);} else {if (s-3> 0) {var _s = (S * DY * Math.SQRT (1 DX * DX / (DY * DY)) - (S >> 1) * DX-DY) / DY; _S = (! (S-4)? Math.ceil (_s): Math. Round (_s)) 1;} else var _s = s; var ad = math.Round (S / 2); var = DX << 1, PRU = PR - (DY << 1), p = PR- DY, OY = Y; IF (Y2 <= Y1) { ad; while ((DY -)> 0) {if (p> 0) {this.mkdiv (x , y, _s, y-y AD); y = yincr; p = pRU; = y;} else {y = yincr; p = pr;}} this.mkdiv (x2, y2, _s, oy-y2 ad);} Else {While ((DY -)> 0) {y = yincr; if (p> 0) {this.mkdiv (x , io, _s, y-io ad); p = PRU; = y ELSE P = Pr;} this.mkdiv (x2, oo, _s, y2-opt ad 1);}}} function mklindott (x1, y1, x2, y2) {IF (x1> x2) { Var _x2 = x2; var _y2 = y2; x2 = x1; y2 = Y1; x1 = _x2; y1 = _y2;} var DX = x2-x1, dy = math.abs (Y2-y1), x = x1, y = Y1, YINCR = (Y1> Y2)? -1: 1, drw = true; if (dx> = DY) {var = DY << 1, PRU = PR - (DX << 1), P = Pr - -dx; while ((DX -)> 0) {if (drw) this.mkdiv (x, y, 1, 1); drw =! DR W; if (p> 0) {y = yincr; p = PRU;} else p = pr; x;} if (drw) this.mkdiv (x, y, 1, 1);} else {VAR Pr = DX << 1, PRU = PR - (DY << 1), P = Pr-Dy; while ((DY--)> 0) {IF (DRW) THIS.MKDIV (x, y, 1 , 1); DRW =! Drw; y = yincr; if (p> 0) { x; p = PRU;} else p = pr;} f (drw) this.mkdiv (x, y, 1, 1);
}} Function Mkov (Left, Top, Width, Height) {var A = Width >> 1, B = Height >> 1, Wod = Width & 1, HOD = (Height & 1) 1, CX = Left a, CY = TOP b, x = 0, y = b, ox = 0, OY = B, AA = (A * a) << 1, bb = (b * b) << 1, st = (aa >> 1) * (1- (B << 1)) BB, TT = (BB >> 1) - AA * ((B << 1) -1), W, H; WHILE (Y> 0) {IF (ST < 0) {ST = BB * ((x << 1) 3); TT = (bb << 1) * ( x);} else if (tt <0) {ST = BB * ( (x << 1) 3) - (AA << 1) * (Y-1); TT = (BB << 1) * ( x) - aa * (((y -) << 1) -3); w = x-oX; h = OY-Y; if (W & 2 && H & 2) {this.mkovqds (CX, CY, -X 2, OX WOD, -OY, OY-1 HOD , 1, 1); this.mkovqds (CX, CY, -X 1, X-1 WOD, -Y-1, Y HOD, 1, 1);} else this.mkovqds (CX, CY, - X 1, OX WOD, -OY, OY-H HOD, W, H); OX = X; OY = Y;} else {TT - = aa * ((Y << 1) -3); ST - = (AA << 1) * (- y);}} this.mkdiv (CX-A, CY-OY, A-OX 1, (Oy << 1) hod; this.mkdiv (CX OX WOD, CY-OY, A-OX 1, (OY << 1) HOD);} Function Mkov2D (Left, Top, Width, Height) {var s = this.stroke; width = S- 1; Height = S-1; VAR A = Width >> 1, B = Height >> 1, Wod = Width & 1, HOD = (Height & 1) 1, CX = Left a, CY = TOP B, X = 0, y = b, AA = (A * a) << 1, bb = (b * b) << 1, s T = (AA >> 1) * (1- (B << 1)) BB, TT = (BB >> 1) - AA * ((B << 1) -1); IF (S-4 < 0 && (! (S-2) || width-51> 0 && height-51> 0)) {var ox = 0, OY = B, W, H, PXL, PXR, PXT, PXB, PXW; While Y> 0) {IF (ST <0) {ST = BB * ((x <<
1) 3); TT = (bb << 1) * ( x);} else if (tt <0) {st = bb * ((x << 1) 3) - (AA < <1) * (Y-1); TT = (BB << 1) * ( x) - aa * ((Y -) << 1) -3); w = x-ox; h = OY-Y; if (W-1) {PXW = W 1 (S & 1); h = s;} else if (h-1) {pxw = S; h = 1 (S & 1);} else PXW = h = s; this.mkovqds (CX, CY, -X 1, OX-PXW W WOD, -OY, -H OY HOD, PXW, H); ox = x; io = Y; } else {tt - = aa * (Y << 1) -3); ST - = (AA << 1) * (- y);}} this.mkdiv (CX-A, CY-OY, S (OY << 1) hod; this.mkdiv (CX A WOD-S 1, CY-OY, S, (OY << 1) hod);} else {var _a = (width- ((S-1) << 1)) >> 1, _b = (Height - ((S-1) << 1)) >> 1, _x = 0, _y = _b, _aa = (_A * _A) << 1, _bb = (_b * _b) << 1, _ST = (_AA >> 1) * (1 - (_ b << 1)) _bb, _tt = (_bb >> 1) - _AA * ((( _B << 1) -1), PXL = New Array (), PXT = New Array (), _ PXB = New Array (); PXL [0] = 0; PXT [0] = B; _PXB [0] = _b -1; while (y> 0) {if (st <0) {st = bb * ((x << 1) 3); TT = (bb << 1) * ( x); PXL [PXL.LENGTH] = X; PXT [PXT.LENGTH] = Y;} else IF (TT <0) {ST = BB * ((x << 1) 3) - (AA << 1) * ( Y-1); TT = (bb << 1) * ( x) - AA * ((Y -) << 1) -3); PXL [PXL.Length] = X; PXT [PXT .length = y;} else {tt - = aa * ((y << 1) -3); ST - = (AA << 1) * (- y) } if (_y> 0) {i (_ST <0) {_ st = _bb * ((_ x << 1) 3); _ TT = (_bb << 1) * ( _ x); _ PXB [ _PXB.LENGTH] = _Y-1;} else if (_tt <0) {_ st = _bb * ((_ x << 1) 3) - (_AA << 1) * (_ Y-1); _ TT = (_bb << 1) * (
_X) - _AA * (((_ y -) << 1) -3); _ PXB [_pxb.length] = _y-1;} else {_tt - = _AA * ((_ y << 1) -3); _ST - = (_AA << 1) * (--_ y); _ pXB [_pxb.length-1] -;}}} var ox = 0,}}} var ox = 0,}}} var}}} var = 0,}}} var ox = 0,}}} var}} var}} var} Length, w, h; for (var i = 0; i
} Function MkRectdott (X, Y, W, H) {this.drawline (x, y, x w, y); this.drawline (x w, y, x w, y h); this.drawline (x, y h, x w, y h); this.drawline (x, y, x, y h);} function jsgfont () {this.plain = 'font-weight: normal; This.bold = 'font-weight: bold;'; this.italic = 'font-style: italic; "this.italic_bold; this.bold_italic = this.bold;} var font = New jsgfont (); function jsgstroke () {this.dotted = -1;} var stroke = new jsgstroke (); function jsgraphics (id, wnd) {this.setColor = new function ('arg', 'this.color = arg.tolowercase (); '); this.setstroke = function (x) {this.stroke = x; if (! (x 1)) {this.drawline = mklindott; this.mkov = mkovdott; this.drawRect = MkRECTDOTT;} else if (x-1> 0) {this.drawline = mklin2d; this.mkov = mkov2d; this.drawRect = mkRect;} else {this.drawline = mklin; this.mkov = mkov; this.drawRect = MkRect;}}; this.SetPrintable = function (arg) {this.printable = arg; if (jg_fast) {this.mkdiv = mkdivie; this.htmrpc = arg? htmprtrpc: htmrpc;} else this.mkdiv = jg_n4? mklyr: arg? mkdivprt: mkdiv;}; this.setfont = function (fam, sz, sty) {this.ftfam = fam; this.ftsz = SZ; this.ftsty = style || font.plain;}; this.drawpolyline = this.drawpolyline = function (x, y, s) {for (var i = 0; i Function (x, y, w, h) {this.mkov (x, y, w, h);}; this.fillellipse = this.FillOval = function (left, top, w, h) {var A = (W - = 1) >> 1, b = (h - = 1) >> 1, WOD = (W & 1) 1, hod = (h & 1) 1, cx = left a, cy = top b, x = 0, y = b, ox = 0, = b, AA2 = (a * a) << 1, aa4 = aa2 << 1, bb = (b * b) << 1, st = (aa2 >> 1 ) * (1- (b << 1)) bb, tt = (bb >> 1) - aa2 * ((B << 1) -1), PXL, DW, DH; IF (W 1) while (Y> 0) {IF (ST <0) {ST = B * ((x << 1) 3); TT = (bb << 1) * ( x);} else if (TT <0) {ST = BB * ((x << 1) 3) - AA4 * (Y-1); PXL = CX-X; DW = (x << 1) WOD; TT = (BB << 1) * ( x) - AA2 * ((Y -) << 1) -3); DH = OY-Y; this.mkdiv (PXL, CY-OY, DW, DH); this .mkdiv (PXL, CY OY-DH HOD, DW, DH); OX = x; OY = Y;} else {TT - = aa2 * ((Y << 1) -3); ST - = aa4 * (--Y);}}}}} (CX-A, CY-OY, W 1, (OY << 1) hod);}; this.fillpolygon = function (array_x, array_y) {var i; VAR Y; VAR Miny, Maxy; Var x1, y1; var x2, y2; var indef1, ind2; var INTS; var n = array_x.length; if (! n) return; mi-y = array_y [0]; MAXY = array_y [0]; for (i = 1; i Y1 = array_y [ind2]; x2 = array_x [ind1]; x1 = array_x [ind2];} else continue; if (Y> = Y1) && (Y ' / div> ';} this.clear = function () {this.htm = ""; if (this.cnv) this.cnv.innerhtml = this.defhtm;}; this.mkovqds = function (CX, CY, XL, XR, YT, YB, W, H) {THIS.MKDIV (XR