----------------------------------------------------------------------------------------------------------------
COPY AND PASTE BELOW CODE IN POST HTML SECTION
-----------------------------------------------------------------------------------------------------------------
<html>
<head>
<style type="text/css">
.CalcTable {
padding: 4px 6px;
border: solid #ddd 1px;
border-collapse: collapse
}
.CalcTitleCell {
background-color: transparent;
color: #1d487e;
font-family: Verdana, Arial, sans-serif;
font-size: 130%;
font-weight: bold;
text-align: center;
height: 30px
}
.CalcInstructCell {
padding: 5px;
border-bottom: solid #ddd 1px
}
.CalcRowTitleCell {
background-color: #ccc;
color: #1d487e;
font-family: Verdana, Arial, sans-serif;
font-size: 85%;
font-weight: bold;
text-align: left;
border: solid #ddd 1px
}
.CalcColCell {
background-color: #1d487e;
color: #fff;
font-family: Verdana, Arial, sans-serif;
font-size: 100%;
font-weight: bold;
text-align: center;
border: solid #ddd 1px
}
.CalcColCellLeft {
background-color: #1d487e;
color: #fff;
font-family: Verdana, Arial, sans-serif;
font-size: 100%;
font-weight: bold;
text-align: left;
padding-left: 5px;
border: solid #ddd 1px
}
.CalcColCellRight {
background-color: #1d487e;
color: #fff;
font-family: Verdana, Arial, sans-serif;
font-size: 100%;
font-weight: bold;
text-align: right;
border: solid #ddd 1px
}
.CalcRowOdd {
background-color: #eee
}
.CalcRowEven {
background-color: #fff
}
.CalcInDescCell {
padding-left: 5px;
padding-right: 5px
}
.CalcOutDescCell {
text-align: left
}
.CalcInFldCell {
text-align: right;
padding-right: 5px;
font-size: 8pt
}
.CalcOutFldCell {
text-align: right;
padding-right: 5px;
border-left: solid #ddd 1px;
border-right: solid #ddd 1px;
font-size: 8pt
}
.CalcInFld {
font-size: 8pt
}
.CalcInFldFix {
font-size: 8pt
}
.CalcSelectFix {
font-size: 8pt
}
.CalcOutFldOddFix {
border: medium none;
background-color: #eee;
font-weight: normal;
text-align: right;
font-size: 8pt
}
.CalcOutFldEvenFix {
border: medium none;
background-color: #fff;
font-weight: normal;
text-align: right;
font-size: 8pt
}
.CalcOutFldOdd {
border: medium none;
background-color: #eee;
font-weight: normal;
text-align: right;
font-size: 8pt
}
.CalcOutFldEven {
border: medium none;
background-color: #fff;
font-weight: normal;
text-align: right;
font-size: 8pt
}
.CalcOutFldBoldOdd {
border: medium none;
background-color: #eee;
font-weight: bold;
text-align: right;
font-size: 8pt
}
.CalcOutFldBoldEven {
border: medium none;
background-color: #fff;
font-weight: bold;
text-align: right;
font-size: 8pt
}
.CalcButtonCell {
text-align: center;
border: solid #ddd 1px
}
.CalcButton {}.CalcSummaryCell {
padding-left: 5px;
padding-right: 5px;
background-color: #fff;
border: solid #ddd 1px
}
.ChartTable {
border-collapse: collapse
}
.ChartBody {}.ChartColHead1 {
background-color: #1d487e;
color: #fff;
font-family: Verdana, Arial, sans-serif;
font-size: 100%;
font-weight: bold;
text-align: center;
border: solid #ccc 1px
}
.ChartColHead1Small {
background-color: #1d487e;
color: #fff;
font-family: Arial, sans-serif;
font-size: 80%;
font-weight: bold;
text-align: center;
border: solid #ccc 1px
}
.ChartColHead2 {
background-color: #ccc;
color: #1d487e;
font-family: Verdana, Arial, sans-serif;
font-size: 85%;
font-weight: bold;
text-align: center;
border: solid #ddd 1px
}
.ChartRowOdd {
background-color: #eee
}
.ChartRowEven {
background-color: #fff
}
.ChartTextCell {
text-align: center;
padding-left: 2px;
padding-right: 2px;
border: solid #ddd 1px
}
.ChartTextCellLeft {
text-align: left;
padding-left: 2px;
padding-right: 2px;
border: solid #ddd 1px
}
.ChartNumCell {
text-align: right;
padding-left: 2px;
padding-right: 2px;
border: solid #ddd 1px
}
.ChartNumCellSmall {
font-family: Arial, sans-serif;
font-size: 85%;
text-align: right;
padding-left: 2px;
padding-right: 2px;
border: solid #ddd 1px
}
.ChartSubCell {
text-align: right;
border-top: solid #000 2px;
border-left: solid #ddd 1px;
border-right: solid #ddd 1px;
font-weight: bold;
background-color: #ccc;
padding-left: 4px;
padding-right: 2px
}
.ChartTotCell {
text-align: right;
border-top: double #000 3px;
border-bottom: double #000 3px;
border-left: solid #ddd 1px;
border-right: solid #ddd 1px;
font-weight: bold;
background-color: #ccc;
padding-left: 4px;
padding-right: 2px
}
#dhtmltooltip {
position: absolute;
left: -300px;
width: 150px;
border: 1px solid #000;
padding: 2px;
background-color: #ffffe0;
visibility: hidden;
z-index: 100;
filter: progid: DXImageTransform.Microsoft.Shadow(color=gray, direction=135)
}
#dhtmlpointer {
position: absolute;
left: -300px;
z-index: 101;
visibility: hidden
}
.div_help {
font-family: arial, verdana, helvetica, sans-serif;
font-size: small;
text-align: left;
padding: 10px
}
.SideCalcTitleCell {
font-size: 100%;
background-color: #000;
font-weight: bold;
color: #fff
}
.SideCalcResult {
text-align: right;
width: 94%;
background-color: #eee;
border: solid #000 1px;
font-family: arial, sans-serif;
font-size: 11pt;
color: #000;
padding-right: 5px
}
.SideCalcNum {
font-weight: bold;
width: 30px
}
.SideCalcSign {
font-weight: bold;
color: #00f;
width: 30px
}
.SideCalcClr {
font-weight: bold;
width: 30px;
color: red
}
.SideCalcClrTape {
font-weight: bold;
width: 94%;
color: #000
}
.SideCalcTapeCell {
text-align: center;
background-color: #ccc;
border-top: solid #ccc 1px;
border-left: solid #ccc 1px;
border-right: solid #ccc 1px;
border-bottom: dashed #000 1px;
font-family: courier, arial, sans-serif;
font-size: 10pt;
color: #000;
padding-right: 0px;
padding-left: 0px
}
.BelowCalcTable {
border-collapse: collapse
}
.BelowCalcAdCell {}.BelowCalcColHead {
background-color: #ccc;
color: #1d487e;
font-family: Verdana, Arial, sans-serif;
font-size: 85%;
font-weight: bold;
text-align: center;
border: solid #ccc 1px
}
.BelowCalcImgHead {
background-color: #ccc;
text-align: center;
border: solid #ccc 1px
}
.BelowCalcLinkCell {
text-align: left;
padding-left: 2px;
padding-right: 2px;
border: solid #ddd 1px
}
.sppTable {
width: 300px;
border-collapse: collapse
}
.sppRow {
background-color: #ddd
}
.sppColHead {
background-color: #fff;
color: #1d487e;
font-family: Verdana, Arial, sans-serif;
font-size: 85%;
font-weight: bold;
text-align: center;
width: 240px;
border-left: solid #8f8fb3 1px;
border-top: solid #8f8fb3 1px
}
.sppImgHead {
background-color: #fff;
text-align: center;
width: 60px;
border-right: solid #8f8fb3 1px;
border-top: solid #8f8fb3 1px
}
.sppLinkCell {
font-size: 85%;
text-align: left;
padding-left: 2px;
padding-right: 2px;
border-left: solid #8f8fb3 1px;
border-bottom: solid #8f8fb3 1px;
border-right: solid #8f8fb3 1px
}
.fb_like_button {
border: 1px dotted #000;
background-color: #eee;
padding: 10px;
width: 320px;
float: right
}
.blogItItem {
margin: 18px 0;
padding: 0 12px;
border: 1px solid #ccc;
background: #eee;
box-shadow: 4px 4px 4px #ccc
}
.blogItItem h6 {
font-style: normal;
font-weight: normal;
font-size: 80%
}
.leftnav_heading {
text-align: center
}
.leftnav_heading a {
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
text-align: left;
line-height: 14px;
background-image: url();
color: #333;
text-decoration: none;
width: 169px;
height: 41px;
display: block;
font-weight: bold;
margin-top: 18px
}
.leftnav_heading a:hover {
background-image: url()
}
.leftnav_heading span {
display: block;
padding: 7px
}
.texttop {
font-size: 15px;
line-height: 14px;
color: #333;
text-shadow: 0px 0px 2px #fff;
margin-bottom: 10px
}
.textbottom {
color: #333;
font-size: 15px;
text-shadow: 0px 0px 2px #fff
}
#mobileBtnDiv {
display: none
}
@media only screen and (max-device-width: 640px) {
#mobileBtnDiv {
display: block;
width: 100%;
text-align: center;
padding: 10px
}
#mobileBtn {
display: inline-block;
text-align: center;
width: 50%;
font-size: 2em;
line-height: 2em;
background-color: #0f5378;
color: #fff;
text-decoration: none;
border-radius: 10px;
border: 1px solid #fff
}
#mobileBtn:hover {
background-color: #4cc2ce;
color: #087197
}
}
</style>
<script>
var mod_pagespeed_ohSsHvAfnA = "function reduce_fraction(v_numer,v_denom){if(v_numer<0&&v_denom<0){v_numer*=-1;v_denom*=-1;}\nvar max_gcf=0;if(v_numer>v_denom){max_gcf=v_numer;}else\nif(v_denom>v_numer){max_gcf=v_denom;}else{max_gcf=1;}\nvar v_gcf=1;var cnt=max_gcf;var mult_chk=0;while(cnt>0){if(v_numer%cnt==0&&v_denom%cnt==0&&mult_chk==0){v_gcf=cnt;mult_chk=1;}\ncnt--;}\nvar v_red_numer=v_numer/v_gcf;var v_red_denom=v_denom/v_gcf;var frac_str=\"\"+v_red_numer+\"/\"+v_red_denom+\"\";if(v_red_denom==1){frac_str=v_red_numer;}else\nif(v_red_numer==0){frac_str=0;}else\nif(v_red_denom==0){frac_str=\"undefined\";}\nreturn frac_str;}\nfunction calc_slope(form){var v_x1=document.calc.x1.value;var v_y1=document.calc.y1.value;var v_x2=document.calc.x2.value;var v_y2=document.calc.y2.value;if(v_x1.length==0){alert(\"Please enter a value for X1.\");document.calc.x1.focus();}else\nif(v_y1.length==0){alert(\"Please enter a value for Y1.\");document.calc.y1.focus();}else\nif(v_x2.length==0){alert(\"Please enter a value for X2.\");document.calc.x2.focus();}else\nif(v_y2.length==0){alert(\"Please enter a value for Y2.\");document.calc.y2.focus();}else\nif(v_x1==v_x2&&v_y1==v_y2){alert(\"Please enter two different points on the line in question.\");document.calc.x1.focus();}else{if(v_x1.indexOf(\"/\")>-1){var v_x1_ar=v_x1.split(\"/\");var v_x1_1=Number(v_x1_ar[0]);var v_x1_2=Number(v_x1_ar[1]);v_x1=v_x1_1/v_x1_2;}\nif(v_x2.indexOf(\"/\")>-1){var v_x2_ar=v_x2.split(\"/\");var v_x2_1=Number(v_x2_ar[0]);var v_x2_2=Number(v_x2_ar[1]);v_x2=v_x2_1/v_x2_2;}\nif(v_y1.indexOf(\"/\")>-1){var v_y1_ar=v_y1.split(\"/\");var v_y1_1=Number(v_y1_ar[0]);var v_y1_2=Number(v_y1_ar[1]);v_y1=v_y1_1/v_y1_2;}\nif(v_y2.indexOf(\"/\")>-1){var v_y2_ar=v_y2.split(\"/\");var v_y2_1=Number(v_y2_ar[0]);var v_y2_2=Number(v_y2_ar[1]);v_y2=v_y2_1/v_y2_2;}\nv_x1=Number(v_x1);v_x2=Number(v_x2);v_y1=Number(v_y1);v_y2=Number(v_y2);var max_pnt=Math.abs(v_x1);if(Math.abs(v_x2)>max_pnt){max_pnt=Math.abs(v_x2);}\nif(Math.abs(v_y1)>max_pnt){max_pnt=Math.abs(v_y1);}\nif(Math.abs(v_y2)>max_pnt){max_pnt=Math.abs(v_y2);}\nvar v_delta_x=Number(v_x2)-Number(v_x1);document.calc.delta_x.value=v_delta_x;var v_delta_y=Number(v_y2)-Number(v_y1);document.calc.delta_y.value=v_delta_y;var v_slope=\"\";var v_dec_slope=0;if(v_delta_x==0){document.calc.slope.value=\"undefined (vertical line)\";document.calc.y_int.value=\"undefined (vertical line)\";if(v_delta_y<0){document.calc.angle.value=\"-90\";}else{document.calc.angle.value=\"90\";}\ndocument.calc.dist.value=Math.abs(v_delta_y);document.calc.formula.value=\"x = \"+v_x1+\"\";var line_equation=\"y - y1 = m(x - x1)<br />\";line_equation+=\"y - (\"+v_y1+\") = \"+v_dec_slope+\"(x - (\"+v_x1+\"))<br />\";line_equation+=\"y = \"+v_dec_slope+\"x - ((\"+v_x1_mult+\") + (\"+v_y1+\"))<br />\";var sign=\" - \";var abs_y_int=Math.abs(y_intercept);if(y_intercept>0){sign=\" + \";}\nvar formula=\"\";if(v_dec_slope==-1){line_equation+=\"y = -x \";v_formula=\"y = -x \";}else\nif(v_dec_slope==1){line_equation+=\"y = x \";v_formula=\"y = x \";}else{line_equation+=\"y = \"+v_dec_slope+\"x \";v_formula=\"y = \"+v_dec_slope+\"x \";}\nif(abs_y_int!=0){line_equation+=\"\"+sign+\" \"+abs_y_int+\"\";v_formula+=\"\"+sign+\" \"+abs_y_int+\"\";}\nif(max_pnt>1300){document.getElementById(\"chart\").innerHTML=\"\";}else{document.getElementById(\"chart\").innerHTML=\"<div id='canvas' style='overflow:hidden;position:relative;width:600px;height:600px; background-color: white; margin: 0 auto;'></div>\";var v_scale=20;var v_origin_x=300;var v_origin_y=300;var v_grid=1;var v_new_x1=15;var v_new_x2=-15;if(max_pnt>15&&max_pnt<50){v_scale=5;v_origin_x=300;v_origin_y=300;v_grid=5;v_new_x1=50;v_new_x2=-50;}else\nif(max_pnt>49&&max_pnt<120){v_scale=2;v_origin_x=300;v_origin_y=300;v_grid=5;v_new_x1=120;v_new_x2=-120;}else\nif(max_pnt>119&&max_pnt<1300){v_scale=.2;v_origin_x=300;v_origin_y=300;v_grid=60;v_new_x1=1300;v_new_x2=-1300;}\nvar gr=new jsGraphics(document.getElementById(\"canvas\"));var col=new jsColor(\"#F6962B\");var pen=new jsPen(col,2);var bluePen=new jsPen(new jsColor(\"blue\"),1);var orangePen=new jsPen(new jsColor(\"#0F5378\"),1);var cht_x1=v_origin_x+(Number(v_x1)*v_scale);var cht_y1=v_origin_y-(Number(v_y1)*v_scale);var cht_x2=v_origin_x+(Number(v_x2)*v_scale);var cht_y2=v_origin_y-(Number(v_y2)*v_scale);var v_new_y1=(v_dec_slope*v_new_x1)+y_intercept;var v_new_y2=(v_dec_slope*v_new_x2)+y_intercept;var cht_new_x1=v_origin_x+(Number(v_new_x1)*v_scale);var cht_new_y1=v_origin_y-(Number(v_new_y1)*v_scale);var cht_new_x2=v_origin_x+(Number(v_new_x2)*v_scale);var cht_new_y2=v_origin_y-(Number(v_new_y2)*v_scale);var newpnt1=new jsPoint(cht_x1,0);var newpnt2=new jsPoint(cht_x2,600);gr.drawLine(pen,newpnt1,newpnt2);var pnt1=new jsPoint(cht_x1,cht_y1);var pnt2=new jsPoint(cht_x2,cht_y2);gr.drawLine(pen,pnt1,pnt2);gr.fillRectangle(new jsColor(\"#0F5378\"),new jsPoint(pnt1.x-1,pnt1.y-2),4,4);gr.fillRectangle(new jsColor(\"#0F5378\"),new jsPoint(pnt2.x-1,pnt2.y-2),4,4);var font=new jsFont(\"arial\",\"bold\",\"14px\");gr.drawText(\"Y\",new jsPoint(275,0),font,orangePen.color,30,\"center\");gr.drawText(\"X\",new jsPoint(575,285),font,orangePen.color,30,\"center\");if(v_y1>v_y2){gr.drawText(\" (\"+v_x1+\", \"+v_y1+\")\",new jsPoint(pnt1.x,pnt1.y-v_scale),font,bluePen.color,90,\"left\");gr.drawText(\" (\"+v_x2+\", \"+v_y2+\")\",new jsPoint(pnt2.x,pnt2.y),font,bluePen.color,90,\"left\");}else{gr.drawText(\" (\"+v_x1+\", \"+v_y1+\")\",new jsPoint(pnt1.x,pnt1.y),font,bluePen.color,90,\"left\");gr.drawText(\" (\"+v_x2+\", \"+v_y2+\")\",new jsPoint(pnt2.x,pnt2.y-v_scale),font,bluePen.color,90,\"left\");}\ngr.setScale(v_scale);gr.setOrigin(new jsPoint(v_origin_x,v_origin_y));gr.setCoordinateSystem(\"cartecian\");gr.showGrid(v_grid);}\nvar tbl=\"<table style='margin: 10px auto;'>\";tbl+=\"<tr><th colspan='2'>Slope Solution</th></tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>Y<sub>2</sub> - Y<sub>1</sub></td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>X<sub>2</sub> - X<sub>1</sub></td>\";tbl+=\"</tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>(\"+v_y2+\") - (\"+v_y1+\")</td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>(\"+v_x2+\") - (\"+v_x1+\")</td>\";tbl+=\"</tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>\"+v_delta_y+\"</td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>\"+v_delta_x+\"</td>\";tbl+=\"</tr>\";tbl+=\"<tr><td><em>m</em> = </td>\";tbl+=\"<td>undefined</td>\";tbl+=\"</tr>\";tbl+=\"</table>\";tbl+=\"<table style='margin: 10px auto;'>\";tbl+=\"<tr><th>Straight Line Equation</th></tr>\";tbl+=\"<tr><td>x = \"+v_x1+\"</td></tr>\";tbl+=\"</table>\";var v_summary=\"<br /><img src='http://2.bp.blogspot.com/-OISXIvXpGKY/VemlOfQesMI/AAAAAAABYyw/ZZV6tu4TKcg/s72-c/BASIC%2BJAVA%2BCALCULATOR.png' width='60' height='54' class='ItemLeft' />\";v_summary+=\"According to my calculations, the slope of a straight line passing through \";v_summary+=\"points (\"+v_x1+\",\"+v_y1+\") and (\"+v_x2+\",\"+v_y2+\") would be <strong>undefined</strong>, \";v_summary+=\"as the line is a vertical line.\";v_summary+=\"<p>The following is how I solved for the slope, as well as the formulation of the \";v_summary+=\"resulting straight line equation. I will also include an attempt at graphing the \";v_summary+=\"points and the equation if the maximum absolute values of the x's and y's are \";v_summary+=\"less that 1300.</p>\";document.getElementById(\"summary\").innerHTML=v_summary+\"\"+tbl;}else\nif(v_delta_y==0){document.calc.slope.value=\"0 (horizontal line)\";document.calc.y_int.value=v_y1;document.calc.angle.value=\"0\";document.calc.dist.value=Math.abs(v_delta_x);document.calc.formula.value=\"y = \"+v_y1+\"\";var line_equation=\"y - y1 = m(x - x1)<br />\";line_equation+=\"y - (\"+v_y1+\") = \"+v_dec_slope+\"(x - (\"+v_x1+\"))<br />\";line_equation+=\"y = \"+v_dec_slope+\"x - ((\"+v_x1_mult+\") + (\"+v_y1+\"))<br />\";var sign=\" - \";var abs_y_int=Math.abs(y_intercept);if(y_intercept>0){sign=\" + \";}\nvar formula=\"\";if(v_dec_slope==-1){line_equation+=\"y = -x \";v_formula=\"y = -x \";}else\nif(v_dec_slope==1){line_equation+=\"y = x \";v_formula=\"y = x \";}else{line_equation+=\"y = \"+v_dec_slope+\"x \";v_formula=\"y = \"+v_dec_slope+\"x \";}\nif(abs_y_int!=0){line_equation+=\"\"+sign+\" \"+abs_y_int+\"\";v_formula+=\"\"+sign+\" \"+abs_y_int+\"\";}\nvar v_slope_str=\"\"+v_slope+\"\";if(max_pnt>1300){document.getElementById(\"chart\").innerHTML=\"\";}else{document.getElementById(\"chart\").innerHTML=\"<div id='canvas' style='overflow:hidden;position:relative;width:600px;height:600px; background-color: white; margin: 0 auto;'></div>\";var v_scale=20;var v_origin_x=300;var v_origin_y=300;var v_grid=1;var v_new_x1=15;var v_new_x2=-15;if(max_pnt>15&&max_pnt<50){v_scale=5;v_origin_x=300;v_origin_y=300;v_grid=5;v_new_x1=50;v_new_x2=-50;}else\nif(max_pnt>49&&max_pnt<120){v_scale=2;v_origin_x=300;v_origin_y=300;v_grid=5;v_new_x1=120;v_new_x2=-120;}else\nif(max_pnt>119&&max_pnt<1300){v_scale=.2;v_origin_x=300;v_origin_y=300;v_grid=60;v_new_x1=1300;v_new_x2=-1300;}\nvar gr=new jsGraphics(document.getElementById(\"canvas\"));var col=new jsColor(\"#F6962B\");var pen=new jsPen(col,2);var bluePen=new jsPen(new jsColor(\"blue\"),1);var orangePen=new jsPen(new jsColor(\"#0F5378\"),1);var cht_x1=v_origin_x+(Number(v_x1)*v_scale);var cht_y1=v_origin_y-(Number(v_y1)*v_scale);var cht_x2=v_origin_x+(Number(v_x2)*v_scale);var cht_y2=v_origin_y-(Number(v_y2)*v_scale);var v_new_y1=(v_dec_slope*v_new_x1)+y_intercept;var v_new_y2=(v_dec_slope*v_new_x2)+y_intercept;var cht_new_x1=v_origin_x+(Number(v_new_x1)*v_scale);var cht_new_y1=v_origin_y-(Number(v_new_y1)*v_scale);var cht_new_x2=v_origin_x+(Number(v_new_x2)*v_scale);var cht_new_y2=v_origin_y-(Number(v_new_y2)*v_scale);var newpnt1=new jsPoint(0,cht_y1);var newpnt2=new jsPoint(600,cht_y2);gr.drawLine(pen,newpnt1,newpnt2);var pnt1=new jsPoint(cht_x1,cht_y1);var pnt2=new jsPoint(cht_x2,cht_y2);gr.drawLine(pen,pnt1,pnt2);gr.fillRectangle(new jsColor(\"#0F5378\"),new jsPoint(pnt1.x-1,pnt1.y-2),4,4);gr.fillRectangle(new jsColor(\"#0F5378\"),new jsPoint(pnt2.x-1,pnt2.y-2),4,4);var font=new jsFont(\"arial\",\"bold\",\"14px\");gr.drawText(\"Y\",new jsPoint(275,0),font,orangePen.color,30,\"center\");gr.drawText(\"X\",new jsPoint(575,285),font,orangePen.color,30,\"center\");if(v_y1>v_y2){gr.drawText(\"(\"+v_x1+\", \"+v_y1+\")\",new jsPoint(pnt1.x,pnt1.y-v_scale),font,bluePen.color,90,\"left\");gr.drawText(\"(\"+v_x2+\", \"+v_y2+\")\",new jsPoint(pnt2.x,pnt2.y),font,bluePen.color,90,\"left\");}else{gr.drawText(\"(\"+v_x1+\", \"+v_y1+\")\",new jsPoint(pnt1.x,pnt1.y),font,bluePen.color,90,\"left\");gr.drawText(\"(\"+v_x2+\", \"+v_y2+\")\",new jsPoint(pnt2.x,pnt2.y-v_scale),font,bluePen.color,90,\"left\");}\ngr.setScale(v_scale);gr.setOrigin(new jsPoint(v_origin_x,v_origin_y));gr.setCoordinateSystem(\"cartecian\");gr.showGrid(v_grid);}\nvar tbl=\"<table style='margin: 10px auto;'>\";tbl+=\"<tr><th colspan='2'>Slope Solution</th></tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>Y<sub>2</sub> - Y<sub>1</sub></td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>X<sub>2</sub> - X<sub>1</sub></td>\";tbl+=\"</tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>(\"+v_y2+\") - (\"+v_y1+\")</td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>(\"+v_x2+\") - (\"+v_x1+\")</td>\";tbl+=\"</tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>\"+v_delta_y+\"</td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>\"+v_delta_x+\"</td>\";tbl+=\"</tr>\";tbl+=\"<tr><td><em>m</em> = </td>\";tbl+=\"<td>0</td>\";tbl+=\"</tr>\";tbl+=\"</table>\";tbl+=\"<table style='margin: 10px auto;'>\";tbl+=\"<tr><th>Straight Line Equation</th></tr>\";tbl+=\"<tr><td>y = \"+v_y1+\"</td></tr>\";tbl+=\"</table>\";var v_summary=\"<br /><img src='http://2.bp.blogspot.com/-OISXIvXpGKY/VemlOfQesMI/AAAAAAABYyw/ZZV6tu4TKcg/s72-c/BASIC%2BJAVA%2BCALCULATOR.png' width='60' height='54' class='ItemLeft' />\";v_summary+=\"According to my calculations, the slope of a straight line passing through \";v_summary+=\"points (\"+v_x1+\",\"+v_y1+\") and (\"+v_x2+\",\"+v_y2+\") would be 0, since the line is \";v_summary+=\"horizontal (no change in y).\";v_summary+=\"<p>The following is how I solved for the slope, as well as the formulation of the \";v_summary+=\"resulting straight line equation. I will also include an attempt at graphing the \";v_summary+=\"points and the equation if the maximum absolute values of the x's and y's are \";v_summary+=\"less that 1300.</p>\";document.getElementById(\"summary\").innerHTML=v_summary+\"\"+tbl;}else{v_slope=reduce_fraction(v_delta_y,v_delta_x);v_dec_slope=v_delta_y/v_delta_x;var v_angle=(Math.atan(v_dec_slope))*180/(Math.PI);document.calc.angle.value=v_angle;var v_dist=Math.sqrt((v_delta_x*v_delta_x)+(v_delta_y*v_delta_y));document.calc.dist.value=v_dist;var v_x1_mult=v_dec_slope*(-1*v_x1);var y_intercept=Number(v_x1_mult)+Number(v_y1);document.calc.slope.value=v_dec_slope;document.calc.y_int.value=y_intercept;var line_equation=\"y - y1 = <em>m</em>(x - x1)<br />\";line_equation+=\"y - (\"+v_y1+\") = \"+v_dec_slope+\"(x - (\"+v_x1+\"))<br />\";line_equation+=\"y = \"+v_dec_slope+\"x - ((\"+v_x1_mult+\") + (\"+v_y1+\"))<br />\";var sign=\" - \";var abs_y_int=Math.abs(y_intercept);if(y_intercept>0){sign=\" + \";}\nvar formula=\"\";if(v_dec_slope==-1){line_equation+=\"y = -x \";v_formula=\"y = -x \";}else\nif(v_dec_slope==1){line_equation+=\"y = x \";v_formula=\"y = x \";}else{line_equation+=\"y = \"+v_dec_slope+\"x \";v_formula=\"y = \"+v_dec_slope+\"x \";}\nif(abs_y_int!=0){line_equation+=\"\"+sign+\" \"+abs_y_int+\"\";v_formula+=\"\"+sign+\" \"+abs_y_int+\"\";}\ndocument.calc.formula.value=v_formula;var v_slope_str=\"\"+v_slope+\"\";if(max_pnt>1300){document.getElementById(\"chart\").innerHTML=\"\";}else{document.getElementById(\"chart\").innerHTML=\"<div id='canvas' style='overflow:hidden;position:relative;width:600px;height:600px; background-color: white; margin: 0 auto;'></div>\";var v_scale=20;var v_origin_x=300;var v_origin_y=300;var v_grid=1;var v_new_x1=15;var v_new_x2=-15;if(max_pnt>15&&max_pnt<50){v_scale=5;v_origin_x=300;v_origin_y=300;v_grid=5;v_new_x1=50;v_new_x2=-50;}else\nif(max_pnt>49&&max_pnt<120){v_scale=2;v_origin_x=300;v_origin_y=300;v_grid=5;v_new_x1=120;v_new_x2=-120;}else\nif(max_pnt>119&&max_pnt<1300){v_scale=.2;v_origin_x=300;v_origin_y=300;v_grid=60;v_new_x1=1300;v_new_x2=-1300;}\nvar gr=new jsGraphics(document.getElementById(\"canvas\"));var col=new jsColor(\"#F6962B\");var pen=new jsPen(col,2);var bluePen=new jsPen(new jsColor(\"blue\"),1);var orangePen=new jsPen(new jsColor(\"#0F5378\"),1);var cht_x1=v_origin_x+(Number(v_x1)*v_scale);var cht_y1=v_origin_y-(Number(v_y1)*v_scale);var cht_x2=v_origin_x+(Number(v_x2)*v_scale);var cht_y2=v_origin_y-(Number(v_y2)*v_scale);var v_new_y1=(v_dec_slope*v_new_x1)+y_intercept;var v_new_y2=(v_dec_slope*v_new_x2)+y_intercept;var cht_new_x1=v_origin_x+(Number(v_new_x1)*v_scale);var cht_new_y1=v_origin_y-(Number(v_new_y1)*v_scale);var cht_new_x2=v_origin_x+(Number(v_new_x2)*v_scale);var cht_new_y2=v_origin_y-(Number(v_new_y2)*v_scale);var newpnt1=new jsPoint(cht_new_x1,cht_new_y1);var newpnt2=new jsPoint(cht_new_x2,cht_new_y2);gr.drawLine(pen,newpnt1,newpnt2);var pnt1=new jsPoint(cht_x1,cht_y1);var pnt2=new jsPoint(cht_x2,cht_y2);gr.drawLine(pen,pnt1,pnt2);gr.fillRectangle(new jsColor(\"#0F5378\"),new jsPoint(pnt1.x-1,pnt1.y-2),4,4);gr.fillRectangle(new jsColor(\"#0F5378\"),new jsPoint(pnt2.x-1,pnt2.y-2),4,4);var font=new jsFont(\"arial\",\"bold\",\"14px\");gr.drawText(\"Y\",new jsPoint(275,0),font,orangePen.color,30,\"center\");gr.drawText(\"X\",new jsPoint(575,285),font,orangePen.color,30,\"center\");if(v_y1>v_y2){gr.drawText(\"(\"+v_x1+\", \"+v_y1+\")\",new jsPoint(pnt1.x,pnt1.y-v_scale),font,bluePen.color,90,\"left\");gr.drawText(\"(\"+v_x2+\", \"+v_y2+\")\",new jsPoint(pnt2.x,pnt2.y),font,bluePen.color,90,\"left\");}else{gr.drawText(\"(\"+v_x1+\", \"+v_y1+\")\",new jsPoint(pnt1.x,pnt1.y),font,bluePen.color,90,\"left\");gr.drawText(\"(\"+v_x2+\", \"+v_y2+\")\",new jsPoint(pnt2.x,pnt2.y-v_scale),font,bluePen.color,90,\"left\");}\ngr.setScale(v_scale);gr.setOrigin(new jsPoint(v_origin_x,v_origin_y));gr.setCoordinateSystem(\"cartecian\");gr.showGrid(v_grid);}\nvar tbl=\"<table style='margin: 10px auto;'>\";tbl+=\"<tr><th colspan='2'>Slope Solution</th></tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>Y<sub>2</sub> - Y<sub>1</sub></td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>X<sub>2</sub> - X<sub>1</sub></td>\";tbl+=\"</tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>(\"+v_y2+\") - (\"+v_y1+\")</td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>(\"+v_x2+\") - (\"+v_x1+\")</td>\";tbl+=\"</tr>\";tbl+=\"<tr><td rowspan='2'><em>m</em> = </td>\";tbl+=\"<td style='border-bottom: 1px solid black;'>\"+v_delta_y+\"</td>\";tbl+=\"</tr>\";tbl+=\"<tr>\";tbl+=\"<td>\"+v_delta_x+\"</td>\";tbl+=\"</tr>\";tbl+=\"<tr><td><em>m</em> = </td>\";tbl+=\"<td>\"+v_slope+\"\";if(v_slope_str.indexOf(\"/\")>-1){tbl+=\", or \"+fns(v_dec_slope,2,0,0,0)+\"\";}\ntbl+=\"</td>\";tbl+=\"</tr>\";tbl+=\"</table>\";tbl+=\"<table style='margin: 10px auto;'>\";tbl+=\"<tr><th>Straight Line Equation</th></tr>\";tbl+=\"<tr><td>\"+line_equation+\"</td></tr>\";tbl+=\"</table>\";var v_summary=\"<br /><img src='http://2.bp.blogspot.com/-OISXIvXpGKY/VemlOfQesMI/AAAAAAABYyw/ZZV6tu4TKcg/s72-c/BASIC%2BJAVA%2BCALCULATOR.png' width='60' height='54' class='ItemLeft' />\";v_summary+=\"According to my calculations, the slope of a straight line passing through \";v_summary+=\"points (\"+v_x1+\",\"+v_y1+\") and (\"+v_x2+\",\"+v_y2+\") would be \"+v_dec_slope+\".\";v_summary+=\"<p>The following is how I solved for the slope, as well as the formulation of the \";v_summary+=\"resulting straight line equation. I will also include an attempt at graphing the \";v_summary+=\"points and the equation if the maximum absolute values of the x's and y's are \";v_summary+=\"less that 1300.</p>\";document.getElementById(\"summary\").innerHTML=v_summary+\"\"+tbl;}}}\nfunction clear_results(form){document.calc.slope.value=\"\";document.calc.delta_x.value=\"\";document.calc.delta_y.value=\"\";document.calc.angle.value=\"\";document.calc.dist.value=\"\";document.calc.y_int.value=\"\";document.calc.formula.value=\"\";document.getElementById(\"summary\").innerHTML=\"\";document.getElementById(\"chart\").innerHTML=\"\";}\nfunction reset_calc(form){clear_results(document.calc);document.calc.reset();}";
var mod_pagespeed_NKCHgV4m0v = "function jsColor(){var c=\"#000000\";switch(arguments.length){case 1:k(arguments[0]);break;case 3:var d=arguments[0];var f=arguments[1];var m=arguments[2];c=j(d,f,m);if(c==false){c=\"#000000\"}break}this.setHex=k;function k(p){if(p.charAt(0)==\"#\"){c=p}else{if(isNaN(p)){a(p.toLowerCase())}else{c=\"#\"+p}}var o=e(c);if(!o){c=\"#000000\"}}this.getHex=n;function n(){return c}this.setRGB=h;function h(o,q,p){c=j(o,q,p);if(c==false){c=\"#000000\"}}this.getRGB=l;function l(){return e(c)}this.getDarkerShade=b;function b(s){var p,r,q;var o=l();if(!isNaN(s)){p=parseInt(o[0]-s);r=parseInt(o[1]-s);q=parseInt(o[2]-s)}if(p<0){p=0}if(r<0){r=0}if(q<0){q=0}return new jsColor(p,r,q)}this.getLighterShade=g;function g(s){var p,r,q;var o=l();if(!isNaN(s)){p=parseInt(o[0]+s);r=parseInt(o[1]+s);q=parseInt(o[2]+s)}if(p>255){p=255}if(r>255){r=255}if(q>255){q=255}return new jsColor(p,r,q)}this.rgbToHex=j;function j(o,q,p){if(o<0||o>255||q<0||q>255||p<0||p>255){return false}var r=Math.round(p)+256*Math.round(q)+65536*Math.round(o);return\"#\"+i(r.toString(16),6)}this.hexToRgb=e;function e(r){var o,q,p;if(r.charAt(0)==\"#\"){r=r.substring(1,7)}o=parseInt(r.substring(0,2),16);q=parseInt(r.substring(2,4),16);p=parseInt(r.substring(4,6),16);if(o<0||o>255||q<0||q>255||p<0||p>255){return false}return new Array(o,q,p)}function a(o){switch(o){case\"aqua\":c=\"#00FFFF\";break;case\"black\":c=\"#000000\";break;case\"blue\":c=\"#0000FF\";break;case\"fuchsia\":c=\"#FF00FF\";break;case\"green\":c=\"#008000\";break;case\"gray\":c=\"#808080\";break;case\"lime\":c=\"#00FF00\";break;case\"maroon\":c=\"#800000\";break;case\"navy\":c=\"#000080\";break;case\"olive\":c=\"#808000\";break;case\"purple\":c=\"#800080\";break;case\"red\":c=\"#FF0000\";break;case\"silver\":c=\"#C0C0C0\";break;case\"teal\":c=\"#008080\";break;case\"white\":c=\"#FFFFFF\";break;case\"yellow\":c=\"#FFFF00\";break}}function i(q,o){var p=q+\"\";while(p.length<o){p=\"0\"+p}return p}}function jsFont(d,e,b,c,a){this.family=null;this.weight=null;this.size=null;this.style=null;this.variant=null;if(d&&d!=\"\"){this.family=d}if(e&&e!=\"\"){this.weight=e}if(b&&b!=\"\"){this.size=b}if(c&&c!=\"\"){this.style=c}if(a&&a!=\"\"){this.variant=a}}function jsPen(a,b){this.color=new jsColor();this.width=\"1px\";if(arguments.length>0){this.color=a}if(arguments.length>=2){this.width=b}if(!isNaN(b)){this.width=b+\"px\"}}function jsPoint(a,b){this.x=0;this.y=0;if(arguments.length==2){this.x=a;this.y=b}}function jsGraphics(k){var L=new jsPoint(0,0);var F=1;var A=\"default\";var m;if(k){m=k}else{m=document.body}var e=null;this.drawLine=G;this.drawRectangle=R;this.fillRectangle=S;this.drawCircle=g;this.drawEllipse=N;this.fillCircle=v;this.fillEllipse=I;this.fillArc=u;this.drawArc=D;this.drawPolyline=O;this.drawPolygon=n;this.fillPolygon=h;this.drawBezier=r;this.drawPolyBezier=Q;this.drawCurve=i;this.drawClosedCurve=j;this.fillClosedCurve=E;this.drawText=a;this.drawImage=f;this.clear=H;this.showGrid=C;this.hideGrid=b;this.setOrigin=z;this.getOrigin=s;this.setScale=w;this.getScale=B;this.setCoordinateSystem=K;this.getCoordinateSystem=P;this.logicalToPhysicalPoint=M;e=document.createElement(\"div\");e.style.left=\"0px\";e.style.top=\"0px\";if(m.clientWidth>0&&m.clientHeight>0){e.style.width=(parseInt(m.clientWidth)-1)+\"px\";e.style.height=(parseInt(m.clientHeight)-1)+\"px\"}else{e.style.width=\"0px\";e.style.height=\"0px\"}e.style.zIndex=0;e.style.position=\"absolute\";e.style.display=\"none\";m.appendChild(e);function z(T){L=T}function s(){return L}function w(T){F=T}function B(){return F}function K(T){T=T.toLowerCase();if(T.toLowerCase()!=\"default\"&&T.toLowerCase()!=\"cartecian\"){A=\"default\"}else{A=T}}function P(){return A=name}function M(T){if(A==\"cartecian\"){return new jsPoint(T.x*F+L.x,L.y-T.y*F)}else{return new jsPoint(T.x*F+L.x,T.y*F+L.y)}}function C(ad,an,ah){if(an==null){an=true}var am,ak,V,T;var W=false;var aj=false;e.innerHTML=\"\";if(!ah){ah=new jsColor(200,200,200)}if(!ad){ad=Math.round(parseInt(e.style.width)/10)}else{ad=ad*F}var U=ah.getHex();if(parseInt(e.style.width)<=0||parseInt(e.style.height)<=0){return}else{e.style.display=\"\"}am=parseInt(e.style.left);ak=parseInt(e.style.left)+parseInt(e.style.width);V=parseInt(e.style.top);T=parseInt(e.style.top)+parseInt(e.style.height);if(L.x-parseInt(e.style.left)<=parseInt(e.style.left)+e.offsetWidth-L.x){W=true}if(L.y-parseInt(e.style.top)<=parseInt(e.style.top)+e.offsetHeight-L.y){aj=true}var ac=new Array();var Y=new jsFont(\"arial\",null,\"9px\");var X=ah.getDarkerShade(150);var ae=X.getHex();ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;z-index:-100;left:'+am+\"px;top:\"+V+\"px;width:\"+(ak-am+1)+\"px;height:1px;background-color:\"+U+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;z-index:-100;left:'+am+\"px;top:\"+T+\"px;width:\"+(ak-am+1)+\"px;height:1px;background-color:\"+U+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;z-index:-100;left:'+am+\"px;top:\"+V+\"px;width:1px;height:\"+(T-V+1)+\"px;background-color:\"+U+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;z-index:-100;left:'+ak+\"px;top:\"+V+\"px;width:1px;height:\"+(T-V+1)+\"px;background-color:\"+U+'\"></DIV>';var ab=e.offsetHeight;var al=e.offsetWidth;var ai;var af;for(var aa=(L.x-am)%ad;aa<ak;aa+=ad){if(aa==L.x&&aa>=am){if(aa>=am&&aa<=ak){ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;z-index:-99;left:'+aa+\"px;top:\"+V+\"px;width:1px;height:\"+ab+\"px;background-color:\"+ae+'\"></DIV>'}}else{ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;z-index:-100;left:'+aa+\"px;top:\"+V+\"px;width:1px;height:\"+ab+\"px;background-color:\"+U+'\"></DIV>'}if(an&&aa>=am&&aa<ak){if(ai&&ai.offsetLeft+ai.offsetWidth+1<aa){if(ai.offsetWidth<ak-aa){af=ag(Math.round((aa-L.x)/F),new jsPoint(aa+2,V+1+L.y),Y,X)}}else{if(!ai){af=ag(Math.round((aa-L.x)/F),new jsPoint(aa+2,V+1+L.y),Y,X)}}if(af){if(!aj){if(parseInt(af.style.top)+af.offsetHeight>T){af.style.top=T-af.offsetHeight-1}}else{if(parseInt(af.style.top)-af.offsetHeight-1>V){af.style.top=parseInt(af.style.top)-af.offsetHeight-1}if(parseInt(af.style.top)<=V){af.style.top=V+1}}af.style.visibility=\"visible\";ai=af}af=null}}ai=null;for(var Z=(L.y-V)%ad;Z<=T;Z+=ad){if(Z==L.y){if(Z>=V&&Z<=T){ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;z-index:-99;left:'+am+\"px;top:\"+Z+\"px;width:\"+al+\"px;height:1px;background-color:\"+ae+'\"></DIV>'}}else{ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;z-index:-100;left:'+am+\"px;top:\"+Z+\"px;width:\"+al+\"px;height:1px;background-color:\"+U+'\"></DIV>'}if(an&&Z!=L.y&&Z>=V&&Z<T){if(ai&&ai.offsetTop+ai.offsetHeight<Z){if(ai.offsetHeight<=T-Z){if(A==\"cartecian\"){af=ag(Math.round((L.y-Z)/F),new jsPoint(am+2+L.x,Z),Y,X)}else{af=ag(Math.round((Z-L.y)/F),new jsPoint(am+2+L.x,Z),Y,X)}}}else{if(!ai){if(A==\"cartecian\"){af=ag(Math.round((L.y-Z)/F),new jsPoint(am+2+L.x,Z),Y,X)}else{af=ag(Math.round((Z-L.y)/F),new jsPoint(am+2+L.x,Z),Y,X)}}}if(af){if(!W){if(parseInt(af.style.left)+1+af.offsetWidth<ak){af.style.left=parseInt(af.style.left)+1}else{af.style.left=ak-af.offsetWidth-3}}else{if(parseInt(af.style.left)-af.offsetWidth-2>am){af.style.left=parseInt(af.style.left)-af.offsetWidth-2}else{af.style.left=parseInt(af.style.left)+1}if(parseInt(af.style.left)<=am){af.style.left=am+1}}af.style.visibility=\"visible\";if(aj&&parseInt(af.style.top)+af.offsetHeight>L.y-af.offsetHeight&&parseInt(af.style.top)<L.y){af.style.visibility=\"hidden\"}if(aj&&parseInt(af.style.top)>L.y&&parseInt(af.style.top)<L.y+af.offsetHeight&&parseInt(af.style.top)>L.y){af.style.visibility=\"hidden\"}if(L.y>T&&parseInt(af.style.top)+af.offsetHeight>T-af.offsetHeight){af.style.visibility=\"hidden\"}if(!aj&&parseInt(af.style.top)<L.y+af.offsetHeight&&parseInt(af.style.top)>L.y){af.style.visibility=\"hidden\"}if(!aj&&parseInt(af.style.top)<L.y&&parseInt(af.style.top)+af.offsetHeight>L.y&&parseInt(af.style.top)<L.y){af.style.visibility=\"hidden\"}if(L.y<V&&parseInt(af.style.top)<V+af.offsetHeight){af.style.visibility=\"hidden\"}ai=af}af=null}}e.innerHTML=e.innerHTML+ac.join(\"\");function ag(at,ao,ar,aq,au){var ap=document.createElement(\"div\");ap.style.position=\"absolute\";ap.style.left=ao.x+\"px\";ap.style.top=ao.y+\"px\";ap.style.color=aq.getHex();ap.style.zIndex=-98;ap.style.visibility=\"hidden\";e.appendChild(ap);if(ar.family){ap.style.fontFamily=ar.family}if(ar.weight){ap.style.fontWeight=ar.weight}if(ar.size){ap.style.fontSize=ar.size}if(ar.style){ap.style.fontStyle=ar.style}if(ar.variant){ap.style.fontVariant=ar.variant}if(au){ap.align=au}ap.innerHTML=at;return ap}}function b(){e.innerHTML=\"\";e.style.display=\"none\"}function G(au,aa,Z){if(!au||!aa||!Z){return false}var V=m.appendChild(document.createElement(\"div\"));if(arguments[3]!=\"physical\"){phPoint0=M(aa);phPoint1=M(Z)}else{phPoint0=new jsPoint(aa.x,aa.y);phPoint1=new jsPoint(Z.x,Z.y)}var ap,ao,Y,W;ap=phPoint0.x;ao=phPoint1.x;Y=phPoint0.y;W=phPoint1.y;var X=au.color.getHex();if(Y==W){if(ap<=ao){V.innerHTML='<DIV style=\"position:absolute;overflow:hidden;left:'+ap+\"px;top:\"+Y+\"px;width:\"+(ao-ap+1)+\"px;height:\"+au.width+\";background-color:\"+X+'\"></DIV>'}else{if(ap>ao){V.innerHTML='<DIV style=\"position:absolute;overflow:hidden;left:'+ao+\"px;top:\"+Y+\"px;width:\"+(ap-ao+1)+\"px;height:\"+au.width+\";background-color:\"+X+'\"></DIV>'}}return V}if(ap==ao){if(Y<=W){V.innerHTML='<DIV style=\"position:absolute;overflow:hidden;left:'+ap+\"px;top:\"+Y+\"px;width:\"+au.width+\";height:\"+(W-Y+1)+\"px;background-color:\"+X+'\"></DIV>'}else{if(Y>W){V.innerHTML='<DIV style=\"position:absolute;overflow:hidden;left:'+ap+\"px;top:\"+W+\"px;width:\"+au.width+\";height:\"+(Y-W+1)+\"px;background-color:\"+X+'\"></DIV>'}}return V}var aj=new Array();var ak=new Array();var ai=Math.abs(ao-ap);var ah=Math.abs(W-Y);var al,aq;var ad=parseInt(au.width);al=Math.round(Math.sqrt((ad*ad)/((ah*ah)/(ai*ai)+1)));aq=Math.round(Math.sqrt(ad*ad-al*al));if(aq==0){aq=1}if(al==0){al=1}var U=Math.abs(W-Y)>Math.abs(ao-ap);if(U){var ar=ap;ap=Y;Y=ar;ar=ao;ao=W;W=ar}if(ap>ao){var ar=ap;ap=ao;ao=ar;ar=Y;Y=W;W=ar}var ac=ao-ap;var ab=Math.abs(W-Y);var am=ac/2;var at;var ae=Y;if(Y<W){at=1}else{at=-1}var ag,an;var T=0;var af=0;if(U){T=aq}else{af=al}for(x=ap;x<=ao;x++){if(U){if(x==ap){ag=ae;an=x}else{if(ae==ag){af=af+1}else{af=af+al;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+ag+\"px;top:\"+an+\"px;width:\"+T+\"px;height:\"+af+\"px;background-color:\"+X+'\"></DIV>';af=0;ag=ae;an=x}}if(x==ao){if(af!=0){af=af+al;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+ag+\"px;top:\"+an+\"px;width:\"+T+\"px;height:\"+af+\"px;background-color:\"+X+'\"></DIV>'}else{af=al;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+ae+\"px;top:\"+x+\"px;width:\"+T+\"px;height:\"+af+\"px;background-color:\"+X+'\"></DIV>'}}}else{if(x==ap){ag=x;an=ae}else{if(ae==an){T=T+1}else{T=T+aq;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+ag+\"px;top:\"+an+\"px;width:\"+T+\"px;height:\"+af+\"px;background-color:\"+X+'\"></DIV>';T=0;ag=x;an=ae}}if(x==ao){if(T!=0){T=T+aq;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+ag+\"px;top:\"+an+\"px;width:\"+T+\"px;height:\"+af+\"px;background-color:\"+X+'\"></DIV>'}else{T=aq;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+x+\"px;top:\"+ae+\"px;width:\"+T+\"px;height:\"+af+\"px;background-color:\"+X+'\"></DIV>'}}}am=am-ab;if(am<0){ae=ae+at;am=am+ac}}V.innerHTML=aj.join(\"\");return V}function o(ad,ac){function W(){this.xMax=0;this.xMin=0;this.isVertex=false}var U,T,af,ae;U=ad.x;T=ac.x;af=ad.y;ae=ac.y;var V=new Array();var aa=Math.abs(ae-af)>Math.abs(T-U);if(aa){var X=U;U=af;af=X;X=T;T=ae;ae=X}if(U>T){var X=U;U=T;T=X;X=af;af=ae;ae=X}var ah=T-U;var ag=Math.abs(ae-af);var Z=ah/2;var Y;var ab=af;if(af<ae){Y=1}else{Y=-1}for(x=U;x<=T;x++){if(aa){V[x]=new W();V[x].xMin=ab;V[x].xMax=ab;if(x==U&&ab==af){V[x].isVertex=true}}else{if(!V[ab]){V[ab]=new W();V[ab].xMin=x;V[ab].xMax=x;if(x==U&&ab==af){V[ab].isVertex=true}}else{V[ab].xMax=x}}Z=Z-ag;if(Z<0){ab=ab+Y;Z=Z+ah}}return V}function R(aa,U,Z,T){if(!aa||!U||!Z||!T){return false}Z=Math.round(Z*F);T=Math.round(T*F);var V=m.appendChild(document.createElement(\"div\"));var Y=new Array();var X=parseInt(aa.width);var W=aa.color.getHex();if(X>=T||X>=Z){return this.fillRectangle(aa.color,U,Z,T)}phPoint=M(U);Y[Y.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+phPoint.x+\"px;top:\"+phPoint.y+\"px;width:\"+Z+\"px;height:\"+X+\"px;background-color:\"+W+'\"></DIV>';Y[Y.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+phPoint.x+\"px;top:\"+(phPoint.y+T-X)+\"px;width:\"+Z+\"px;height:\"+X+\"px;background-color:\"+W+'\"></DIV>';Y[Y.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+phPoint.x+\"px;top:\"+(phPoint.y+X)+\"px;width:\"+X+\"px;height:\"+(T-2*X+1)+\"px;background-color:\"+W+'\"></DIV>';Y[Y.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(phPoint.x+Z-X)+\"px;top:\"+(phPoint.y+X)+\"px;width:\"+X+\"px;height:\"+(T-2*X+1)+\"px;background-color:\"+W+'\"></DIV>';V.innerHTML=Y.join(\"\");return V}function S(W,U,Y,T){if(!W||!U||!Y||!T){return false}Y=Math.round(Y*F);T=Math.round(T*F);var V=m.appendChild(document.createElement(\"div\"));phPoint=M(U);var X=W.getHex();V.innerHTML='<DIV style=\"position:absolute;overflow:hidden;left:'+phPoint.x+\"px;top:\"+phPoint.y+\"px;width:\"+Y+\"px;height:\"+T+\"px;background-color:\"+X+'\"></DIV>';return V}function c(am,aj,af,ae){if(!am||!aj||!af||!ae){return false}var ad=m.appendChild(document.createElement(\"div\"));var ac=new Array();var X=parseInt(am.width);var V=am.color.getHex();var ak=Math.round(af/2);var ai=Math.round(ae/2);var ag=aj.x;var U=aj.y;var Z=0;var Y=ai;var al=ak*ak;var W=ai*ai;var ah=Y;var ab=Z;var T;var aa;while(W*Z<al*Y){Z++;if((W*Z*Z+al*(Y-0.5)*(Y-0.5)-al*W)>=0){Y--}if(Z==1&&Y!=ah){ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+Z)+\"px;top:\"+(U+Y)+\"px;width:1px;height:1px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+Z)+\"px;top:\"+(U-Y)+\"px;width:1px;height:1px;background-color:\"+V+'\"></DIV>'}if(Y!=ah){T=Z-ab;ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+ab)+\"px;top:\"+(U+ah-X+1)+\"px;height:\"+X+\"px;width:\"+T+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag-ab-T+1)+\"px;top:\"+(U+ah-X+1)+\"px;height:\"+X+\"px;width:\"+T+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+ab)+\"px;top:\"+(U-ah)+\"px;height:\"+X+\"px;width:\"+T+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag-ab-T+1)+\"px;top:\"+(U-ah)+\"px;height:\"+X+\"px;width:\"+T+\"px;background-color:\"+V+'\"></DIV>';ah=Y;ab=Z}if(W*Z>=al*Y){T=Z-ab+1;ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+ab)+\"px;top:\"+(U+ah-X+1)+\"px;height:\"+X+\"px;width:\"+T+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag-ab-T+1)+\"px;top:\"+(U+ah-X+1)+\"px;height:\"+X+\"px;width:\"+T+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+ab)+\"px;top:\"+(U-ah)+\"px;height:\"+X+\"px;width:\"+T+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag-ab-T+1)+\"px;top:\"+(U-ah)+\"px;height:\"+X+\"px;width:\"+T+\"px;background-color:\"+V+'\"></DIV>'}}ah=Y;ab=Z;while(Y!=0){Y--;if((W*(Z+0.5)*(Z+0.5)+al*Y*Y-al*W)<=0){Z++}if(Z!=ab){aa=ah-Y;ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+ab-X+1)+\"px;top:\"+(U+ah-aa+1)+\"px;width:\"+X+\"px;height:\"+aa+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+ab-X+1)+\"px;top:\"+(U-ah)+\"px;width:\"+X+\"px;height:\"+aa+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag-ab)+\"px;top:\"+(U+ah-aa+1)+\"px;width:\"+X+\"px;height:\"+aa+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag-ab)+\"px;top:\"+(U-ah)+\"px;width:\"+X+\"px;height:\"+aa+\"px;background-color:\"+V+'\"></DIV>';ab=Z;ah=Y}if(Y==0){aa=ah-Y+1;ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+ab-X+1)+\"px;top:\"+(U+ah-aa+1)+\"px;width:\"+X+\"px;height:\"+aa+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag+ab-X+1)+\"px;top:\"+(U-ah)+\"px;width:\"+X+\"px;height:\"+aa+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag-ab)+\"px;top:\"+(U+ah-aa+1)+\"px;width:\"+X+\"px;height:\"+aa+\"px;background-color:\"+V+'\"></DIV>';ac[ac.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(ag-ab)+\"px;top:\"+(U-ah)+\"px;width:\"+X+\"px;height:\"+aa+\"px;background-color:\"+V+'\"></DIV>';ab=Z;ah=Y}}ad.innerHTML=ac.join(\"\");return ad}function N(az,au,am,al){if(!az||!au||!am||!al){return false}am*=F;al*=F;var ak=m.appendChild(document.createElement(\"div\"));var aj=new Array();phCenter=M(au);var ab=parseInt(az.width);if(ab<=1){return c(az,phCenter,am,al)}var Y=az.color.getHex();var av=Math.round(am/2);var at=Math.round(al/2);var an=phCenter.x;var V=phCenter.y;var ao=av-ab+1;var W=at-ab+1;var ay=d(phCenter,ao*2,W*2);var ad=ay[0];var X=ay[1];var ax=W;var ac=ao*ao;var ar=W*W;var af=0;var ae=at;var aw=av*av;var aa=at*at;var ah,ap;ah=1;ap=ae;var aq=ax;var U;var T;var ag=1;while(aa*af<aw*ae){af++;if((aa*af*af+aw*(ae-0.5)*(ae-0.5)-aw*aa)>=0){ae--}if(ae+1<W){if(ae!=ap){U=an-af+1;T=(af-1)+1-ad[ap];aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V-ap)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V+ap)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';U=U+2*(af-1)+1-T;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V-ap)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V+ap)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';ap=ae;ah=af}if(aa*af>=aw*ae){U=an-af;T=af+1-ad[ap];aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V-ae)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V+ae)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';U=U+2*af+1-T;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V-ae)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V+ae)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>'}}else{if(af==1&&ae!=ap){aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;width:1px;height:1px;left:'+an+\"px;top:\"+(V+ap-1)+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;width:1px;height:1px;left:'+an+\"px;top:\"+(V-ap)+\"px;background-color:\"+Y+'\"></DIV>'}if(ae!=ap){aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(an-af+1)+\"px;top:\"+(V-ap)+\"px;width:\"+(2*(af-1)+1)+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(an-af+1)+\"px;top:\"+(V+ap)+\"px;width:\"+(2*(af-1)+1)+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';ap=ae}if(ae==W||ae==0){aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(an-af)+\"px;top:\"+(V-ae)+\"px;width:\"+(2*af+1)+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(an-af)+\"px;top:\"+(V+ae)+\"px;width:\"+(2*af+1)+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>'}}}ah=af;ap=ae;ag=1;var Z=ad[ae];while(ae!=0){ae--;if((aa*(af+0.5)*(af+0.5)+aw*ae*ae-aw*aa)<=0){af++}if(ae+1<W){if(af!=ah||ad[ae]!=Z){ag=ap-ae;U=an-ah;T=ah+1-ad[ae+1];aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V-ap)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V+ae+1)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';U=U+2*ah+1-T;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V-ap)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V+ae+1)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';ah=af;ap=ae;Z=ad[ae]}if(ae==0){ag=ap-ae+1;U=an-af;T=af+1-ad[ae];aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V-ap)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V+ae)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';U=U+2*af+1-T;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V-ap)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+U+\"px;top:\"+(V+ae)+\"px;width:\"+T+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';ah=af;ap=ae;Z=ad[ae]}}else{if(af!=ah){ag=ap-ae;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(an-ah)+\"px;top:\"+(V-ap)+\"px;width:\"+(2*ah+1)+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(an-ah)+\"px;top:\"+(V+ae+1)+\"px;width:\"+(2*ah+1)+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';ah=af;ap=ae;Z=ad[ae]}if(ae==W||ae==0){ag=ap-ae+1;aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(an-af)+\"px;top:\"+(V-ap)+\"px;width:\"+(2*af+1)+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';aj[aj.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(an-af)+\"px;top:\"+(V+ae)+\"px;width:\"+(2*af+1)+\"px;height:\"+ag+\"px;background-color:\"+Y+'\"></DIV>';ah=af;ap=ae;Z=ad[ae]}}}ak.innerHTML=aj.join(\"\");return ak}function d(T,ae,X){var ac=Math.round(ae/2);var ab=Math.round(X/2);var af=T.x;var Y=T.y;xArray=new Array();xArrayI=new Array();var ad=0;var aa=ab;var U=ac*ac;var Z=ab*ab;xArray[aa]=ad;xArrayI[aa]=ad;var V;var W;while(Z*ad<U*aa){ad++;if((Z*ad*ad+U*(aa-0.5)*(aa-0.5)-U*Z)>=0){aa--}if(!xArray[aa]){xArray[aa]=ad}xArrayI[aa]=ad}while(aa!=0){aa--;if((Z*(ad+0.5)*(ad+0.5)+U*aa*aa-U*Z)<=0){ad++}xArray[aa]=ad;xArrayI[aa]=ad}return new Array(xArray,xArrayI)}function g(V,U,T){if(!V||!U||!T){return false}return N(V,U,2*T,2*T)}function v(V,U,T){if(!V||!U||!T){return false}return I(V,U,2*T,2*T)}function I(ae,ai,ad,ac){if(!ae||!ai||!ad||!ac){return false}ad*=F;ac*=F;var ab=m.appendChild(document.createElement(\"div\"));var aa=new Array();phCenter=M(ai);var aj=Math.round(ad/2);var ah=Math.round(ac/2);var af=phCenter.x;var T=phCenter.y;var U=ae.getHex();var X=0;var W=ah;var ak=aj*aj;var V=ah*ah;var Z,ag;Z=1;ag=W;while(V*X<ak*W){X++;if((V*X*X+ak*(W-0.5)*(W-0.5)-ak*V)>=0){W--}if(X==1&&W!=ag){aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;width:1px;height:1px;left:'+af+\"px;top:\"+(T+ag-1)+\"px;background-color:\"+U+'\"></DIV>';aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;width:1px;height:1px;left:'+af+\"px;top:\"+(T-ag)+\"px;background-color:\"+U+'\"></DIV>'}if(W!=ag){aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;height:1px;left:'+(af-X+1)+\"px;top:\"+(T-ag)+\"px;width:\"+(2*X-1)+\"px;background-color:\"+U+'\"></DIV>';aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;height:1px;left:'+(af-X+1)+\"px;top:\"+(T+ag)+\"px;width:\"+(2*X-1)+\"px;background-color:\"+U+'\"></DIV>';ag=W;Z=X}if(V*X>=ak*W){aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;height:1px;left:'+(af-X)+\"px;top:\"+(T-ag)+\"px;width:\"+(2*X+1)+\"px;background-color:\"+U+'\"></DIV>';aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;height:1px;left:'+(af-X)+\"px;top:\"+(T+ag)+\"px;width:\"+(2*X+1)+\"px;background-color:\"+U+'\"></DIV>'}}Z=X;ag=W;var Y=1;while(W!=0){W--;if((V*(X+0.5)*(X+0.5)+ak*W*W-ak*V)<=0){X++}if(X!=Z){Y=ag-W;aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(af-Z)+\"px;top:\"+(T-ag)+\"px;width:\"+(2*Z+1)+\"px;height:\"+Y+\"px;background-color:\"+U+'\"></DIV>';aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(af-Z)+\"px;top:\"+(T+W+1)+\"px;width:\"+(2*Z+1)+\"px;height:\"+Y+\"px;background-color:\"+U+'\"></DIV>';Z=X;ag=W}if(W==0){Y=ag-W+1;aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(af-Z)+\"px;top:\"+(T-ag)+\"px;width:\"+(2*X+1)+\"px;height:\"+Y+\"px;background-color:\"+U+'\"></DIV>';aa[aa.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+(af-Z)+\"px;top:\"+(T+W)+\"px;width:\"+(2*X+1)+\"px;height:\"+Y+\"px;background-color:\"+U+'\"></DIV>'}}ab.innerHTML=aa.join(\"\");return ab}function u(aE,U,T,W,af,ax){if(!aE||!U||!T||!W||af==null||ax==null){return false}T*=F;W*=F;if(ax==0){return}var aa=m.appendChild(document.createElement(\"div\"));var aK=new Array();phCenter=M(U);var al;if(af>360){al=af%360}else{al=af}var ab;if(ax>360){ab=ax%360}else{ab=ax}var aX;aX=parseFloat(al)+parseFloat(ab);if(aX>360){aX=aX%360}if(A==\"cartecian\"){al=360-al;aX=360-aX;var X;X=al;al=aX;aX=X}var am,a4,ak,a3;var ad=al*Math.PI/180;var a1=ab*Math.PI/180;var aP=aX*Math.PI/180;if((al<=45&&al>=0)||(al>=135&&al<=225)||(al>=315&&al<=360)){if(al>=90&&al<=270){a4=Math.round(phCenter.y-Math.tan(ad)*T/2);am=Math.round(phCenter.x-T/2)}else{a4=Math.round(phCenter.y+Math.tan(ad)*T/2);am=Math.round(phCenter.x+T/2)}}else{if(al>=0&&al<=180){am=Math.round(phCenter.x+(1/Math.tan(ad))*W/2);a4=Math.round(phCenter.y+W/2)}else{am=Math.round(phCenter.x-(1/Math.tan(ad))*W/2);a4=Math.round(phCenter.y-W/2)}}if((aX<=45&&aX>=0)||(aX>=135&&aX<=225)||(aX>=315&&aX<=360)){if(aX>=90&&aX<=270){a3=Math.round(phCenter.y-Math.tan(aP)*T/2);ak=Math.round(phCenter.x-T/2)}else{a3=Math.round(phCenter.y+Math.tan(aP)*T/2);ak=Math.round(phCenter.x+T/2)}}else{if(aX>=0&&aX<=180){ak=Math.round(phCenter.x+(1/Math.tan(aP))*W/2);a3=Math.round(phCenter.y+W/2)}else{ak=Math.round(phCenter.x-(1/Math.tan(aP))*W/2);a3=Math.round(phCenter.y-W/2)}}xDataArraySa=o(phCenter,new jsPoint(am,a4));xDataArrayEa=o(phCenter,new jsPoint(ak,a3));var aF=aE.getHex();var a0=Math.round(T/2);var aZ=Math.round(W/2);var aQ=phCenter.x;var aw=phCenter.y;var aO=0;var aN=aZ;var aR=a0*a0;var ay=aZ*aZ;var aJ,ap;var aU,ac,an,aS,V,ah,aA,az,Z,aM,Y,ao,aI,aT,aD,aL;var aW,av,au,at,ar,ae,aV,aB,ag,aH;var ai,aY,aG,aj;aJ=1;ap=aN;while(ay*aO<aR*aN){aO++;if((ay*aO*aO+aR*(aN-0.5)*(aN-0.5)-aR*ay)>=0){aN--}if(aO==1&&aN!=ap){aA=aw+ap-1;az=aw-ap;aW=1;av=aW;au=aW;at=aW;ar=aW;aU=aQ;if(al>=0&&al<180&&aX>=0&&aX<180){aq(true);if(aX<=al){aq(false)}}else{if(al>=180&&al<360&&aX>=180&&aX<=360){aq(false);if(aX<=al){aq(true)}}else{aq(true);aq(false)}}}else{if(aN!=ap){aA=aw+ap;az=aw-ap;aW=2*(aO-1)+1;av=aW;au=aW;at=aW;ar=aW;aU=aQ-aO+1;if(al>=0&&al<180&&aX>=0&&aX<180){aq(true);if(aX<=al){aq(false)}}else{if(al>=180&&al<360&&aX>=180&&aX<=360){aq(false);if(aX<=al){aq(true)}}else{aq(true);aq(false)}}ap=aN;aJ=aO}}if(ay*aO>=aR*aN){aA=aw+ap;az=aw-ap;aW=2*aO+1;av=aW;au=aW;at=aW;ar=aW;aU=aQ-aO;if(al>=0&&al<180&&aX>=0&&aX<180){aq(true);if(aX<=al){aq(false)}}else{if(al>=180&&al<360&&aX>=180&&aX<=360){aq(false);if(aX<=al){aq(true)}}else{aq(true);aq(false)}}}}aJ=aO;ap=aN;aH=1;aA=aw+aN;az=aw-aN;aW=2*aO+1;av=aW;au=aW;at=aW;ar=aW;aU=aQ-aO;if(al>=0&&al<180&&aX>=0&&aX<180){xDataArrayEa.pop();aC(true,true);if(aX<=al){aC(false,true)}}else{if(al>=180&&al<360&&aX>=180&&aX<=360){xDataArrayEa.pop();if(aN!=0){aC(false,true)}if(aX<=al){aC(true,true)}}else{if(al>=180&&al<360){xDataArraySa.pop()}else{xDataArrayEa.pop()}aC(true,true);if(aN!=0){aU=aQ-aO;aC(false,true)}}}while(aN!=0){aN--;if((ay*(aO+0.5)*(aO+0.5)+aR*aN*aN-aR*ay)<=0){aO++}aA=aw+aN;az=aw-aN;aW=2*aO+1;av=aW;au=aW;at=aW;ar=aW;aU=aQ-aO;if(al>=0&&al<180&&aX>=0&&aX<180){aC(true);if(aX<=al){aC(false)}}else{if(al>=180&&al<360&&aX>=180&&aX<=360){if(aN!=0){aC(false)}if(aX<=al){aC(true)}}else{aC(true);if(aN!=0){aU=aQ-aO;aC(false)}}}}aa.innerHTML=aK.join(\"\");return aa;function aC(ba,bc){var be;var a7,a7;var bb=aW;var a9=aW;var a8=false;var bd=false;if(ba){var a6=false;var a2=false;be=aA;a7=xDataArraySa;xDataArray2=xDataArrayEa;saDvar=al;eaDvar=aX}else{var a5=false;var bf=false;be=az;xDataArray2=xDataArraySa;a7=xDataArrayEa;saDvar=360-aX;eaDvar=360-al}if(eaDvar>saDvar){if(xDataArray2[be]&&aU+aW>=xDataArray2[be].xMin&&aU<=xDataArray2[be].xMin){aM=xDataArray2[be].xMin;if(a7[be]&&aU+aW>=a7[be].xMax+1&&aU<=a7[be].xMax+1){Z=a7[be].xMax+1;bb=Z-aM}else{bb=aU+aW-aM}aU=aM;a8=true}else{if(a7[be]&&aU+aW>=a7[be].xMax+1&&aU<=a7[be].xMax+1){Z=a7[be].xMax+1;bb=Z-aU;a8=true}else{if(eaDvar>90&&saDvar<90){a8=true}}}}else{if(a7[be]&&aU+aW>=a7[be].xMax+1&&aU<=a7[be].xMax+1){Z=a7[be].xMax+1;bb=Z-aU;a8=true}else{if(eaDvar<90&&saDvar<90){a8=true}}if(xDataArray2[be]&&aU+aW>=xDataArray2[be].xMin&&aU<=xDataArray2[be].xMin){aS=xDataArray2[be].xMin;a9=aW-xDataArray2[be].xMin+aU;bd=true}else{if(eaDvar>90&&saDvar>90){aS=aU;a9=aW;bd=true}}}if(ba){if(a8){a6=true}if(bd){a2=true}av=bb;at=a9}else{if(a8){a5=true}if(bd){bf=true}au=bb;ar=a9}if(al>=0&&al<180&&aX>=0&&aX<180&&al>aX){a5=true}else{if(al>=180&&al<360&&aX>=180&&aX<360&&al>aX){a6=true}}if(!aS){aS=\"\"}if(!aU){aU=\"\"}if(!bc){if(ba){if(aO!=aI||ac!=aU||V!=aS||av!=ae||at!=aB){aH=aD-aN;if(aG){if(V!=null){aK[aK.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+V+\"px;top:\"+(aA+1)+\"px;width:\"+aB+\"px;height:\"+aH+\"px;background-color:\"+aF+'\"></DIV>'}}if(ai){if(ac!=null){aK[aK.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+ac+\"px;top:\"+(aA+1)+\"px;width:\"+ae+\"px;height:\"+aH+\"px;background-color:\"+aF+'\"></DIV>'}}if(ai||aG){ac=aU;ai=a6;aG=a2;aI=aO;aD=aN;ae=av;aB=at;V=aS}}}else{if(aO!=aT||an!=aU||ah!=aS||au!=aV||ar!=ag){aH=aL-aN;if(aj){if(ah!=null){aK[aK.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+ah+\"px;top:\"+(az-aH)+\"px;width:\"+ag+\"px;height:\"+aH+\"px;background-color:\"+aF+'\"></DIV>'}}if(aY){if(an!=null){aK[aK.length]='<DIV style=\"position:absolute;overflow:hidden;left:'+an+\"px;top:\"+(az-aH)+\"px;width:\"+aV+\"px;height:\"+aH+\"px;background-color:\"+aF+'\"></DIV>'}}if(aY||aj){an=aU;aY=a5;aj=bf;aT=aO;aL=aN;aV=au;ag=ar;ah=aS}}}}if(bc){if(ba){ai=a6;aG=a2;if(ai){ac=aU}if(aG){V=aS}if(ai||aG){aD=aN;aI=aO}else{aD=0;aI=0}ae=av;aB=at}else{aY=a5;aj=bf;if(aY){an=aU}if(aj){ah=aS}if(aY||aj){aL=aN;aT=aO}else{aL=0;aT=0}aV=au;ag=ar}}if(!ba){aY=a5;aj=bf}else{ai=a6;aG=a2}if(aN==1&&!ba){aH=aL-aN+1;if(bf){aK[aK.length]='<DIV style=\"position:absolute;overflow:hidden;left:'