<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
    var theLanguage = parent.theLanguage;
    var pathPrefix = "../../"; // path to base directory
    function addText(x,y){return(theLanguage=="en")?x:y}
    

</script>
<script type="text/javascript" src = "../../globalScripts.js">
</script>
<script type="text/javascript" src = "../../utilsV4.js">
</script>
<script type="text/javascript" src = "../../SVGGrapher/SVGGraphV1_4.js"></script>
<script type="text/javascript">
//<![CDATA[


function getQuery(inSt) {
	if (typeof inSt != "undefined") {var st=inSt.indexOf("?");qSt=inSt.substring(st+1);}
	else qSt = window.location.search.substring(1);
	if (qSt=="") return([]);
	var qVars = qSt.split("&"), outArr=[];
	for (var i=0;i<qVars.length;i++) outArr[i] = qVars[i].split("=");
	return outArr;
}

function getQueryVar(varName,fromString) {
	// fromString is optional; wil be the current page if not suplied
	if (typeof fromString != "undefined")  var A=getQuery(fromString);
	else var A=getQuery();
	for (var i=0;i<A.length;i++) {if (A[i][0] == varName)  return A[i][1]}
	return(""); 
} //getQueryVariable
	
	
var theVersion=parseInt(getQueryVar("version"));
//alert(theVersion)
graphDocNameGiven = true;
var theDocObj=document;
var grapher1 = new grapher("grapher1",400, 200);
with(grapher1) {
				// tracing info
				tracing=true;
				traceStep=1;
				decPlacesX=0; // for displaying coords
				decPlacesY=0;
				// end of tracing info
				
    curvesColors = ["#E81225","#E81225","#EF181F","#EF181F","royalblue", "#A225A8", "green","#8469A7","#E85275","green","magenta","magenta"];
	clipMargins=[5,5,5,5]; // to allow for arrow-heads and xs on the edge
	curveWt = 1;
	gridWt = .5;
	axisWt=1;
	clickAccX=.2;
	clickAccY=parent.Q17Steps;

	decPlacesY=2;
	isPopup=false;
	popupURL="graphWindow.html"
	pointsPerCurve = 1000;

    nudgeRightyValues=.00;
	coordsColor ="black";
	gridColor = "silver";
	pointsColor = "magenta";
	backgroundColor = "white";
	surroundColor = "transparent";
	borderColor="teal";
	yGrid = "on";
	xGrid = "on";
	
	
	xAxis = "on";
	yAxis = "on";
	//xAxisPosn=window[2];
	//yAxisPosn=window[0];
	showScalex=true;
	showScaley=(theVersion==1);
	yAxis=(theVersion==1)?"on":"off";
	xValuesShown=(theVersion==1)?[0,2,3,4,5,6,7,8,9,10,11,12]:[0,1,2,3,4,5];
	xLabelFontSize=yLabelFontSize=12;
	
	xAxisLabel='x';
	yAxisLabel=(theVersion==1)?'y':'';
	xAxisLabelPosn='right';
	yAxisLabelPosn='top';
	xAxisLabelStyle="font-style:italic;font-size:18px"
	yAxisLabelStyle="font-style:italic;font-size:18px"
	edgeBuffer = 2;
	leftMargin=15;
	rightMargin=5;
	topMargin=5;
	bottomMargin=2;
	ifrMargin=20;
	window = (theVersion==1)?[0,14,0,0.2]:[-1,6,0,.5];
	xGridStep = 1;
	yGridStep = (theVersion==1)?.05:.1;

	arrowLength=20;
	if(theVersion==1) bars=[[[2,3,4,5,6,7,8,9,10,11,12], [1/36,1/18,1/12,1/9,5/36,1/6,5/36,1/9,1/12,1/18,1/36], .5, .5, [[200,0,255], "grey"] ,.2, .2]];
	
	else bars=[[[0,1,2,3,4,5], [.25,.25,.25,.25,.25,.25], .5, .5, [[255,0,100], "blue"] ,.2, .2]];
	
	//xCoords, yCoords, delta1, delta2, color, opacity, border opacity
	draggableBars = (theVersion==1)?1:1;
	barLabels="y";
	barLabelFormat=(theVersion==1)?"fraction":"decimal";
	//plottedPointsX=[,120];
	//plottedPointsY=[,120*36900*Math.pow(0.968,120)];
	//plottedCurves=[["(x-2)^2/2-1",-2,4,"arrow","circle"],["-(x-8)^2/5+6",4,8,"dot","arrow"]]
	//alert(plottedCurves[0])
	tracing = 1;
	traceColor = "firebrick";

	}
xHeight = 4;
dotRadius=4;
var deltaYShift=(SAFJS)? 2:0;




function initialActions() {
setUpGraph(grapher1);
var graphDoc = getDoc (grapher1);
var graphElt= graphDoc.getElementById("myGraph");

graphElt.setAttributeNS(null,"viewBox"," 0 0 " + grapher1.totWdth + " " + grapher1.totHt);


putBars(grapher1);


//function putText(theGraph, inStr, theStyle, theFontSize,  x1,y1, offsetX, offsetY, areScreenCoords, overrideBorders,bgColor,centering,isForAxes,isTex,heightFactor)

//putText(grapher1, "a", "font-style:italic;font-size:18px", 12,  4,0,   -5, -12, false, true,"",true,false,false,2)


//
//putDot(theGraph, x1,y1, color,isOpen, radius,fillColor) 
// plotPoints(grapher1, "x", false, '')
//showSVG(grapher1)

}





// NOTE
// onmousedown="if (event.preventDefault) event.preventDefault()"
// the above prevents the SVG image from being dragged around in Firefox and some other browsers
//]]>
</script>
</head>
<body onload="initialActions()">
<div id = "scratch" style="font-size:5px"></div><span id = "ruler"></span>
<div id="grapher1Div" style="margin-top:0px;margin-bottom:0px" onmouseover="showCoords(event,this,grapher1,false)" onmousemove="showCoords(event,this,grapher1,false);dealWithMouseMoveBars(event,this,grapher1,false);" onmousedown=" dealWithMouseDownBars(event,this,grapher1)" onmouseup="dealWithMouseUpBars(event,this,grapher1,false)" >
<svg xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink" 
  width="400" height="200" id="myGraph">
<defs id="graphdefs_grapher1">
<marker id="arrowHead_grapher1" viewBox="0 0 10 10" refX="10" refY="5" 
    markerUnits="strokeWidth" orient="auto"
    markerWidth="40" markerHeight="20">
    <polyline id="myArr_grapher1" points="0,0 10,5 0,10 3,6 0,5 3,4" />
</marker>
<clipPath id="rectClip_grapher1">
    <rect id="cliprect_grapher1" width="250" height="150" x="25" y="25" fill="white" />
    <!-- The above is adjusted by the js in SVGGraph --> 
</clipPath>
</defs>

<g id="firstGroup_grapher1">
	<rect id="gSurround_grapher1" width="400" height="200" x="0" y="0" fill="lightblue"  style="cursor:crosshair"/>
	<rect id="grid_grapher1" width="350" height="150" x="25" y="25" fill="white"  style="cursor:crosshair"/>
</g>
<g id="dots_grapher1">
</g>
<g id="gridGroup_grapher1">
</g>
<g id="curves_grapher1">
</g>

<g id="barlabels_grapher1">
</g>
<g id="bars_grapher1">
</g>

<g id="squares_grapher1">
</g>
<g id="xs_grapher1">
</g>
<g id="tracepoint_grapher1">
</g>
<g id="lines_grapher1">
</g>
<g id="arcs_grapher1">
</g>
<g id="textGroup_grapher1">
</g>

</svg>
</div>






</body>
</html>
