
/* This notice must be untouched at all times.    calculator.js   v. 1.2 function DRAW(az_a,az_b,a_mod,text,xc,xy,color,dot,mod,draw_style,width,height,lay_id)  {  if (a_mod == "a"){lay_id = "draw";}  jg_az=new jsGraphics(lay_id);  Stroke=document.layout.stroke.value;  if (Stroke == 0){Stroke = -1;}  font_size=document.layout.font_s.value;  draw_mode=document.layout.draw_mode.value;  if (dot == 1){Dotted=true;}else{Dotted=false;}  if (window.event) event.cancelBubble = true;  if (color == ""){color = "FFFF66";}    for (var z = 0; z<color.length; z++)  if (isNaN(parseInt(color.charAt(z), 16)))  color = color.substring(0, z) + '6' + color.substring(z+1);  var t0 = (new Date()).getTime();      jg_az.setPrintable(false);      jg_az.setColor("#"+color);      jg_az.setFont("arial",font_size+"px",Font.BOLD);              if (document.layout.zschrift.value == "0"){text = "";xc ="";xy = "";}else{ jg_az.drawString(text,xc,xy);}      jg_az.setStroke(Dotted? Stroke.DOTTED : parseInt(Stroke));    if(draw_style == "1"){  if (draw_mode == "f"){  jg_az.fillEllipse(parseInt(az_a-(width/2)),parseInt(az_b-(height/2)), parseInt(width), parseInt(height));  }else{  jg_az.drawEllipse(parseInt(az_a-(width/2)),parseInt(az_b-(height/2)), parseInt(width), parseInt(height));  }  }  else if(draw_style == "2"){  if (draw_mode == "f"){  jg_az.fillRect(parseInt(az_a-(width/2)),parseInt(az_b-(height/2)), parseInt(width), parseInt(height));  }else{  jg_az.drawRect(parseInt(az_a-(width/2)),parseInt(az_b-(height/2)), parseInt(width), parseInt(height));  }  }  else if(draw_style == "5"){  jg_az.drawImage("image/pin.gif", az_a-12,az_b-12,13,14);  }  else if(draw_style == "6"){  jg_az.drawImage("image/stern_anim.gif", az_a-7,az_b-7,14,14);  }  else if(draw_style == "7"){  jg_az.drawImage("image/pfeil.gif", az_a,az_b,22,22);  }    else {   if(draw_style == "3" || draw_style == "4"){          var pgx = az_a.split(',');          var pgy = az_b.split(',');          var comm = '
Fehler!';                for (var z = 0; z<pgx.length; z++)              {                  if (isNaN(pgx[z] = parseInt(pgx[z])) || isNaN(pgy[z] = parseInt(pgy[z])))                  {                      alert('X-Y'+comm);                      return;                  }              }  if(draw_style == "3"){jg_az.drawPolyline(pgx, pgy);}  else{if (draw_mode == "f"){jg_az.fillPolygon(pgx, pgy);}else{jg_az.drawPolygon(pgx, pgy);}}  }  }         jg_az.paint();      var t1 = (new Date()).getTime() - t0;    jg_az = "";  }
