From: <Saved by Windows Internet Explorer 7>
Subject: Reality Check Results for Copy of Parent Survey
Date: Thu, 3 Mar 2011 09:58:12 -0500
MIME-Version: 1.0
Content-Type: multipart/related;
	type="text/html";
	boundary="----=_NextPart_000_0035_01CBD989.8248FF00"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994

This is a multi-part message in MIME format.

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.esrealitycheck.com/rc/results-2010-06.asp?in=12081&ih=T&cp=1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Reality Check Results for Copy of Parent =
Survey</TITLE>
<SCRIPT =
src=3D"http://www.esrealitycheck.com/rc/prototype-1.6.0.2.js"></SCRIPT>
<!--[if IE]>
<SCRIPT language=3Djavascript =
src=3D"http://www.esrealitycheck.com/rc/excanvas.js"=20
type=3Dtext/javascript></SCRIPT>
<![endif]-->
<SCRIPT language=3Djavascript =
src=3D"http://www.esrealitycheck.com/rc/ProtoChart.js"=20
type=3Dtext/javascript></SCRIPT>
<!-- <script language=3D"javascript" type=3D"text/javascript" =
src=3D"ProtoType.js"></script> -->
<SCRIPT>
<!--
	var showCompact =3D false;
// -->
</SCRIPT>

<SCRIPT type=3Dtext/javascript>
<!--
	// fill preloadList with the list of image files to preload
	// call preloadImages in onLoad of body
	document.preloadList =3D new Array();
=09
	function findObj(n,d) { // name n in document d
		var p,i,x;
		if (!d)
			d =3D document;
		if ((p=3Dn.indexOf("?"))>0 && parent.frames.length) {
					// has ? in name and has frames
					// then part after ? is the frame name to look at
			d =3D parent.frames[n.substring(p+1)].document;
					// part before ? is the object name
			n =3D n.substring(0,p);
		}
		if (!(x=3Dd[n]) && d.all) // look for object by name
			x =3D d.all[n];			// if not there, we'll search forms and layers
		for (i=3D0; !x && i<d.forms.length; ++i)
			x=3Dd.forms[i][n];
		for (i=3D0; !x && d.layers && i<d.layers.length; ++i)
			x =3D findObj(n.layers[i].document);
		return x;
	}
=09
	function swapImage() {
			// arguments:	0=3Dimage object name
			//					1=3D?
			//					2=3Dalternate image file
			//					3=3D?
		var	i,=20
				j=3D0,=20
				x,=20
				args=3DswapImage.arguments;
		document.sr =3D new Array;
		for (i=3D0; i<(args.length-2); i+=3D3)
			if ((x =3D findObj(args[i])) !=3D null) {
				document.sr[j++] =3D x;	// save list of image objects to restore
				if (!x.oSrc)
					x.oSrc =3D x.src;		// save old source
				x.src =3D args[i+2];
			}
	}
=09
	function swapImageRestore() {
		var i, x, a=3Ddocument.sr;
		for (i=3D0; a && i<a.length && (x=3Da[i]) && x.oSrc; i++)
			x.src =3D x.oSrc;
	}
=09
	function preloadImages() {

		var d=3Ddocument;
		if (d.images) {
			if (!d.preload)
				d.preload =3D new Array(); // some place to store the preloaded =
images
			var i, j=3Dd.preload.length;
			for (i=3D0; i < d.preloadList.length; ++i)
				if (d.preloadList[i].indexOf("#") !=3D 0) { // doesn't start with #
//				if ((x=3DfindObj(d.preloadList[i].indexOf("#")!=3D0) {
					d.preload[j] =3D new Image;
					d.preload[j++].src =3D d.preloadList[i];
//				}
			}
		}

	}
=09
	function notYet() {
		alert("That function is not yet available.");
	}

	function setButton(n,img) {

				n.src =3D img.src;

	}
=09
	function replace(s, fromChar, toChar) {
		var pos;
//alert("replace: S=3D" + s);
		pos =3D s.indexOf(fromChar);
		if (pos =3D=3D -1)
			return s;
		return s.substring(0,pos) + toChar +=20
					replace(s.substring(pos+fromChar.length,s.length),
								fromChar,toChar);
	}

=09
	function myencode(s) {
		s =3D replace(s,"~","~~");
		s =3D replace(s,",","~c");
		s =3D escape(s);
		return s; //replace(s,",","%2c")
	}
=09
	function openHelp(webID,toolID,pageCode,topicCode,url,top) {
		var helpURL;
//		window.open("/help/pageHelp.asp?webID=3D" + webID +"&pageCode=3D"+ =
pageCode +"&url=3D"+ url, =
"_blank","toolbar=3Dyes,location=3Dyes,directories=3Dyes,status=3Dyes,men=
ubar=3Dyes,scrollbars=3Dyes,resizable=3Dyes,width=3D200,height=3D200");
		helpURL =3D "/help/pageHelp.asp?webID=3D" + webID +"&toolID=3D" + =
toolID + "&pageCode=3D"+ pageCode +"&topicCode=3D" + topicCode;
//		if (top) {
////			helpURL =3D helpURL + "&url=3D"+ escape(window.top.location) + =
"&urlname=3D" + escape(window.top.document.title);
//			helpURL =3D helpURL + "&url=3D"+ window.top.location + =
"&urlname=3D" + escape(window.top.document.title);
//		} else {
			helpURL =3D helpURL + "&url=3D"+ escape(window.top.location) + =
"&urlname=3D" + escape(document.title);
//		}
	=09
		if (false) { // show help in separate window
			window.open(helpURL, =
"_blank","toolbar=3Dno,location=3Dno,directories=3Dno,status=3Dno,menubar=
=3Dyes,scrollbars=3Dyes,resizable=3Dyes,width=3D500,height=3D400");
		} else {
			if (top) {
				window.top.location =3D helpURL;
			} else {
				window.location =3D helpURL;
			}
		}
	}


////////////////// Cookies

	function getCookieVal (offset) {
		var endstr =3D document.cookie.indexOf (";", offset);
		if (endstr =3D=3D -1)
			endstr =3D document.cookie.length;
		return unescape(document.cookie.substring(offset, endstr));
	}

	function GetCookie (name) {
		var arg =3D name + "=3D";
		var alen =3D arg.length;
		var clen =3D document.cookie.length;
		var i =3D 0;
		while (i < clen) {
			var j =3D i + alen;
			if (document.cookie.substring(i, j) =3D=3D arg)
				return getCookieVal (j);
			i =3D document.cookie.indexOf(" ", i) + 1;
			if (i =3D=3D 0) break;=20
		}
		return null;
	} =20

	function SetCookie (name, value) {
		var argv =3D SetCookie.arguments;
		var argc =3D SetCookie.arguments.length;
		var expires =3D (argc > 2) ? argv[2] : null;
		var path =3D (argc > 3) ? argv[3] : null;
		var domain =3D (argc > 4) ? argv[4] : null;
		var secure =3D (argc > 5) ? argv[5] : false;
		document.cookie =3D name + "=3D" + escape (value) +
			((expires =3D=3D null) ? "" : ("; expires=3D" + =
expires.toGMTString())) +
			((path =3D=3D null) ? "" : ("; path=3D" + path)) +
			((domain =3D=3D null) ? "" : ("; domain=3D" + domain)) +
			((secure =3D=3D true) ? "; secure" : "");
	}


		// for RC
		function showInfo(instrID) {
			window.open("instrInfo.asp?webID=3D684&instrID=3D" + instrID,
				"InstrumentInformation",
				=
"resizable=3Dyes,toolbar=3Dno,location=3Dno,directoris=3Dno,status=3Dno,m=
enubar=3Dno,scrollbars=3Dyes,width=3D550,height=3D350," +
					"left=3D" + (window.screenLeft + 30) + ",top=3D" + =
(window.screenTop + 30));
		}
//-->
</SCRIPT>

<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<SCRIPT type=3Dtext/javascript>
	<!--
		var isInHelpFrames =3D false;
	// -->
	</SCRIPT>
<LINK href=3D"http://www.esrealitycheck.com/rc/rc.css" type=3Dtext/css=20
rel=3Dstylesheet>
<SCRIPT src=3D"http://www.esrealitycheck.com/lib/ajax_lib.js"></SCRIPT>

<SCRIPT language=3Djavascript>
// <!--
	var nOpenAjaxRequests =3D 0;
	function showAjaxRequest(s) {
		document.form1.ajaxRequests.value +=3D "\r\n" + s;
	}
=09
	function sentAjaxRequest() {
		if (++nOpenAjaxRequests =3D=3D 1) {
			var fld =3D document.getElementById("loadingResults");
			if (fld)
				fld.style.display =3D "block";
		}
	}
=09
	function rcvdAjaxRequest() {
		if (--nOpenAjaxRequests =3D=3D 0) {
			var fld =3D document.getElementById("loadingResults");
			if (fld)
				fld.style.display =3D "none";
		}
	}

	var nErrors =3D 0;
=09
	function ajaxError(url, s, which) {
		if (s.responseText !=3D null) {
			var t =3D s.responseText.substr(1,300);
			if (t.indexOf("The operation timed out")>0) {
				t =3D "The response from the server has taken too long. Please try =
again. (for " + url + ")";
			} else {
				t =3D "Error: '" + t + "' in " + which + " (for " + url + ")";
			}
			if (++nErrors <=3D 1) {
				alert(t);
			} if (++nErrors =3D=3D 2) {
				alert("Additional errors will not be reported.");
			}
		}
	}

	function showHide(catID,itemID,itemN,hide) {
		var fld =3D document.getElementById("include_" + itemID);
		if (fld)
			fld.value =3D hide;
		saveAnalysis(catID,itemID,itemN);
		document.location.reload();
	}
=09
		// called when any of the following change:
		//		DisagItem selection
		//		Include checkbox
		//		Analysis text
		//		Rotate
		//		Graph type
	function saveAnalysis(catID,itemID, itemN) {
		var fld =3D document.getElementById("status_" + itemN);
		if (fld)
			fld.innerHTML =3D "saving...";
		var hidden, graphType, graphOptions, comments, disagItemID;
		var ck =3D document.getElementById("include_" + itemID);
		if (ck)
			hidden =3D ck.value;
		else
			hidden =3D false;
/*		if (ck.checked)
			hidden =3D 0;
		else
			hidden =3D 1;*/
		graphOptions =3D getFldValue("e_" + itemN + "_format",0);
		if (graphOptions =3D=3D "v")
			graphOptions =3D 1;
		else
			graphOptions =3D 0;
		graphType =3D getFldValue("e_" + itemN + "_graphType",1);
		if (graphType=3D=3D"pie") {
			graphType =3D 3;
		} else if (graphType =3D=3D "line") {
			graphType =3D 5;
		} else if (graphType =3D=3D "lineNF") {
			graphType =3D 6;
		} else {
			graphType =3D 1;
		}
		disagItemID =3D getFldValue("e_" + itemN + "_disagItemID",0);
		comments =3D getFldValue("analysis_" + itemID,"");
		var url =3D "save_report_item.asp";
		showAjaxRequest(url);
		sentAjaxRequest();
		AjaxRequest.get(
				{
					'url': url,
					'onSuccess': function(req){analysisSaved(req);},
					'onError': function(req){ajaxError(url, req, "graph");},
					'a': 'save',
					'in': 12081,
					'itN': itemN,				// so we know which 'status' field to clear
					'id': itemID,
					'cn': catID,				// category #
					'hidden': hidden,			// 1 for hidden
					'graphType': graphType,		// 1=3Dbar, 3=3Dpie, 5=3Dline
					'graphOptions': graphOptions,	// 1=3Dvertical, 0=3Dhorizontal
					'disagItemID': disagItemID,	// disagItemID or 0
					'text': comments
				}
			);
	}
=09
	function analysisSaved(req) {
		var xmldoc =3D req.responseXML;
		var itemN =3D =
xmldoc.getElementsByTagName('itemN')[0].firstChild.nodeValue;

		rcvdAjaxRequest();
		var fld =3D document.getElementById("status_" + itemN);
		if (fld)
			fld.innerHTML =3D "";
	}
=09
/*    function dataAreHere(req) {
		var h =3D "";
alert("dataAreHere Received:" + req.responseText);
return;
		var xmldoc =3D req.responseXML;
		rcvdAjaxRequest();
		var nodes =3D xmldoc.getElementsByTagName('item');
		var itemID =3D =
nodes[0].getElementsByTagName('itemID')[0].firstChild.nodeValue;
		var tmpRoot =3D nodes[0].getElementsByTagName('root');
		if (!tmpRoot) {
			alert("Blank root");
		}
		var root =3D =
nodes[0].getElementsByTagName('root')[0].firstChild.nodeValue;
		var xOpts =3D nodes[0].getElementsByTagName('option');
		var xGroups =3D nodes[0].getElementsByTagName('group');
		var vals; // =3D nodes[0].getElementsByTagName('optionValue');
	=09
		var groupNames	=3D Array();
		var	groupValues	=3D Array();
		var options 	=3D Array();
		var optionValues=3D Array();
		var means		=3D Array();
		var stddevs		=3D Array();
		var sums		=3D Array();
		var maxValue =3D 0;

		for (var i=3D0; i<xOpts.length; ++i) {
			options[i] =3D xOpts[i].firstChild.nodeValue;
		}
		for (i=3D0; i<xGroups.length; ++i) {
			groupNames[i] =3D =
xGroups[i].getElementsByTagName('groupLabel')[0].firstChild.nodeValue;
		}
		for (i =3D 0; i < groupNames.length; ++i) {
			sums[i] =3D 0;
			optionValues =3D Array();	// empty array to start with
			vals =3D xGroups[i].getElementsByTagName('optionValue');
			for (var j=3D0; j<vals.length; ++j) {
				optionValues[j] =3D "";
				if (vals[j])
					if (vals[j].firstChild) {
						optionValues[j] =3D vals[j].firstChild.nodeValue;
						sums[i] +=3D parseInt(optionValues[j]);
					}
				if (parseInt(optionValues[j])>maxValue)
					maxValue =3D parseInt(optionValues[j]);
			}
			groupValues[i] =3D optionValues;
			means[i] =3D =
xGroups[i].getElementsByTagName('mean')[0].firstChild.nodeValue;
			stddevs[i] =3D =
xGroups[i].getElementsByTagName('stddev')[0].firstChild.nodeValue;
		}
	=09

			var tmp =3D document.getElementById("itemAverage_" + itemID);
			if (tmp) {// && xOpts.length>1) {
//				var w =3D 5+Math.round(140 * ((means[0]-1)/(xOpts.length-1)));
//alert("Mean=3D" + means[0] + ", options=3D" + xOpts.length + ", =
width=3D" + w);
//				if (w>=3D2) w -=3D 2;
//				h =3D "<img src=3Dblank.gif height=3D15 width=3D" + w + "><img =
src=3Dbar.gif>";
//				tmp.innerHTML =3D h;
				tmp.innerHTML =3D Math.round(means[0]*100)/100;
			}

			if (eval("document.form1.item_" + itemID + "_hasGraph.value")=3D=3D0) =
{	// just show text
				h =3D "<ul>"; // <p class=3DquestionText>" + root + "</p>
				for (i=3D0; i<groupNames.length; ++i) {
					h +=3D "<li ><span class=3DquestionText>" + groupNames[i] + =
"</span><ul>";
					optionValues =3D groupValues[i];
					for (j=3D0; j < optionValues.length; ++j) {
						var p =3D optionValues[j].split("|");
						for (k=3D0; k < p.length; ++k) {
							h +=3D "<li >" + p[k] + "</li>";
						}
					}
					h +=3D "</ul></li>";
				}
				h +=3D "</ul>";
			} else {
				var vertName =3D "item_" + itemID + "_vertical";
				var vertical =3D eval("document.form1." + vertName);
				var isDisag =3D true;
				if (groupNames.length > 0) {
					isDisag =3D (groupNames[0] !=3D "All respondents");
				}

				if (vertical.value =3D=3D 0) {
					h =3D "<table border=3D1 width=3D100% ><tr>";
					if (isDisag)
						h +=3D "<td class=3DquestionText></td>";
					for (var i=3D0; i<xOpts.length; ++i) {
						h +=3D "<td class=3DoptionText>" + (i+1) + ". " + options[i] + =
"</td>";
					}
					h +=3D "<td class=3DoptionText align=3Dcenter>Mean</td><td =
class=3DoptionText align=3Dcenter>Std Dev</td>";
					h +=3D "</tr>";
					for (i=3D0; i<groupNames.length; ++i) {
						h +=3D "<tr>"
						if (i>0 || isDisag)
							h +=3D "<td class=3DquestionText>" + groupNames[i] + "</td>";
						optionValues =3D groupValues[i];
						for (j=3D0; j < vals.length; ++j) {
							h +=3D "<td class=3DvalueText>" + optionValues[j];
							h +=3D "<br /><font size=3D-2 color=3D0x404040>" + (sums[i]>0 ? =
(FormatNumber(100*(optionValues[j]/sums[i]),1,false,false,false)+"%") : =
"--") + "</font>";
							h +=3D "</td>";
						}
						h +=3D "<td class=3DvalueText>" + Math.round(means[i]*10)/10 + =
"</td>";
						h +=3D "<td class=3DvalueText>" + Math.round(stddevs[i]*100)/100 + =
"</td>";
						h +=3D "</tr>";
					}
					h +=3D "</table>";
				} else {
					h =3D "<table border=3D1 width=3D100% >";
					if (isDisag) {
						h +=3D "<tr><td class=3DquestionText></td>";
						for (i=3D0; i<groupNames.length; ++i) {
							h +=3D "<td>" + groupNames[i] + "</td>";
						}
						h +=3D "</tr>";
					}
					for (var i=3D0; i<xOpts.length; ++i) {
						h +=3D "<tr>";
						h +=3D "<td class=3DoptionText>" + (i+1) + ". " + options[i] + =
"</td>";
						for (j=3D0; j < groupNames.length; ++j) {
							optionValues =3D groupValues[j];
							h +=3D "<td class=3DvalueText>" + optionValues[i];
							h +=3D "<br /><font size=3D-2 color=3D0x404040>" + (sums[j]>0 ? =
(FormatNumber(100*(optionValues[i]/sums[j]),1,false,false,false)+"%") : =
"--") + "</font>";
							h +=3D "</td>";
						}
						h +=3D "</tr>";
					}
					h +=3D "<tr><td class=3DoptionText align=3Dcenter>Mean</td>";
					for (i=3D0; i<groupNames.length; ++i) {
						h +=3D "<td class=3DvalueText>" + Math.round(means[i]*10)/10 + =
"</td>";
					}
					h +=3D "</tr>";
					h +=3D "<tr><td class=3DoptionText align=3Dcenter>Std Dev</td>";
					for (i=3D0; i<groupNames.length; ++i) {
						h +=3D "<td class=3DvalueText>" + Math.round(stddevs[i]*100)/100 + =
"</td>";
					}
					h +=3D "</tr>";
=09
					h +=3D "</table>";
				}
			}
			var tmp;
			tmp =3D document.getElementById("QueData_" + itemID);
			if (tmp)
				tmp.innerHTML =3D h;

    }
*/
    function itemOptionsAreHere(req) {
		rcvdAjaxRequest();

		if (true) {		// JSON
			var json	=3D eval("(" + req.responseText + ")");
			var entryN	=3D json["entryN"];
			var text	=3D json["text"];
			var optVals	=3D json["optValues"];
			var optNames=3D json["optNames"];
			setOptionsForEntryN(entryN, optNames, optVals);
			if (parseInt(entryN) =3D=3D -1) {
				for (var i =3D 0; i < document.form1.elements.length; ++i) {
					var n =3D document.form1.elements[i].name;
					if (n.substring(n.length-10) =3D=3D "_filterSel") {
						var entryN =3D n.substring(2, n.length-10);
						if (entryN !=3D "all") {
							setOptionsForEntryN(entryN, optNames, optVals);
						}
					}
				}
			}
		} else {
/*
			var h =3D "";
			var xmldoc =3D req.responseXML;
			var entryN=3D =
xmldoc.getElementsByTagName('entryN')[0].firstChild.nodeValue;
			var text =3D =
xmldoc.getElementsByTagName('text')[0].firstChild.nodeValue;
			var xOpts =3D xmldoc.getElementsByTagName('option');
			var optVals =3D xmldoc.getElementsByTagName('optValue');
			var optTxts =3D xmldoc.getElementsByTagName('optText');
		=09
			setOptionsForEntryN(entryN, xOpts, optTxts, optVals);
	//alert("Changing filter for " + entryN);
			if (parseInt(entryN) =3D=3D -1) {
	//alert("Change filter for all");
				for (var i =3D 0; i < document.form1.elements.length; ++i) {
					var n =3D document.form1.elements[i].name;
					if (n.substring(n.length-10) =3D=3D "_filterSel") {
						var entryN =3D n.substring(2, n.length-10);
						if (entryN !=3D "all") {
	//alert("Change filter for " + entryN);
							setOptionsForEntryN(entryN, xOpts, optTxts, optVals);
						}
					}
				}
			}
*/
		}=09
	}
	function setOptionsForEntryN(entryN, optNames, optValues) {
		var fld;
		if (parseInt(entryN) =3D=3D -1) {
			fld =3D document.getElementById("e_all_filterValSel");
		} else {
			fld =3D document.getElementById("e_" + entryN + "_filterValSel");
		}

		if (fld)
			for (var i=3D0; i<optNames.length; ++i) {
				fld.options[i+1] =3D new Option(optNames[i], optValues[i]);
			}
    }

    function entryGraphIsHere(req) {
		rcvdAjaxRequest();
		if (true) {	// do JSON
			var json =3D eval("(" + req.responseText + ")");
			var entryN	=3D json['entryN'];
			var itemID	=3D json['itemID'];
			var imgFld	=3D getEntryFld(entryN, "img");
			var url		=3D json['url'];
			if (url.length>0) {
				if (imgFld) imgFld.src =3D url;
			} else {
				if (imgFld) imgFld.src =3D "images/unavailable.gif";
				var msg =3D json['msg'];
				alert(msg);
			}
		} else {
/*			var xmldoc =3D req.responseXML;
			if (!xmldoc) {
				alert("No XML in response. Try again.");
			} else {
				var nodes =3D xmldoc.getElementsByTagName('item');
				var entryN =3D =
xmldoc.getElementsByTagName('entryN')[0].firstChild.nodeValue;
				var itemID =3D =
nodes[0].getElementsByTagName('itemID')[0].firstChild.nodeValue;
				var urlTag =3D nodes[0].getElementsByTagName('url');
				var imgFld =3D getEntryFld(entryN, "img");
				if (urlTag.length>0) {
					var url =3D urlTag[0].firstChild.nodeValue;
					if (imgFld) imgFld.src =3D url;
				} else {
					var msg =3D =
nodes[0].getElementsByTagName('msg')[0].firstChild.nodeValue;
					if (imgFld) imgFld.src =3D "images/unavailable.gif";
					alert(msg);
				}
			}
*/
		}
    }

	function makeGraph(groupLabels, options, optionValues, avg, vertical, =
obj) {
		if (showCompact)
			return makeCompactGraph(options.length, avg);
		else {
//			return makeFullGraph(groupLabels, options, optionValues, avg, =
vertical, obj);
			makeBigGraph(groupLabels, options, optionValues, avg, vertical, obj);
			return "";
		}
	}

	function computeDivisionSize(maxValue) {
		var options =3D [1,2,5,10,25,50,100,250,500,1000];
			// see if that division size gives no more than 10 lines
		for (var i =3D 0; i < options.length; ++i) {
			var t =3D maxValue / options[i];
			if (t < 10)	// if so, then use that division size
				return options[i];
		}
		return options[options.length-1];	// No more than 1000 per division!
	}
=09
	var data =3D [];	// 2 dimensional array

	function makeBigGraph(groupLabels, options, optionValues, avg, =
vertical, obj) {
		var nGroups =3D groupLabels.length;
		var nOptions =3D options.length;
		var groupN, optionN;

		var parts =3D obj.id.split("_");
		var graphType =3D getFldValue("e_" + parts[1] + "_graphType",1);
				// pie, line, bar

		obj.style.height =3D "" + (nGroups > 5 ? 400 : 250) + "px";
		obj.style.width =3D "" + (nOptions > 10 ? 800 : 600) + "px";
		data =3D [];
		if (graphType =3D=3D "pie") {
			groupN =3D 0;
			var parts =3D optionValues[groupN].split("|")
			for (optionN =3D 0; optionN < nOptions; ++optionN) {
				data[optionN] =3D [];
				if (optionN >=3D parts.length)
					data[optionN].push([0, 0]);
				else
					data[optionN].push([0, parseInt(parts[optionN])]);
			}
			var chartCmd =3D "new Proto.Chart($('" + obj.id + "'), [";
			for (optionN =3D 0; optionN < options.length; ++optionN) {
				if (optionN > 0) chartCmd +=3D ",";
				chartCmd +=3D "{ data: data[" + optionN + "], label: \"" + =
options[optionN] + "\"}";
			}
		} else if (graphType =3D=3D "line" || graphType =3D=3D "lineNF") {
			for (groupN =3D 0; groupN < nGroups; ++groupN) {
				data[groupN] =3D [];
				var parts =3D optionValues[groupN].split("|")
				for (optionN =3D 0; optionN < nOptions; ++optionN) {
					if (optionN >=3D parts.length)
						data[groupN].push([optionN+1, 0]);
					else
						data[groupN].push([optionN+1, parseInt(parts[optionN])]);
				}
			}
			var chartCmd =3D "new Proto.Chart($('" + obj.id + "'), [";
			for (groupN =3D 0; groupN < nGroups; ++groupN) {
				if (groupN > 0) chartCmd +=3D ",";
				chartCmd +=3D "{ data: data[" + groupN + "], label: \"" + =
groupLabels[groupN] + "\"}";
			}
		} else { // bar is default
			for (groupN =3D 0; groupN < nGroups; ++groupN) {
				data[groupN] =3D [];
				var parts =3D optionValues[groupN].split("|")
				for (optionN =3D 0; optionN < nOptions; ++optionN) {
					if (optionN >=3D parts.length)
						data[groupN].push([optionN+1, 0]);
					else
						data[groupN].push([optionN+1, parseInt(parts[optionN])]);
				}
			}
			var chartCmd =3D "new Proto.Chart($('" + obj.id + "'), [";
			for (groupN =3D 0; groupN < nGroups; ++groupN) {
				if (groupN > 0) chartCmd +=3D ",";
				chartCmd +=3D "{ data: data[" + groupN + "], label: \"" + =
groupLabels[groupN] + "\"}";
			}
		}

		chartCmd +=3D "],";
		if (graphType =3D=3D "pie") {
			chartCmd +=3D "{pies: {show: true, autoScale: true}," +
					"legend: {show: true}" +	// never disaggregate, so never show =
legend
					"});";
		} else if (graphType =3D=3D "line" || graphType =3D=3D "lineNF") {
			chartCmd +=3D "{lines: {show: true, autoScale: true, fill:" + =
(graphType =3D=3D "lineNF" ? "false" : "true") + "}," +
					"colors: [\"#ff0000\", \"#00ff00\", \"#0000ff\", \"#ffff00\", =
\"#ff00ff\", \"#00ffff\"], " +
					"legend: {show: " + (nGroups > 1 ? "true" : "false" ) + "}," +
					"yaxis: {min:0}, " +
					"xaxis: {min:0.5, " +
							"max:" + (nOptions+.5) + "," +
							"ticks: [ [0, \"\"],";
			for (optionN =3D 0; optionN < nOptions; ++optionN) {
				chartCmd +=3D "[" + (optionN+1) + ", \"" + =
cropOption(options[optionN], nOptions) + "\"],";
			}
			chartCmd +=3D "[" + (optionN+1) + ",\"\"]]}});";
		} else {
			chartCmd +=3D "{bars: {show: true, autoScale: true}," +
					"colors: [\"#ff0000\", \"#00ff00\", \"#0000ff\", \"#ffff00\", =
\"#ff00ff\", \"#00ffff\"], " +
					"legend: {show: " + (nGroups > 1 ? "true" : "false" ) + "}," +
					"yaxis: {min:0}, " +
					"xaxis: {min:0.5, " +
							"max:" + (nOptions+.5) + "," +
							"ticks: [ [0, \"\"],";
			for (optionN =3D 0; optionN < nOptions; ++optionN) {
				chartCmd +=3D "[" + (optionN+1) + ", \"" + =
cropOption(options[optionN], nOptions) + "\"],";
			}
			chartCmd +=3D "[" + (optionN+1) + ",\"\"]]}});";
		}
		eval(chartCmd);
	}


	function cropOption(s, nOptions) {
		var nChar =3D Math.max(5, Math.round(100/nOptions));	// smallest is 5, =
or split up the # of options
		if (s.length > nChar)
			return s.substring(0, nChar-1) + "...";
		return s;
	}
=09
	function makeCompactGraph(nGroups, avg) {
		var h =3D " ";
		if (nGroups =3D=3D 0) {
			h =3D "n/a";
		} else {
			var left;
				// bar for first & last group
			h +=3D "<div =
style=3D'position:absolute;top:0px;left:1px;width:1px;height:15px'><img =
src=3D'/img/graybar.gif'></div>";
			h +=3D "<div =
style=3D'position:absolute;top:0px;right:1px;width:1px;height:15px'><img =
src=3D'/img/graybar.gif'></div>";
			var w =3D (150-4) / (nGroups-1);
				// show group dividers
			for (var g =3D 1; g < nGroups-1; ++g) {
				left =3D 2 + Math.round(w * g);
				h +=3D "<div style=3D'position:absolute;top:0px;left:" + left + =
"px;width:1px;height:15px'><img src=3D'/img/graybar.gif'></div>";
			}
				// show current value
			left =3D 2 + Math.round(w * (avg-1));
//			alert("Left=3D" + left + " for # groups=3D" + nGroups + " and =
avg=3D" + avg);
			h +=3D "<div style=3D'position:absolute;top:0px;left:" + left + =
"px;width:2px;height:15px'><img src=3D'/img/bluebar.gif'></div>";
		}
		return h;
	}
=09
    function entryDataAreHere(req) {
		var h =3D "";
		rcvdAjaxRequest();

			var json	=3D eval("(" + req.responseText + ")");
			var entryN	=3D parseInt(json['entryN']);
			var itemID	=3D json['itemID'];

			var groupLabels	=3D Array();
			var	groupValues	=3D Array();
			var optionValues=3D Array();
			var options		=3D Array();
			var means		=3D Array();
			var stddevs		=3D Array();
			var sums		=3D Array();
			var maxValue =3D 0;

			groupLabels		=3D json['groupLabels'];	// for disaggregation
//			groupValues 	=3D json['groupValues'];
			options		 	=3D json['options'];		// for multiple choice
			optionValues 	=3D json['optionValues'];	// group 1 counts (| =
separated), group 2, group 3, ...
			stats			=3D json['stats'];		// group 1 mean, group 1 stddev, group 2 =
mean, group 2 stddev
		=09
			// compute sum and max over all
			// load means and stddevs arrays
			for (i =3D 0; i < groupLabels.length; ++i) {
				sums[i] =3D 0;
//				optionValues =3D Array();	// empty array to start with
				vals =3D optionValues[i].split("|")
				for (var j=3D0; j<vals.length; ++j) {
					sums[i] +=3D parseInt(vals[j]);
					if (parseInt(vals[j])>maxValue)
						maxValue =3D parseInt(vals[j]);
				}
//				groupValues[i] =3D optionValues;
				means[i] =3D stats[i*2];
				stddevs[i] =3D stats[i*2+1];
			}

			var format =3D getEntryFldValue(entryN, "format", "");
			var vertical =3D (format =3D=3D "v");
	=09
			var avgFld =3D getEntryFld(entryN, "avg");
			if (avgFld) {// && xOpts.length>1) {
				avgFld.innerHTML =3D Math.round(means[0]*100)/100;
			}

			var imgDivFld =3D getEntryFld(entryN, "imgDiv");
			if (imgDivFld !=3D null) {
				h =3D makeGraph(groupLabels, options, optionValues, means[0], =
vertical, imgDivFld);
				if (h.length>0) {
					imgDivFld.innerHTML =3D h;
				}
			}
//			var imgFld =3D getEntryFld(entryN, "img");
/*			if (!imgFld) {		// just show text
				h =3D "<ul>"; // <p class=3DquestionText>" + root + "</p>
				for (i=3D0; i<groupLabels.length; ++i) {
					h +=3D "<li ><span class=3DquestionText>" + groupLabels[i] + =
"</span><ul>";
					vals =3D optionValues[i].split("|");
					for (j=3D0; j < vals.length; ++j) {
//						var p =3D vals[j].split("|");
//						for (k=3D0; k < p.length; ++k) {
							var tmp =3D vals[j];
							tmp =3D convertCRLF(tmp);
							h +=3D "<li >" + tmp + "</li>";
//						}
					}
					h +=3D "</ul></li>";
				}
				h +=3D "</ul>";
			} else {
*/
//				imgFld.height=3D"100px";
				var isDisag =3D true;
				if (groupLabels.length > 0) {
					isDisag =3D (groupLabels[0] !=3D "All respondents");
				}

				if (imgDivFld =3D=3D null) {
					h =3D "<ul>"; // <p class=3DquestionText>" + root + "</p>
					for (i=3D0; i<groupLabels.length; ++i) {
						h +=3D "<li ><span class=3DquestionText>" + groupLabels[i] + =
"</span><ul>";
						vals =3D optionValues[i].split("|");
						for (j=3D0; j < vals.length; ++j) {
//						var p =3D vals[j].split("|");
//						for (k=3D0; k < p.length; ++k) {
								var tmp =3D vals[j];
								tmp =3D convertCRLF(tmp);
								h +=3D "<li >" + tmp + "</li>";
//						}
						}
						h +=3D "</ul></li>";
					}
					h +=3D "</ul>";
				}

						// If it has a table, then it has objective data and stats make =
sense
				if (imgDivFld !=3D null) {
					if (!vertical) {	// columns have different options for MC, rows =
have different groups of respondents
						h +=3D "<table border=3D1 width=3D100% ><tr>";
						if (isDisag)
							h +=3D "<td class=3DquestionText></td>";
						for (var i=3D0; i<options.length; ++i) {
							h +=3D "<td class=3DoptionText>" + (i+1) + ". " + options[i] + =
"</td>";
						}
						h +=3D "<td class=3DoptionText align=3Dcenter>Mean</td><td =
class=3DoptionText align=3Dcenter>Std Dev</td>";
						h +=3D "</tr>";
						for (i=3D0; i<groupLabels.length; ++i) {
							h +=3D "<tr>"
							if (i>0 || isDisag)
								h +=3D "<td class=3DquestionText>" + groupLabels[i] + "</td>";
							vals =3D optionValues[i].split("|");
							for (j=3D0; j < options.length; ++j) {
								h +=3D "<td class=3DvalueText>" + vals[j];
								h +=3D "<br /><font size=3D-2 color=3D0x404040>" + (sums[i]>0 ? =
(FormatNumber(100*(vals[j]/sums[i]),1,false,false,false)+"%") : "--") + =
"</font>";
								h +=3D "</td>";
							}
							h +=3D "<td class=3DvalueText>" + Math.round(means[i]*10)/10 + =
"</td>";
							h +=3D "<td class=3DvalueText>" + Math.round(stddevs[i]*100)/100 =
+ "</td>";
							h +=3D "</tr>";
						}
						h +=3D "</table>";
					} else {			// columns have response groups, rows have options
						h +=3D "<table border=3D1 width=3D100% >";
						if (isDisag) {
							h +=3D "<tr><td class=3DquestionText></td>";
							for (i=3D0; i<groupLabels.length; ++i) {
								h +=3D "<td>" + groupLabels[i] + "</td>";
							}
							h +=3D "</tr>";
						}
						for (var i=3D0; i<options.length; ++i) {
							h +=3D "<tr>";
							h +=3D "<td class=3DoptionText>" + (i+1) + ". " + options[i] + =
"</td>";
							for (j=3D0; j < groupLabels.length; ++j) {
								vals =3D optionValues[j].split("|");
								h +=3D "<td class=3DvalueText>" + vals[i];
								h +=3D "<br /><font size=3D-2 color=3D0x404040>" +
									(sums[j]>0 ? =
(FormatNumber(100*(vals[i]/sums[j]),1,false,false,false)+"%") : "--") + =
"</font>";
								h +=3D "</td>";
							}
							h +=3D "</tr>";
						}
						h +=3D "<tr><td class=3DoptionText align=3Dcenter>Mean</td>";
						for (i=3D0; i<groupLabels.length; ++i) {
							h +=3D "<td class=3DvalueText>" + Math.round(means[i]*10)/10 + =
"</td>";
						}
						h +=3D "</tr>";
						h +=3D "<tr><td class=3DoptionText align=3Dcenter>Std Dev</td>";
						for (i=3D0; i<groupLabels.length; ++i) {
							h +=3D "<td class=3DvalueText>" + Math.round(stddevs[i]*100)/100 =
+ "</td>";
						}
						h +=3D "</tr>";
=09
						h +=3D "</table>";
					}
				}
//			}
			var dataFld =3D getEntryFld(entryN, "data");
			if (dataFld) {
				dataFld.innerHTML =3D h;
			}
			var avgFld =3D getEntryFld(entryN, "avg");
			if (avgFld ) {
				avgFld .innerHTML =3D Math.round(stats[0]/*means[0]*/*10)/10;
			}
    }

	function convertCRLF(s) {
		return replace(s, "\n", "<br/>");
	}
    function entryCommentsAreHere(req) {
		rcvdAjaxRequest();
		var h =3D "<b>Comments</b><br />";

		if (true) {	// JSON
			var json =3D eval("(" + req.responseText + ")");
			var entryN	=3D json['entryN'];
			var itemID	=3D json['itemID'];
			var groupLabels	=3D json['groupLabels'];
			var comments	=3D json['comments'];
			var commentVals	=3D json['commentValues'];

			h +=3D "<ul>"
			for (i=3D0; i < groupLabels.length; ++i) {
				if (comments[i].length>0) {
					h +=3D "<li><b>" + groupLabels[i] + "</b><ul>";
					var c =3D comments[i].split("|");
					var v =3D commentVals[i].split("|");
					for (var j=3D0; j < c.length; ++j) {
						h +=3D "<li>" + c[j] + " (" + v[j] + ")</li>";
					}
					h +=3D "</ul></li>";
				}
			}
			h +=3D "</ul>";
	=09
			var commentsFld =3D getEntryFld(entryN, "comments");
			if (commentsFld)=20
				commentsFld.innerHTML =3D h;
		} else {
/*
			var xmldoc =3D req.responseXML;
			var entryN =3D =
xmldoc.getElementsByTagName('entryN')[0].firstChild.nodeValue;
			var nodes =3D xmldoc.getElementsByTagName('item');
			var itemID =3D =
nodes[0].getElementsByTagName('itemID')[0].firstChild.nodeValue;
		=09
			var xGroups =3D nodes[0].getElementsByTagName('group');
			var groupNames =3D Array();
			var comments, commentVal;
			var allComments =3D Array();
			var allCommentVals =3D Array();
		=09
			for (i=3D0; i<xGroups.length; ++i) {
				groupNames[i] =3D =
xGroups[i].getElementsByTagName('groupLabel')[0].firstChild.nodeValue;
			}
=09
			for (i=3D0; i<groupNames.length; ++i) {
				comments =3D xGroups[i].getElementsByTagName('comment');
				commentValue =3D xGroups[i].getElementsByTagName('commentValue');
				var cA =3D Array();
				var cvA =3D Array();
			=09
				for (var j=3D0; j<comments.length; ++j) {
					cA[j] =3D comments[j].firstChild.nodeValue;
					cvA[j] =3D (commentValue[j] ? (commentValue[j].firstChild ? =
commentValue[j].firstChild.nodeValue : 0) : 0);
				}
			=09
				allComments[i] =3D cA;
				allCommentVals[i] =3D cvA;
			}
=09
			h +=3D "<ul>"
			for (i=3D0; i < groupNames.length; ++i) {
				if (allComments[i].length>0) {
					h +=3D "<li><b>" + groupNames[i] + "</b><ul>";
					for (var j=3D0; j < allComments[i].length; ++j) {
						h +=3D "<li>" + allComments[i][j] + " (" + allCommentVals[i][j] + =
")</li>";
					}
					h +=3D "</ul></li>";
				}
			}
			h +=3D "</ul>";
		=09
			var commentsFld =3D getEntryFld(entryN, "comments");
			if (commentsFld)=20
				commentsFld.innerHTML =3D h;
*/
		}
    }


	function =
FormatNumber(num,decimalNum,bolLeadingZero,bolParens,bolCommas)
	/**********************************************************************
		IN:
			NUM - the number to format
			decimalNum - the number of decimal places to format the number to
			bolLeadingZero - true / false - display a leading zero for
											numbers between -1 and 1
			bolParens - true / false - use parenthesis around negative numbers
			bolCommas - put commas as number separators.
	=20
		RETVAL:
			The formatted number!
	 =
**********************************************************************/
	{=20
			if (isNaN(parseInt(num))) return "NaN";
=09
		var tmpNum =3D num;
		var iSign =3D num < 0 ? -1 : 1;		// Get sign of number
	=09
		// Adjust number so only the specified number of numbers after
		// the decimal point are shown.
		tmpNum *=3D Math.pow(10,decimalNum);
		tmpNum =3D Math.round(Math.abs(tmpNum))
		tmpNum /=3D Math.pow(10,decimalNum);
		tmpNum *=3D iSign;					// Readjust for sign
	=09
	=09
		// Create a string object to do our formatting on
		var tmpNumStr =3D new String(tmpNum);
=09
		// See if we need to strip out the leading zero or not.
		if (!bolLeadingZero && num < 1 && num > -1 && num !=3D 0)
			if (num > 0)
				tmpNumStr =3D tmpNumStr.substring(1,tmpNumStr.length);
			else
				tmpNumStr =3D "-" + tmpNumStr.substring(2,tmpNumStr.length);
		=09
		// See if we need to put in the commas
		if (bolCommas && (num >=3D 1000 || num <=3D -1000)) {
			var iStart =3D tmpNumStr.indexOf(".");
			if (iStart < 0)
				iStart =3D tmpNumStr.length;
=09
			iStart -=3D 3;
			while (iStart >=3D 1) {
				tmpNumStr =3D tmpNumStr.substring(0,iStart) + "," + =
tmpNumStr.substring(iStart,tmpNumStr.length)
				iStart -=3D 3;
			}	=09
		}
=09
		// See if we need to use parenthesis
		if (bolParens && num < 0)
			tmpNumStr =3D "(" + tmpNumStr.substring(1,tmpNumStr.length) + ")";
=09
		return tmpNumStr;		// Return our formatted string!
	}

/*    function graphIsHere(req) {
		rcvdAjaxRequest();

		if (true) {	// do JSON
			var json =3D eval("(" + req.responseText + ")");
			var itemID	=3D json['itemID'];
			var url		=3D json['url'];
			var img =3D document.getElementById("QueGraph_" + itemID);
			if (img) img.src =3D url;
		} else {
/*			var xmldoc =3D req.responseXML;
			if (!xmldoc) {
				alert("No XML in response. Try again.");
			} else {
				var nodes =3D xmldoc.getElementsByTagName('item');
				var itemID =3D =
nodes[0].getElementsByTagName('itemID')[0].firstChild.nodeValue;
				var url =3D =
nodes[0].getElementsByTagName('url')[0].firstChild.nodeValue;
				var img =3D document.getElementById("QueGraph_" + itemID);
				if (img) img.src =3D url;
			}
* /
		}
    }
*/
/*	function doSearch(itemID) {
		loadData(itemID);
		loadGraph(itemID);

			loadComments(itemID);

	}*/
=09
	function changeGraphType(catID,itemID,entryN,nOptions) {
		var fld =3D getEntryFld(entryN, "graphTypeSel");
		var graphTypeFld =3D getEntryFld(entryN, "graphType");

		var disagSelFld =3D getEntryFld(entryN, "disagSel");
		var disagItemIDFld =3D getEntryFld(entryN, "disagItemID");
		if (fld && graphTypeFld) {
			if (disagSelFld && disagItemIDFld) {
				if (disagSelFld.selectedIndex > 0) {	// if disaggregating
					if (fld.options[fld.selectedIndex].value =3D=3D "pie") {
						disagSelFld.selectedIndex =3D 0;	// turn off disaggregation
						disagItemIDFld.value =3D "0";
					}
				}
			}
			graphTypeFld.value =3D fld.options[fld.selectedIndex].value;
		}
		loadEntry(entryN);
		saveAnalysis(catID,itemID,entryN);
	}
=09
	function changeDisag(catID,itemID,entryN) {
		var fld =3D getEntryFld(entryN, "disagSel");
		var disagFld =3D getEntryFld(entryN, "disagItemID");
		var graphTypeSelFld =3D getEntryFld(entryN, "graphTypeSel");
		var graphTypeFld =3D getEntryFld(entryN, "graphType");
		if (fld && disagFld) {
			if (graphTypeSelFld && graphTypeFld) {
				if (fld.selectedIndex > 0) {	// if disaggregating
					if (graphTypeSelFld.options[graphTypeSelFld.selectedIndex].value =
=3D=3D "pie") {
						graphTypeSelFld.selectedIndex =3D 0;	// can't disaggregate in pie =
format
						graphTypeFld.value =3D =
graphTypeSelFld.options[graphTypeSelFld.selectedIndex].value;
					}
				}
			}
			disagFld.value =3D fld.options[fld.selectedIndex].value;
		}
		loadEntry(entryN);
		saveAnalysis(catID,itemID,entryN);
	}
=09
	function changeFilter(catID,itemID,entryN,reloadFilter) {
		var fld =3D getEntryFld(entryN, "filterSel");
		var filterFld =3D getEntryFld(entryN, "filterItemID");
		var filterValFld =3D getEntryFld(entryN, "filterVal");
		if (fld && filterFld) {
			filterFld.value =3D fld.options[fld.selectedIndex].value;
			filterValFld.value =3D -1;
		}
		if (reloadFilter) {
			loadFilterOptions(entryN);
		}
		loadEntry(entryN);
		saveAnalysis(catID,itemID,entryN);
	}
=09
	function changeFilterVal(catID,itemID,entryN) {
		var selFld =3D getEntryFld(entryN, "filterValSel");
		var valFld =3D getEntryFld(entryN, "filterVal");
		if (selFld && valFld) {
			valFld.value =3D selFld.options[selFld.selectedIndex].value;
		}
		loadEntry(entryN);
		saveAnalysis(catID,itemID,entryN);
	}
=09
	function loadEntry(entryN) {
		loadEntryData(entryN);
//		loadEntryGraph(entryN);
		loadEntryComments(entryN);
	}
=09
	function getGraphType(entryN) {
		var fld =3D getEntryFld(entryN, "graphType");=20
		if (fld)
			return fld.value;
		else
			return "none";
	}
=09
	function getEntryFld(entryN, name) {
		if (entryN>=3D0)
			return document.getElementById("e_" + entryN + "_" + name);
		else
			return document.getElementById(name);
	}
=09
	function getEntryFldValue(entryN, name, defaultValue) {
		var fld =3D getEntryFld(entryN, name);
		if (fld)
			return fld.value;
		else
			return defaultValue;
	}
=09
	function loadEntryGraph(entryN) {
		var instrIDList, itemID, catID;
	=09
		instrIDList =3D getEntryFldValue(-1, "instrIDList", 0);
		itemID =3D getEntryFldValue(entryN, "itemID", 0);
		if (itemID.substring && itemID.substring(0,2) =3D=3D "i:") {
			itemID =3D itemID.substring(2);
		} else if (itemID.substring && itemID.substring(0,2) =3D=3D "c:") {
			itemID =3D "";
			catID =3D itemID.substring(2);
		}
	=09
		var graphType =3D getGraphType(entryN);
		var imgFld =3D getEntryFld(entryN, "img");
		if (imgFld) {
			if (graphType =3D=3D "compact")
				imgFld.src =3D "mini-nograph.gif";
			else
				imgFld.src =3D "nograph.gif";
		}

		var format =3D getEntryFldValue(entryN, "format", "");
		var orientation =3D (format =3D=3D "v") ? "v" : "h";

		var disag =3D getEntryFldValue(entryN, "disagItemID", 0);
		var disagStr =3D "";
		if (disag>0)
			disagStr =3D "&sp=3Ditem&spP=3D" + disag;

		var filter =3D getEntryFldValue(entryN, "filterItemID", 0);
		var filterVal =3D getEntryFldValue(entryN, "filterVal", 0);
		var filterStr =3D "";
		if (filter>0 && parseInt(filterVal)>=3D0)
			filterStr =3D "&re=3Ditem&reP=3D" + filter + "," + filterVal;
	=09
		var url =3D "result_item-json.asp?e=3D" + entryN + "&in=3D" + =
instrIDList + "&revN=3D24&it=3Ditem&itP=3D" + itemID=20
						+ "&out=3Dgraph&outP=3D" + orientation + "|" + graphType + =
disagStr + filterStr + "&f=3D";
		showAjaxRequest(url);
		sentAjaxRequest();
		AjaxRequest.get(
				{
					'url': url,
					'onSuccess': function(req){entryGraphIsHere(req);},
					'onError': function(req){ajaxError(url, req, "graph");}
				}
			);
	}

	function loadEntryComments(entryN) {
		var commentsFld =3D getEntryFld(entryN, "comments");
		if (commentsFld) {
			commentsFld.innerHTML =3D=20
				"<b>Comments</b><br><i>loading comments...</i><br />&nbsp;<br =
/>&nbsp;<br />&nbsp;";
=09
			var instrIDList, itemID, catID;
	=09
			instrIDList =3D getEntryFldValue(-1, "instrIDList", 0);
			itemID =3D getEntryFldValue(entryN, "itemID", 0);
//alert("comments itemID=3D" + itemID);
			if (itemID.substring && itemID.substring(0,2) =3D=3D "i:") {
				itemID =3D itemID.substring(2);
			} else if (itemID.substring && itemID.substring(0,2) =3D=3D "c:") {
				itemID =3D "";
				catID =3D itemID.substring(2);
			}

			var disag =3D getEntryFldValue(entryN, "disagItemID", 0);
			var disagStr =3D "";
			if (disag>0)
				disagStr =3D "&sp=3Ditem&spP=3D" + disag;

			var filter =3D getEntryFldValue(entryN, "filterItemID", 0);
			var filterVal =3D getEntryFldValue(entryN, "filterVal", 0);
			var filterStr =3D "";
			if (filter>0 && parseInt(filterVal)>=3D0)
				filterStr =3D "&re=3Ditem&reP=3D" + filter + "," + filterVal;
		=09
			var url =3D "result_item-json.asp?e=3D" + entryN + "&in=3D" + =
instrIDList + "&revN=3D24&" + "it=3Ditem&itP=3D" + itemID=20
						+ "&out=3Dcomments" + disagStr + filterStr + "&f=3D";
			showAjaxRequest(url);
			sentAjaxRequest();
			AjaxRequest.get(
				{
					'url': url,
					'onSuccess': function(req){entryCommentsAreHere(req);},
					'onError': function(req){ajaxError(url, req, "comments");}
				}
			);
		}
	}

	function loadFilterOptions(entryN) {
		var filterValFld, filterItemID;
	=09
		instrIDList =3D getEntryFldValue(-1, "instrIDList", 0);
		if (parseInt(entryN) =3D=3D -1) {
			entryNStr =3D "all";
			filterItemID =3D getEntryFldValue(-1, "e_all_filterItemID", 0);
		} else {
			entryNStr =3D entryN;
			filterItemID =3D getEntryFldValue(entryN, "filterItemID", 0);
		}
		filterSelFld =3D document.getElementById("e_" + entryNStr + =
"_filterValSel");
		if (filterSelFld)
			filterSelFld.options.length =3D 1;
		filterValFld =3D document.getElementById("e_" + entryNStr + =
"_filterVal");
		if (filterValFld)
			filterValFld.value =3D -1;

		if (filterItemID>0) {	// don't do lookup if no filter item is selected
			var url =3D "lookup_item-json.asp?e=3D" + entryN + "&id=3D" + =
filterItemID;
			showAjaxRequest(url);
			sentAjaxRequest();
			AjaxRequest.get(
				{
					'url': url,
					'onSuccess': function(req){itemOptionsAreHere(req);},
					'onError': function(req){ajaxError(url, req, "data: " + url);}
				}
			);
		}
	}
=09
	function loadEntryData(entryN) {
		var avgFld, imgFld, dataFld, graphType, disagFld, disag, instrIDList, =
itemID, catID;
		disag =3D 0;
	=09
		instrIDList =3D getEntryFldValue(-1, "instrIDList", 0);
		itemID =3D getEntryFldValue(entryN, "itemID", 0);
		if (itemID.substring && itemID.substring(0,2) =3D=3D "i:") {
			itemID =3D itemID.substring(2);
		} else if (itemID.substring && itemID.substring(0,2) =3D=3D "c:") {
			itemID =3D "";
			catID =3D itemID.substring(2);
		}
	=09
		avgFld =3D getEntryFld(entryN, "avg");
		if (avgFld)
			avgFld.innerHTML =3D "<i>--</i>";

		dataFld =3D getEntryFld(entryN, "data");
		if (dataFld) {
			dataFld.innerHTML =3D=20
				"<i>loading data...</i><br />&nbsp;<br />&nbsp;<br />" +
				"&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;";
		}
	=09
		graphType =3D getGraphType(entryN);
		imgFld =3D getEntryFld(entryN, "img");
		if (graphType =3D=3D "compact") {
			if (imgFld)
				imgFld.src =3D "";
		}

		var disagFld, disag =3D 0, disagStr =3D "";
		disagFld =3D getEntryFld(entryN, "disagItemID");
		if (disagFld) {
			disag =3D disagFld.value;
			if (disag>0) {
				disagStr =3D "&sp=3Ditem&spP=3D" + disag;
			}
		}
		var filter =3D getEntryFldValue(entryN, "filterItemID", 0);
		var filterVal =3D getEntryFldValue(entryN, "filterVal", 0);
		var filterStr =3D "";
		if (filter>0 && parseInt(filterVal)>=3D0)
			filterStr =3D "&re=3Ditem&reP=3D" + filter + "," + filterVal;
	=09
		var url =3D "result_item-json.asp?e=3D" + entryN + "&in=3D" + =
instrIDList + "&revN=3D24&it=3Ditem&itP=3D" + itemID=20
					+ "&out=3Ddata&outP=3Draw" + disagStr + filterStr + "&f=3D";
		showAjaxRequest(url);
		sentAjaxRequest();
		AjaxRequest.get(
			{
				'url': url,
				'onSuccess': function(req){entryDataAreHere(req);},
				'onError': function(req){ajaxError(url, req, "data: " + url);}
			}
		);

/*			"result_item.asp?" + "in=3D12081&" + "it=3D" + itemID + "&" + =
"wh=3Dg";*/

/*		ajaxRequest("result_item.asp?" +
			"in=3D12081&" +
			"it=3D" + itemID + "&" +
			"wh=3Dd",
			dataAreHere,
			ajaxError); */
	}
=09
/*	function loadData(itemID) {
		var fld;

			fld =3D document.getElementById("itemAverage_" + itemID);
			if (fld)
				fld.innerHTML =3D "<i>--</i>";
			var disag =3D 0;

			var tmp;
			tmp =3D document.getElementById("QueData_" + itemID);
			if (tmp)
				tmp.innerHTML =3D=20
				"<i>loading...</i><br />&nbsp;<br />&nbsp;<br />" +
				"&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;";
			var disagFld =3D eval("document.form1.item_" + itemID + "_disag");
			var disag =3D disagFld.options[disagFld.selectedIndex].value;

		var disagStr =3D "";
		if (disag>0) {
			disagStr =3D "&sp=3Ditem&spP=3D" + disag;
		}
		var filter =3D getEntryFldValue(entryN, "filterItemID", 0);
		var filterVal =3D getEntryFldValue(entryN, "filterVal", 0);
		var filterStr =3D "";
		if (filter>0 && parseInt(filterVal)>=3D0)
			filterStr =3D "&re=3Ditem&reP=3D" + filter + "," + filterVal;
	=09
		var url =3D "result_item-json.asp?" + =
"in=3D12081&revN=3D24&it=3Ditem&itP=3D" + itemID=20
					+ "&out=3Ddata&outP=3Draw" + disagStr + filterStr + "&f=3D";
		showAjaxRequest(url);
		sentAjaxRequest();
		AjaxRequest.get(
			{
				'url': url,
				'onSuccess': function(req){dataAreHere(req);},
				'onError': function(req){ajaxError(url, req, "data: " + url);}
			}
		);

/*			"result_item.asp?" + "in=3D12081&" + "it=3D" + itemID + "&" + =
"wh=3Dg";* /

/*		ajaxRequest("result_item.asp?" +
			"in=3D12081&" +
			"it=3D" + itemID + "&" +
			"wh=3Dd",
			dataAreHere,
			ajaxError); * /
	}

	function loadGraph(itemID) {

			var img =3D document.getElementById("QueGraph_" + itemID);
			if (img) {
					// don't load graph if doesn't have a graph
				img.src =3D "mini-nograph.gif";
				var url =3D "result_item-json.asp?" + "in=3D12081&revN=3D24&" + =
"it=3Ditem&itP=3D" + itemID=20
							+ "&out=3Dgraph&outP=3Dh|range&f=3D";
				showAjaxRequest(url);
				sentAjaxRequest();
				AjaxRequest.get(
					{
						'url': url,
						'onSuccess': function(req){graphIsHere(req);},
						'onError': function(req){ajaxError(url, req, "graph");}
					}
				);
			}

			if (eval("document.form1.item_" + itemID + "_hasGraph.value")=3D=3D1) =
{
				var tmp;
				tmp =3D document.getElementById("QueGraph_" + itemID);
				if (tmp)
					tmp.src =3D "nograph.gif";
				var isVertical =3D eval("document.form1.item_" + itemID + =
"_vertical").value;
				var orientation =3D (isVertical=3D=3D1) ? "v" : "h";
				var disagFld =3D eval("document.form1.item_" + itemID + "_disag");
				var disag =3D disagFld.options[disagFld.selectedIndex].value;
				var disagStr =3D "";
				if (disag>0) {
					disagStr =3D "&sp=3Ditem&spP=3D" + disag;
				}
				var graphType =3D eval("document.form1.graphType_" + itemID + =
".value");

				var filter =3D getEntryFldValue(entryN, "filterItemID", 0);
				var filterVal =3D getEntryFldValue(entryN, "filterVal", 0);
				var filterStr =3D "";
				if (filter>0 && parseInt(filterVal)>=3D0)
					filterStr =3D "&re=3Ditem&reP=3D" + filter + "," + filterVal;
		=09
				var url =3D "result_item-json.asp?" + "in=3D12081&revN=3D24&" + =
"it=3Ditem&itP=3D" + itemID=20
							+ "&out=3Dgraph&outP=3D" + orientation + "|" + graphType + =
disagStr + filterStr + "&f=3D";
				showAjaxRequest(url);
				sentAjaxRequest();
				AjaxRequest.get(
					{
						'url': url,
						'onSuccess': function(req){graphIsHere(req);},
						'onError': function(req){ajaxError(url, req, "graph");}
					}
				);
			}

	}

	function loadComments(itemID) {
		var t =3D document.getElementById("QueComments_" + itemID);
		if (t) {
			t.innerHTML =3D=20
				"<i>loading...</i><br />&nbsp;<br />&nbsp;<br />&nbsp;";
			var disag =3D 0;
			var disagFld =3D eval("document.form1.item_" + itemID + "_disag");
			var disagStr =3D "";
			if (disagFld) {
				disag =3D disagFld.options[disagFld.selectedIndex].value;
				if (disag>0) {
					disagStr =3D "&sp=3Ditem&spP=3D" + disag;
				}
			}
			var filter =3D getEntryFldValue(entryN, "filterItemID", 0);
			var filterVal =3D getEntryFldValue(entryN, "filterVal", 0);
			var filterStr =3D "";
			if (filter>0 && parseInt(filterVal)>=3D0)
				filterStr =3D "&re=3Ditem&reP=3D" + filter + "," + filterVal;
		=09
			var url =3D "result_item-json.asp?" + "in=3D12081&revN=3D24&" + =
"it=3Ditem&itP=3D" + itemID=20
						+ "&" + "out=3Dcomments" + disagStr + filterStr + "&f=3D";
			showAjaxRequest(url);
			sentAjaxRequest();
			AjaxRequest.get(
				{
					'url': url,
					'onSuccess': function(req){commentsAreHere(req);},
					'onError': function(req){ajaxError(url, req, "comments");}
				}
			);
		}
	}
*/

/*	function rotate(itemID) {
		var vertName =3D "item_" + itemID + "_vertical";
		var vertical =3D eval("document.form1." + vertName);
		vertical.value =3D (1-vertical.value);
		doSearch(itemID);
	}*/
=09
	function rotateEntry(catID,itemID,entryN) {
		var format =3D getEntryFld(entryN, "format");
		if (format) {
			if (format.value =3D=3D "v")
				format.value =3D "h";
			else
				format.value =3D "v";
			loadEntry(entryN);
			saveAnalysis(catID,itemID,entryN);
		}
	}
=09
/*    function commentsAreHere(req) {
		var h =3D "<b>Comments</b><br />";
alert("commentsAreHere Received:" + req.responseText);
return;
		rcvdAjaxRequest();
		var xmldoc =3D req.responseXML;
		var nodes =3D xmldoc.getElementsByTagName('item');
		var itemID =3D =
nodes[0].getElementsByTagName('itemID')[0].firstChild.nodeValue;
	=09
		var xGroups =3D nodes[0].getElementsByTagName('group');
		var groupNames =3D Array();
		var comments, commentVal;
		var allComments =3D Array();
		var allCommentVals =3D Array();
	=09
		for (i=3D0; i<xGroups.length; ++i) {
			groupNames[i] =3D =
xGroups[i].getElementsByTagName('groupLabel')[0].firstChild.nodeValue;
		}

		for (i=3D0; i<groupNames.length; ++i) {
			comments =3D xGroups[i].getElementsByTagName('comment');
			commentValue =3D xGroups[i].getElementsByTagName('commentValue');
			var cA =3D Array();
			var cvA =3D Array();
		=09
			for (var j=3D0; j<comments.length; ++j) {
				cA[j] =3D comments[j].firstChild.nodeValue;
				cvA[j] =3D (commentValue[j] ? (commentValue[j].firstChild ? =
commentValue[j].firstChild.nodeValue : 0) : 0);
			}
		=09
			allComments[i] =3D cA;
			allCommentVals[i] =3D cvA;
		}

	=09
	=09
		h +=3D "<ul>"
		for (i=3D0; i < groupNames.length; ++i) {
			h +=3D "<li><b>" + groupNames[i] + "</b><ul>";
			for (var j=3D0; j < allComments[i].length; ++j) {
				h +=3D "<li>" + allComments[i][j] + " (" + allCommentVals[i][j] + =
")</li>";
			}
			h +=3D "</ul></li>";
		}
		h +=3D "</ul>";
	=09
		var t =3D document.getElementById("QueComments_" + itemID);
		if (t)=20
			t.innerHTML =3D h;
    }
*/

	function getFldValue(id, dflt) {
		var fld =3D document.getElementById(id);
		if (fld)
			return fld.value;
		else
			return dflt;
	}
// -->
</SCRIPT>

<SCRIPT language=3Djavascript=20
src=3D"http://www.esrealitycheck.com/rc/lib_rc.js"> </SCRIPT>

<META content=3D"MSHTML 6.00.6000.17095" name=3DGENERATOR></HEAD>
<BODY text=3Dblack vLink=3Dblue aLink=3Dred link=3Dblue bgColor=3Dwhite>
<STYLE type=3Dtext/css>.compactGraph {
	BORDER-RIGHT: #006600 1px solid; BORDER-TOP: #006600 1px solid; =
BORDER-LEFT: #006600 1px solid; WIDTH: 150px; BORDER-BOTTOM: #006600 1px =
solid; HEIGHT: 15px; BACKGROUND-COLOR: #ffffcc
}
.fullGraph {
	BORDER-RIGHT: #006600 1px solid; BORDER-TOP: #006600 1px solid; =
BORDER-LEFT: #006600 1px solid; WIDTH: 650px; BORDER-BOTTOM: #006600 1px =
solid; BACKGROUND-COLOR: #ffffff
}
.fullGraphTable {
=09
}
.graphText {
	FONT-SIZE: 10px; COLOR: #003300
}
.tblHCaptionCell {
	BORDER-RIGHT: 0px solid; BORDER-TOP: #808080 thin solid; BORDER-LEFT: =
0px solid; BORDER-BOTTOM: 0px solid
}
.tblVCell {
	BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT: #808080 =
thin solid; BORDER-RIGHT-WIDTH: 0px
}
</STYLE>

<TABLE id=3DrcMenu cellSpacing=3D0 cellPadding=3D0 width=3D644 =
align=3Dcenter border=3D0>
  <TBODY>
  <TR vAlign=3Dtop>
    <TD height=3D53 rowSpan=3D2><IMG height=3D53=20
      src=3D"http://www.esrealitycheck.com/rc/rcmenu/logo2.gif" =
width=3D134></TD>
    <TD colSpan=3D5 height=3D18><IMG height=3D18=20
      src=3D"http://www.esrealitycheck.com/rc/rcmenu/TagLine.gif" =
width=3D332></TD>
    <TD align=3Dright colSpan=3D2 height=3D26><A=20
      href=3D"http://effectiveschools.com/"><IMG height=3D26=20
      src=3D"http://www.esrealitycheck.com/rc/esp_mini-26.gif" =
width=3D75=20
      border=3D0></A></TD></TR>
  <TR vAlign=3Dtop>
    <TD vAlign=3Dbottom height=3D43 rowSpan=3D2><A=20
      =
href=3D"http://www.esrealitycheck.com/rc/frontPage.asp?webID=3D684"><IMG =

      height=3D43 =
src=3D"http://www.esrealitycheck.com/rc/rcmenu/opt1.gif" width=3D73=20
      border=3D0></A></TD>
    <TD vAlign=3Dbottom height=3D43 rowSpan=3D2><A=20
      =
href=3D"http://www.esrealitycheck.com/rc/editInstr.asp?webID=3D684"><IMG =

      height=3D43 =
src=3D"http://www.esrealitycheck.com/rc/rcmenu/opt2.gif" width=3D73=20
      border=3D0></A></TD>
    <TD vAlign=3Dbottom height=3D43 rowSpan=3D2><A=20
      =
href=3D"http://www.esrealitycheck.com/rc/surveyitems.asp?webID=3D684"><IM=
G=20
      height=3D43 =
src=3D"http://www.esrealitycheck.com/rc/rcmenu/opt3.gif" width=3D73=20
      border=3D0></A></TD>
    <TD vAlign=3Dbottom height=3D43 rowSpan=3D2><A=20
      =
href=3D"http://www.esrealitycheck.com/rc/instr.asp?webID=3D684"><IMG =
height=3D43=20
      src=3D"http://www.esrealitycheck.com/rc/rcmenu/opt4.gif" =
width=3D73=20
      border=3D0></A></TD>
    <TD vAlign=3Dbottom height=3D43 rowSpan=3D2><A=20
      =
href=3D"http://www.esrealitycheck.com/rc/editData.asp?webID=3D684"><IMG=20
      height=3D43 =
src=3D"http://www.esrealitycheck.com/rc/rcmenu/opt5.gif" width=3D73=20
      border=3D0></A></TD>
    <TD vAlign=3Dbottom height=3D43 rowSpan=3D2><IMG height=3D38=20
      src=3D"http://www.esrealitycheck.com/rc/rcmenu/opt6_hot.gif" =
width=3D73=20
      border=3D0></TD>
    <TD vAlign=3Dbottom height=3D43 rowSpan=3D2><A=20
      =
href=3D"http://www.esrealitycheck.com/rc/options.asp?webID=3D684"><IMG=20
      height=3D43 =
src=3D"http://www.esrealitycheck.com/rc/rcmenu/opt7.gif" width=3D73=20
      border=3D0></A></TD><!--	    <td width=3D0>&nbsp;</td>--></TR>
  <TR vAlign=3Dtop height=3D7>
    <TD vAlign=3Dbottom><IMG height=3D7=20
      src=3D"http://www.esrealitycheck.com/rc/rcmenu/grayBar.gif" =
width=3D135></TD></TR>
  <TR vAlign=3Dtop height=3D5>
    <TD colSpan=3D7 height=3D5><IMG height=3D5=20
      src=3D"http://www.esrealitycheck.com/rc/rcmenu/redBar.gif" =
width=3D573></TD>
    <TD colSpan=3D2 height=3D5><IMG height=3D5=20
      src=3D"http://www.esrealitycheck.com/rc/rcmenu/graybar2.gif" =
width=3D73></TD></TR>
  <TR>
    <TD align=3Dmiddle colSpan=3D8>
      <TABLE borderColor=3D#606060 cellSpacing=3D0 cellPadding=3D0 =
width=3D"100%"=20
      border=3D0>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%" =
bgColor=3D#606060=20
            border=3D0>
              <TBODY>
              <TR>
                <TD><FONT color=3Dwhite size=3D-1>&nbsp;Jennifer Lewis =
<IMG=20
                  height=3D10=20
                  =
src=3D"http://www.esrealitycheck.com/img/diamondWhite.gif"=20
                  width=3D10> Hardin County Schools <IMG height=3D10=20
                  =
src=3D"http://www.esrealitycheck.com/img/diamondWhite.gif"=20
                  width=3D10> 3/3/2011</FONT></TD>
                <TD align=3Dright><FONT size=3D-1><A=20
                  =
href=3D"http://www.esrealitycheck.com/login/logout.asp"><FONT=20
                  color=3D#ffffc0>Logout</FONT></A> <IMG height=3D10=20
                  =
src=3D"http://www.esrealitycheck.com/img/diamondWhite.gif"=20
                  width=3D10>
                  <SCRIPT type=3Dtext/javascript>
<!--
document.preloadList[document.preloadList.Length] =3D =
"/img/help2b_Hot.gif";
//-->
</SCRIPT>
                   <A=20
                  =
onmouseover=3D"swapImage('help2b','','/img/help2b_Hot.gif',1);"=20
                  onmouseout=3DswapImageRestore();=20
                  =
href=3D"javascript:openHelp(684,15,'rc_results2','','/rc/results-2010-06.=
asp?in=3D12081&amp;ih=3DT&amp;cp=3D1',0)"><IMG=20
                  height=3D15 =
src=3D"http://www.esrealitycheck.com/img/help2b.gif"=20
                  width=3D44 align=3Dmiddle border=3D0 =
name=3Dhelp2b></A>=20
              =
</FONT></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD align=3Dmiddle colSpan=3D8>
      <TABLE borderColor=3Dnavy width=3D"100%" border=3D2>
        <TBODY>
        <TR>
          <TD>
            <TABLE width=3D"100%" border=3D0>
              <TBODY>
              <TR>
                <TD width=3D100>&nbsp;</TD>
                <TD align=3Dmiddle><FONT color=3Dnavy size=3D+1>Copy of =
Parent=20
                  Survey</FONT> <A =
href=3D"javascript:showInfo(12081)"><IMG=20
                  src=3D"http://www.esrealitycheck.com/rc/info.gif" =
border=3D0></A>=20
                </TD>
                <TD align=3Dright=20
      =
width=3D100></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR=
></TBODY></TABLE>
<DIV id=3DclosePrintView style=3D"DISPLAY: none">
<P><FONT size=3D-2><A href=3D"javascript:forPrinting(false)">[ x ]</A> =
</FONT></P>
<P align=3Dcenter><FONT color=3Dnavy size=3D+2><B>Copy of Parent=20
Survey</B></FONT></P></DIV><!--	<font size=3D+2 color=3Dnavy><b>Copy of =
Parent Survey</b></font>-->
<H3 align=3Dcenter>Expanded Results </H3>
<TABLE borderColor=3Dnavy align=3Dcenter border=3D1>
  <TBODY>
  <TR>
    <TD align=3Dright><B># of respondents</B></TD>
    <TD>24</TD></TR></TBODY></TABLE>
<FORM name=3Dform1 action=3DresultsSave.asp?webID=3D684 =
method=3Dpost><INPUT type=3Dhidden=20
value=3D/rc/results-2010-06.asp?in=3D12081&amp;ih=3DT&amp;cp=3D1&amp;h=3D=
0 name=3DtheURL>=20
<DIV id=3DajaxDebug style=3D"DISPLAY: none">
<H3>AJAX Requests:</H3><TEXTAREA name=3DajaxRequests rows=3D8 wrap=3Doff =
cols=3D80></TEXTAREA><BR>
<HR>
</DIV>
<TABLE width=3D600 align=3Dcenter border=3D0>
  <TBODY>
  <TR vAlign=3Dtop>
    <TD><B id=3DshowControlPanelBtn><A=20
      href=3D"javascript:showControlPanel()"><FONT size=3D-1><IMG =
id=3Dtriangle=20
      height=3D10 =
src=3D"http://www.esrealitycheck.com/rc/images/triangle-right.gif"=20
      width=3D10 border=3D0>&nbsp;Control Panel
      <SCRIPT>
<!--
  function showQueHelp(table,field,helpCode,helpText) {
      var agent, windowName,win,url;
      if (helpText !=3D "") {
         url =3D "/fldHelp.asp?h=3D" + escape(helpText);
		} else if (helpCode !=3D "") {
			url =3D "/fldHelp.asp?c=3D" + helpCode;
		} else {
         url =3D "/fldHelp.asp?t=3D" + table + "&f=3D" + field;
      }
      agent =3D navigator.userAgent;
      windowName =3D "FldHelp";
      params  =3D "";
      params +=3D "toolbar=3D0,";
      params +=3D "location=3D0,";
      params +=3D "directories=3D0,";
      params +=3D "status=3D0,";
      params +=3D "menubar=3D0,";
      params +=3D "scrollbars=3D1,";
      params +=3D "resizable=3D1,";
      params +=3D "width=3D500,";
      params +=3D "height=3D350";
      win =3D window.open(url, windowName , params);
      if (agent.indexOf("Mozilla/2") !=3D -1 && agent.indexOf("Win") =
=3D=3D -1) {
          win =3D window.open(url, windowName , params);
      }
      if (!win.opener) {
          win.opener =3D window;
      }
		win.focus();
  }
// -->
</SCRIPT>
       <A href=3D"javascript:showQueHelp('','','controlPanel','')"><IMG =
height=3D15=20
      src=3D"http://www.esrealitycheck.com/img/learnMore_Tiny.gif" =
width=3D15=20
      border=3D0></A> </FONT></A></B></TD>
    <TD>
      <DIV id=3DcontrolPanel style=3D"DISPLAY: none">
      <SCRIPT>
			// <!--
			function changeOptions(url) {
				var itG;

				var grouping =3D 1;

				url =3D url + "&itG=3D" + grouping;

				if (grouping =3D=3D "1") {	// check out heading section
					if (document.form1.s_heading)
						url =3D url + "&h=3D" + document.form1.s_heading.value;
				}

				var format =3D getRadioValue(document.form1.r_format);
				if (format !=3D "") {
					url =3D url + "&compact=3D" + format;
				}
			=09
				url =3D url + "&it=3D" + document.form1.showItem.value;
//alert("url=3D" + url + ", pos=3D" + url.pos("&cp=3D"));
				if (url.indexOf("&cp=3D") =3D=3D -1)	// add param
					url +=3D "&cp=3D1";	/* Keep control panel open */
			=09
			=09
				window.location =3D url;
			}

			function viewAll(url) {
				document.form1.showItem.value =3D "";
				changeOptions(url);
			}
		=09
			function getRadioValue(r) {
				var radio_choice =3D false;
				for (counter =3D 0; counter < r.length; counter++) {
					if (r[counter].checked)
						return r[counter].value;
				}
				return -1;
			}
			// -->
		</SCRIPT>
      <INPUT type=3Dhidden value=3D0 name=3DshowItem>=20
      <TABLE border=3D1>
        <TBODY>
        <TR>
          <TD class=3DsmallTable><B>Format:</B></TD>
          <TD class=3DsmallTable><INPUT type=3Dradio CHECKED=20
            =
onchange=3D"changeOptions('/rc/results-2010-06.asp?in=3D12081&amp;ih=3DT&=
amp;cp=3D1')"=20
            value=3Df name=3Dr_format>Expanded &nbsp;&nbsp;&nbsp; <INPUT =
type=3Dradio=20
            =
onchange=3D"changeOptions('/rc/results-2010-06.asp?in=3D12081&amp;ih=3DT&=
amp;cp=3D1')"=20
            value=3Dt name=3Dr_format>Overview </TD></TR>
        <TR vAlign=3Dtop>
          <TD class=3DsmallTable><B>Grouping:</B></TD>
          <TD class=3DsmallTable><INPUT type=3Dhidden value=3D1 =
name=3Dr_grouping> You=20
            cannot group your results by category because no categories =
were=20
            assigned to the survey questions. </TD></TR>
        <TR vAlign=3Dtop>
          <TD class=3DsmallTable><B>Disaggregation:</B></TD>
          <TD class=3DsmallTable><INPUT id=3De_all_disagItemID =
type=3Dhidden=20
            value=3D0> <SELECT class=3DitemControl =
id=3De_all_disagSelect=20
            onchange=3DchangeDisagAll() name=3De_all_disagSelect> =
<OPTION value=3D0=20
              selected>No disaggregation</OPTION> <OPTION =
value=3D102457>I feel=20
              the school promotes a safe environment.</OPTION> <OPTION=20
              value=3D102458>Teachers are available to students who want =

              help.</OPTION> <OPTION value=3D102459>Teachers are =
available to=20
              parents when needed.</OPTION> <OPTION =
value=3D102460>Principal is=20
              available to parents when needed.</OPTION> <OPTION=20
              value=3D102461>The administration listens to boys and=20
              girls.</OPTION> <OPTION value=3D102462>Teachers treat all =
students=20
              fairly and consisten...</OPTION> <OPTION=20
              value=3D102463>Administrators treat all students fairly =
and=20
              con...</OPTION> <OPTION value=3D102464>I usually know how =
well my=20
              child is doing in sch...</OPTION> <OPTION value=3D102465>I =
respect=20
              the teachers at this school.</OPTION> <OPTION =
value=3D102466>The=20
              teachers make sure my child has learned the ...</OPTION> =
<OPTION=20
              value=3D102467>The school staff is open to suggestions =
from=20
              par...</OPTION> <OPTION value=3D102468>The principal and =
teachers=20
              feel pride in this sc...</OPTION></SELECT> =
</FONT></TD></TR>
        <TR vAlign=3Dtop>
          <TD class=3DsmallTable><B>Filter:</B></TD>
          <TD class=3DsmallTable><INPUT id=3De_all_filterItemID =
type=3Dhidden=20
            value=3D0> <SELECT class=3DitemControl id=3De_all_filterSel=20
            onchange=3DchangeFilterAll() name=3De_all_filterSel> <OPTION =
value=3D0=20
              selected>No filter</OPTION> <OPTION value=3D102457>I feel =
the school=20
              promotes a safe environment.</OPTION> <OPTION=20
              value=3D102458>Teachers are available to students who want =

              help.</OPTION> <OPTION value=3D102459>Teachers are =
available to=20
              parents when needed.</OPTION> <OPTION =
value=3D102460>Principal is=20
              available to parents when needed.</OPTION> <OPTION=20
              value=3D102461>The administration listens to boys and=20
              girls.</OPTION> <OPTION value=3D102462>Teachers treat all =
students=20
              fairly and consisten...</OPTION> <OPTION=20
              value=3D102463>Administrators treat all students fairly =
and=20
              con...</OPTION> <OPTION value=3D102464>I usually know how =
well my=20
              child is doing in sch...</OPTION> <OPTION value=3D102465>I =
respect=20
              the teachers at this school.</OPTION> <OPTION =
value=3D102466>The=20
              teachers make sure my child has learned the ...</OPTION> =
<OPTION=20
              value=3D102467>The school staff is open to suggestions =
from=20
              par...</OPTION> <OPTION value=3D102468>The principal and =
teachers=20
              feel pride in this sc...</OPTION></SELECT> <INPUT =
id=3De_all_filterVal=20
            type=3Dhidden name=3De_all_filterVal> <SELECT =
class=3DitemControl=20
            id=3De_all_filterValSel onchange=3DchangeFilterValAll()=20
            name=3De_all_filterValSel> <OPTION value=3D-1 selected>[ =
show all=20
              ]</OPTION></SELECT> </FONT></TD></TR>
        <SCRIPT>
				// <!--
				function changeDisagAll() {
						// loop through all disag fields and set to this value
					var i;
					for (i =3D 0; i < document.form1.elements.length; ++i) {
						var n =3D document.form1.elements[i].name;
						if (n.substring(n.length-9) =3D=3D "_disagSel") {
							var entryN =3D n.substring(2, n.length-9);
							var entryID =3D eval("document.form1.e_" + entryN + =
"_itemID").value;
									// don't set disag of this item (can't disaggregate by self)
									// --> actually: this disag is okey
//							if (entryID !=3D document.form1.e_all_disagSelect.value) {
								document.form1.elements[i].value =3D =
document.form1.e_all_disagSelect.value;
								changeDisag(-1,entryID,entryN);
//							}
						}
					}
				}
				function changeFilterAll() {
					var fld =3D document.getElementById("e_all_filterSel");
					var filterFld =3D document.getElementById("e_all_filterItemID");
					var filterValFld =3D document.getElementById("e_all_filterVal");
					if (fld && filterFld) {
						filterFld.value =3D fld.options[fld.selectedIndex].value;
						filterValFld.value =3D -1;
					}
					loadFilterOptions(-1);

						// loop through all filter fields and set to this value
					var i;
					for (i =3D 0; i < document.form1.elements.length; ++i) {
						var n =3D document.form1.elements[i].name;
						if (n.substring(n.length-10) =3D=3D "_filterSel") {
							var entryN =3D n.substring(2, n.length-10);
									// don't set disag of this item (can't disaggregate by self)
							if (entryN =3D=3D "all") {
							} else {
								var entryID =3D eval("document.form1.e_" + entryN + =
"_itemID").value;
//alert("Set for EntryN=3D" + entryN + ", entryID=3D" + entryID);
//							if (entryID !=3D document.form1.e_all_filterSelect.value) {
								document.form1.elements[i].value =3D =
document.form1.e_all_filterSel.value;
								changeFilter(-1,entryID,entryN,false);
							}
						}
					}
				}
				function changeFilterValAll() {
						// loop through all filter fields and set to this value
					var i;
					for (i =3D 0; i < document.form1.elements.length; ++i) {
						var n =3D document.form1.elements[i].name;
						if (n.substring(n.length-13) =3D=3D "_filterValSel") {
							var entryN =3D n.substring(2, n.length-13);
									// don't set disag of this item (can't disaggregate by self)
							if (entryN =3D=3D "all") {
							} else {
								var entryID =3D eval("document.form1.e_" + entryN + =
"_itemID").value;
							=09
//alert("Change EntryN=3D" + entryN + ", entryID=3D" + entryID + ". Set =
to " + document.form1.e_all_filterValSel.value);
//							if (entryID !=3D document.form1.e_all_filterSel.value) {
								document.form1.elements[i].value =3D =
document.form1.e_all_filterValSel.value;
if (document.form1.elements[i].value !=3D =
document.form1.e_all_filterValSel.value) {
	alert("The filter for question " + entryN + " didn't change. Please try =
again.");
}
//if (parseInt(entryN) =3D=3D 10) {
//alert("Question " + entryN + ": actual=3D" + =
document.form1.elements[i].value + ", intended=3D" + =
document.form1.e_all_filterValSel.value);
//}
								changeFilterVal(-1,entryID,entryN);
							}
						}
					}
				}
				function toggleNotes() {
					window.location =3D =
"/rc/results-2010-06.asp?in=3D12081&ih=3DT&cp=3D1&hn=3DT";
				}
				function toggleComments() {
					window.location =3D =
"/rc/results-2010-06.asp?in=3D12081&ih=3DT&cp=3D1&hc=3DT";
				}
				function toggleHidden() {
					window.location =3D =
"/rc/results-2010-06.asp?in=3D12081&ih=3DF&cp=3D1";
				}
				// -->
			</SCRIPT>

        <TR vAlign=3Dtop>
          <TD class=3DsmallTable><B>Options:</B></TD>
          <TD class=3DsmallTable><INPUT type=3Dcheckbox CHECKED=20
            onchange=3DtoggleNotes() name=3DshowNotes> Show notes =
<BR><INPUT=20
            type=3Dcheckbox CHECKED onchange=3DtoggleComments() =
name=3DshowComments>=20
            Show comments <BR><INPUT type=3Dcheckbox CHECKED=20
            onchange=3DtoggleHidden() name=3DincludeHidden> Include =
hidden items=20
            <BR><A=20
            =
href=3D"http://www.esrealitycheck.com/rc/ss_download.asp?webID=3D684">Exp=
ort=20
            spreadsheet</A> <BR><A =
href=3D"javascript:forPrinting(true)">Format=20
            for printing</A> </TD></TR></TBODY></TABLE></DIV></TD>
    <TD><SPAN id=3DloadingResults style=3D"DISPLAY: none"><FONT =
color=3D#990000=20
      size=3D-1><I>Loading data...</I></FONT> =
</SPAN></TD></TR></TBODY></TABLE>
<SCRIPT>
		// <!--
		function showControlPanel() {
			var nowOn;
			nowOn =3D toggleDiv('controlPanel');
			var img;
			img =3D myGetElementById("triangle");
			if (img) {
				if (nowOn) {
					img.src =3D "images/triangle-down.gif";
				} else {
					img.src =3D "images/triangle-right.gif";
				}
			}
		}

			showControlPanel();

		// -->
	</SCRIPT>
<INPUT id=3DinstrIDList type=3Dhidden value=3D12081> <INPUT id=3DdisagID =
type=3Dhidden>=20
<INPUT id=3De_1_itemID type=3Dhidden value=3D102457> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 1:</B> I feel the school promotes a safe =
environment.=20
      <DIV id=3De_1_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_1_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_1_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_1_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_1><INPUT id=3De_1_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_1_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102457,1)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_1_graphTypeSel=20
      onchange=3DchangeGraphType(0,102457,1,-5) name=3De_1_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_1_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_1_disagSel onchange=3DchangeDisag(0,102457,1) =
name=3De_1_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_1_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_1_filterSel =
onchange=3DchangeFilter(0,102457,1,true)=20
      name=3De_1_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_1_filterVal type=3Dhidden name=3De_1_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_1_filterValSel onchange=3DchangeFilterVal(0,102457,1)=20
      name=3De_1_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102457 name=3Danalysis_102457 =
cols=3D60 onchange=3DsaveAnalysis(0,102457,1)></TEXTAREA>=20
            <SPAN id=3Dstatus_1></SPAN></TD></TR>
        <TR id=3DhideItemRow_1>
          <TD colSpan=3D2><INPUT id=3Dinclude_102457 type=3Dhidden =
value=3D1=20
            name=3Dinclude_102457> <A=20
            href=3D"javascript:showHide(0,102457,1,0)">Show item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102457" =
id=3D"include_102457" value=3D1 onchange=3D"saveAnalysis(0,102457,1)"  =
/>Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(1);
				// -->
			</SCRIPT>
<INPUT id=3De_2_itemID type=3Dhidden value=3D102458> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 2:</B> Teachers are available to students who want =
help.=20
      <DIV id=3De_2_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_2_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_2_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_2_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_2><INPUT id=3De_2_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_2_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102458,2)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_2_graphTypeSel=20
      onchange=3DchangeGraphType(0,102458,2,-5) name=3De_2_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_2_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_2_disagSel onchange=3DchangeDisag(0,102458,2) =
name=3De_2_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_2_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_2_filterSel =
onchange=3DchangeFilter(0,102458,2,true)=20
      name=3De_2_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_2_filterVal type=3Dhidden name=3De_2_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_2_filterValSel onchange=3DchangeFilterVal(0,102458,2)=20
      name=3De_2_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102458 name=3Danalysis_102458 =
cols=3D60 onchange=3DsaveAnalysis(0,102458,2)></TEXTAREA>=20
            <SPAN id=3Dstatus_2></SPAN></TD></TR>
        <TR id=3DhideItemRow_2>
          <TD colSpan=3D2><INPUT id=3Dinclude_102458 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102458> <A=20
            href=3D"javascript:showHide(0,102458,2,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102458" =
id=3D"include_102458" value=3D1 onchange=3D"saveAnalysis(0,102458,2)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(2);
				// -->
			</SCRIPT>
<INPUT id=3De_3_itemID type=3Dhidden value=3D102459> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 3:</B> Teachers are available to parents when =
needed.=20
      <DIV id=3De_3_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_3_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_3_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_3_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_3><INPUT id=3De_3_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_3_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102459,3)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_3_graphTypeSel=20
      onchange=3DchangeGraphType(0,102459,3,-5) name=3De_3_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_3_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_3_disagSel onchange=3DchangeDisag(0,102459,3) =
name=3De_3_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_3_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_3_filterSel =
onchange=3DchangeFilter(0,102459,3,true)=20
      name=3De_3_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_3_filterVal type=3Dhidden name=3De_3_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_3_filterValSel onchange=3DchangeFilterVal(0,102459,3)=20
      name=3De_3_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102459 name=3Danalysis_102459 =
cols=3D60 onchange=3DsaveAnalysis(0,102459,3)></TEXTAREA>=20
            <SPAN id=3Dstatus_3></SPAN></TD></TR>
        <TR id=3DhideItemRow_3>
          <TD colSpan=3D2><INPUT id=3Dinclude_102459 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102459> <A=20
            href=3D"javascript:showHide(0,102459,3,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102459" =
id=3D"include_102459" value=3D1 onchange=3D"saveAnalysis(0,102459,3)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(3);
				// -->
			</SCRIPT>
<INPUT id=3De_4_itemID type=3Dhidden value=3D102460> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 4:</B> Principal is available to parents when =
needed.=20
      <DIV id=3De_4_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_4_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_4_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_4_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_4><INPUT id=3De_4_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_4_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102460,4)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_4_graphTypeSel=20
      onchange=3DchangeGraphType(0,102460,4,-5) name=3De_4_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_4_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_4_disagSel onchange=3DchangeDisag(0,102460,4) =
name=3De_4_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_4_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_4_filterSel =
onchange=3DchangeFilter(0,102460,4,true)=20
      name=3De_4_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_4_filterVal type=3Dhidden name=3De_4_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_4_filterValSel onchange=3DchangeFilterVal(0,102460,4)=20
      name=3De_4_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102460 name=3Danalysis_102460 =
cols=3D60 onchange=3DsaveAnalysis(0,102460,4)></TEXTAREA>=20
            <SPAN id=3Dstatus_4></SPAN></TD></TR>
        <TR id=3DhideItemRow_4>
          <TD colSpan=3D2><INPUT id=3Dinclude_102460 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102460> <A=20
            href=3D"javascript:showHide(0,102460,4,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102460" =
id=3D"include_102460" value=3D1 onchange=3D"saveAnalysis(0,102460,4)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(4);
				// -->
			</SCRIPT>
<INPUT id=3De_5_itemID type=3Dhidden value=3D102461> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 5:</B> The administration listens to boys and girls. =

      <DIV id=3De_5_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_5_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_5_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_5_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_5><INPUT id=3De_5_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_5_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102461,5)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_5_graphTypeSel=20
      onchange=3DchangeGraphType(0,102461,5,-5) name=3De_5_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_5_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_5_disagSel onchange=3DchangeDisag(0,102461,5) =
name=3De_5_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_5_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_5_filterSel =
onchange=3DchangeFilter(0,102461,5,true)=20
      name=3De_5_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_5_filterVal type=3Dhidden name=3De_5_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_5_filterValSel onchange=3DchangeFilterVal(0,102461,5)=20
      name=3De_5_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102461 name=3Danalysis_102461 =
cols=3D60 onchange=3DsaveAnalysis(0,102461,5)></TEXTAREA>=20
            <SPAN id=3Dstatus_5></SPAN></TD></TR>
        <TR id=3DhideItemRow_5>
          <TD colSpan=3D2><INPUT id=3Dinclude_102461 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102461> <A=20
            href=3D"javascript:showHide(0,102461,5,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102461" =
id=3D"include_102461" value=3D1 onchange=3D"saveAnalysis(0,102461,5)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(5);
				// -->
			</SCRIPT>
<INPUT id=3De_6_itemID type=3Dhidden value=3D102462> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 6:</B> Teachers treat all students fairly and=20
      consistently.=20
      <DIV id=3De_6_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_6_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_6_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_6_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_6><INPUT id=3De_6_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_6_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102462,6)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_6_graphTypeSel=20
      onchange=3DchangeGraphType(0,102462,6,-5) name=3De_6_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_6_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_6_disagSel onchange=3DchangeDisag(0,102462,6) =
name=3De_6_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_6_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_6_filterSel =
onchange=3DchangeFilter(0,102462,6,true)=20
      name=3De_6_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_6_filterVal type=3Dhidden name=3De_6_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_6_filterValSel onchange=3DchangeFilterVal(0,102462,6)=20
      name=3De_6_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102462 name=3Danalysis_102462 =
cols=3D60 onchange=3DsaveAnalysis(0,102462,6)></TEXTAREA>=20
            <SPAN id=3Dstatus_6></SPAN></TD></TR>
        <TR id=3DhideItemRow_6>
          <TD colSpan=3D2><INPUT id=3Dinclude_102462 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102462> <A=20
            href=3D"javascript:showHide(0,102462,6,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102462" =
id=3D"include_102462" value=3D1 onchange=3D"saveAnalysis(0,102462,6)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(6);
				// -->
			</SCRIPT>
<INPUT id=3De_7_itemID type=3Dhidden value=3D102463> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 7:</B> Administrators treat all students fairly and=20
      consistently.=20
      <DIV id=3De_7_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_7_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_7_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_7_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_7><INPUT id=3De_7_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_7_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102463,7)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_7_graphTypeSel=20
      onchange=3DchangeGraphType(0,102463,7,-5) name=3De_7_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_7_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_7_disagSel onchange=3DchangeDisag(0,102463,7) =
name=3De_7_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_7_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_7_filterSel =
onchange=3DchangeFilter(0,102463,7,true)=20
      name=3De_7_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_7_filterVal type=3Dhidden name=3De_7_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_7_filterValSel onchange=3DchangeFilterVal(0,102463,7)=20
      name=3De_7_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102463 name=3Danalysis_102463 =
cols=3D60 onchange=3DsaveAnalysis(0,102463,7)></TEXTAREA>=20
            <SPAN id=3Dstatus_7></SPAN></TD></TR>
        <TR id=3DhideItemRow_7>
          <TD colSpan=3D2><INPUT id=3Dinclude_102463 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102463> <A=20
            href=3D"javascript:showHide(0,102463,7,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102463" =
id=3D"include_102463" value=3D1 onchange=3D"saveAnalysis(0,102463,7)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(7);
				// -->
			</SCRIPT>
<INPUT id=3De_8_itemID type=3Dhidden value=3D102464> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 8:</B> I usually know how well my child is doing in=20
      school.=20
      <DIV id=3De_8_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_8_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_8_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_8_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_8><INPUT id=3De_8_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_8_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102464,8)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_8_graphTypeSel=20
      onchange=3DchangeGraphType(0,102464,8,-5) name=3De_8_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_8_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_8_disagSel onchange=3DchangeDisag(0,102464,8) =
name=3De_8_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_8_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_8_filterSel =
onchange=3DchangeFilter(0,102464,8,true)=20
      name=3De_8_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_8_filterVal type=3Dhidden name=3De_8_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_8_filterValSel onchange=3DchangeFilterVal(0,102464,8)=20
      name=3De_8_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102464 name=3Danalysis_102464 =
cols=3D60 onchange=3DsaveAnalysis(0,102464,8)></TEXTAREA>=20
            <SPAN id=3Dstatus_8></SPAN></TD></TR>
        <TR id=3DhideItemRow_8>
          <TD colSpan=3D2><INPUT id=3Dinclude_102464 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102464> <A=20
            href=3D"javascript:showHide(0,102464,8,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102464" =
id=3D"include_102464" value=3D1 onchange=3D"saveAnalysis(0,102464,8)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(8);
				// -->
			</SCRIPT>
<INPUT id=3De_9_itemID type=3Dhidden value=3D102465> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 9:</B> I respect the teachers at this school.=20
      <DIV id=3De_9_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_9_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_9_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_9_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_9><INPUT id=3De_9_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_9_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102465,9)">Rotate</A> ] [ <SELECT =

      class=3DitemControl id=3De_9_graphTypeSel=20
      onchange=3DchangeGraphType(0,102465,9,-5) name=3De_9_graphTypeSel> =
<OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_9_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_9_disagSel onchange=3DchangeDisag(0,102465,9) =
name=3De_9_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_9_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_9_filterSel =
onchange=3DchangeFilter(0,102465,9,true)=20
      name=3De_9_filterSel> <OPTION value=3D0 selected>No =
filter</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_9_filterVal type=3Dhidden name=3De_9_filterVal> <SELECT =
class=3DitemControl=20
      id=3De_9_filterValSel onchange=3DchangeFilterVal(0,102465,9)=20
      name=3De_9_filterValSel> <OPTION value=3D-1 selected>[ show all=20
      ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102465 name=3Danalysis_102465 =
cols=3D60 onchange=3DsaveAnalysis(0,102465,9)></TEXTAREA>=20
            <SPAN id=3Dstatus_9></SPAN></TD></TR>
        <TR id=3DhideItemRow_9>
          <TD colSpan=3D2><INPUT id=3Dinclude_102465 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102465> <A=20
            href=3D"javascript:showHide(0,102465,9,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102465" =
id=3D"include_102465" value=3D1 onchange=3D"saveAnalysis(0,102465,9)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(9);
				// -->
			</SCRIPT>
<INPUT id=3De_10_itemID type=3Dhidden value=3D102466> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 10:</B> The teachers make sure my child has learned =
the=20
      material before moving on to new material.=20
      <DIV id=3De_10_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_10_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_10_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_10_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_10><INPUT id=3De_10_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_10_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102466,10)">Rotate</A> ] [ =
<SELECT=20
      class=3DitemControl id=3De_10_graphTypeSel=20
      onchange=3DchangeGraphType(0,102466,10,-5) =
name=3De_10_graphTypeSel> <OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_10_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_10_disagSel onchange=3DchangeDisag(0,102466,10) =
name=3De_10_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_10_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_10_filterSel=20
      onchange=3DchangeFilter(0,102466,10,true) name=3De_10_filterSel> =
<OPTION=20
        value=3D0 selected>No filter</OPTION> <OPTION value=3D102457>I =
feel the=20
        school promotes a safe environment.</OPTION> <OPTION=20
        value=3D102458>Teachers are available to students who want =
help.</OPTION>=20
        <OPTION value=3D102459>Teachers are available to parents when=20
        needed.</OPTION> <OPTION value=3D102460>Principal is available =
to parents=20
        when needed.</OPTION> <OPTION value=3D102461>The administration =
listens to=20
        boys and girls.</OPTION> <OPTION value=3D102462>Teachers treat =
all=20
        students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_10_filterVal type=3Dhidden name=3De_10_filterVal> <SELECT=20
      class=3DitemControl id=3De_10_filterValSel=20
      onchange=3DchangeFilterVal(0,102466,10) name=3De_10_filterValSel> =
<OPTION=20
        value=3D-1 selected>[ show all ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102466 name=3Danalysis_102466 =
cols=3D60 onchange=3DsaveAnalysis(0,102466,10)></TEXTAREA>=20
            <SPAN id=3Dstatus_10></SPAN></TD></TR>
        <TR id=3DhideItemRow_10>
          <TD colSpan=3D2><INPUT id=3Dinclude_102466 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102466> <A=20
            href=3D"javascript:showHide(0,102466,10,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102466" =
id=3D"include_102466" value=3D1 onchange=3D"saveAnalysis(0,102466,10)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(10);
				// -->
			</SCRIPT>
<INPUT id=3De_11_itemID type=3Dhidden value=3D102467> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 11:</B> The school staff is open to suggestions from =

      parents.=20
      <DIV id=3De_11_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_11_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_11_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_11_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_11><INPUT id=3De_11_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_11_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102467,11)">Rotate</A> ] [ =
<SELECT=20
      class=3DitemControl id=3De_11_graphTypeSel=20
      onchange=3DchangeGraphType(0,102467,11,-5) =
name=3De_11_graphTypeSel> <OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_11_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_11_disagSel onchange=3DchangeDisag(0,102467,11) =
name=3De_11_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_11_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_11_filterSel=20
      onchange=3DchangeFilter(0,102467,11,true) name=3De_11_filterSel> =
<OPTION=20
        value=3D0 selected>No filter</OPTION> <OPTION value=3D102457>I =
feel the=20
        school promotes a safe environment.</OPTION> <OPTION=20
        value=3D102458>Teachers are available to students who want =
help.</OPTION>=20
        <OPTION value=3D102459>Teachers are available to parents when=20
        needed.</OPTION> <OPTION value=3D102460>Principal is available =
to parents=20
        when needed.</OPTION> <OPTION value=3D102461>The administration =
listens to=20
        boys and girls.</OPTION> <OPTION value=3D102462>Teachers treat =
all=20
        students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_11_filterVal type=3Dhidden name=3De_11_filterVal> <SELECT=20
      class=3DitemControl id=3De_11_filterValSel=20
      onchange=3DchangeFilterVal(0,102467,11) name=3De_11_filterValSel> =
<OPTION=20
        value=3D-1 selected>[ show all ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102467 name=3Danalysis_102467 =
cols=3D60 onchange=3DsaveAnalysis(0,102467,11)></TEXTAREA>=20
            <SPAN id=3Dstatus_11></SPAN></TD></TR>
        <TR id=3DhideItemRow_11>
          <TD colSpan=3D2><INPUT id=3Dinclude_102467 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102467> <A=20
            href=3D"javascript:showHide(0,102467,11,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102467" =
id=3D"include_102467" value=3D1 onchange=3D"saveAnalysis(0,102467,11)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(11);
				// -->
			</SCRIPT>
<INPUT id=3De_12_itemID type=3Dhidden value=3D102468> <BR =
class=3DpageBreak>
<TABLE width=3D"100%" border=3D1>
  <TBODY>
  <TR>
    <TD><B>Question 12:</B> The principal and teachers feel pride in =
this=20
      school and in its students.=20
      <DIV id=3De_12_data>loading answers...</DIV>
      <CENTER>
      <DIV class=3DfullGraph id=3De_12_imgDiv=20
      style=3D"WIDTH: 600px; POSITION: relative; HEIGHT: 250px">loading =
full=20
      graph... </DIV></CENTER><!--							<center><img id=3D"e_12_img" =
src=3D"nograph.gif" /></center>-->
      <DIV id=3De_12_comments><B>Comments</B>: <BR>loading =
comments...</DIV><FONT=20
      size=3D-1>
      <DIV id=3DitemOptions_12><INPUT id=3De_12_format type=3Dhidden =
value=3Dh> <INPUT=20
      id=3De_12_graphType type=3Dhidden value=3Dbar> [ <A=20
      href=3D"javascript:rotateEntry(0,102468,12)">Rotate</A> ] [ =
<SELECT=20
      class=3DitemControl id=3De_12_graphTypeSel=20
      onchange=3DchangeGraphType(0,102468,12,-5) =
name=3De_12_graphTypeSel> <OPTION=20
        value=3Dbar selected>Bar graph</OPTION> <OPTION =
value=3Dline>Line=20
        graph</OPTION> <OPTION value=3DlineNF>Line graph (no =
fill)</OPTION>=20
        <OPTION value=3Dpie>Pie chart</OPTION></SELECT> ] [ Disaggregate =
by: <INPUT=20
      id=3De_12_disagItemID type=3Dhidden value=3D0> <SELECT =
class=3DitemControl=20
      id=3De_12_disagSel onchange=3DchangeDisag(0,102468,12) =
name=3De_12_disagSel>=20
        <OPTION value=3D0 selected>No disaggregation</OPTION> <OPTION=20
        value=3D102457>I feel the school promotes a safe =
environment.</OPTION>=20
        <OPTION value=3D102458>Teachers are available to students who =
want=20
        help.</OPTION> <OPTION value=3D102459>Teachers are available to =
parents=20
        when needed.</OPTION> <OPTION value=3D102460>Principal is =
available to=20
        parents when needed.</OPTION> <OPTION value=3D102461>The =
administration=20
        listens to boys and girls.</OPTION> <OPTION =
value=3D102462>Teachers treat=20
        all students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> ] <BR>[=20
      Filter by: <INPUT id=3De_12_filterItemID type=3Dhidden value=3D0> =
<SELECT=20
      class=3DitemControl id=3De_12_filterSel=20
      onchange=3DchangeFilter(0,102468,12,true) name=3De_12_filterSel> =
<OPTION=20
        value=3D0 selected>No filter</OPTION> <OPTION value=3D102457>I =
feel the=20
        school promotes a safe environment.</OPTION> <OPTION=20
        value=3D102458>Teachers are available to students who want =
help.</OPTION>=20
        <OPTION value=3D102459>Teachers are available to parents when=20
        needed.</OPTION> <OPTION value=3D102460>Principal is available =
to parents=20
        when needed.</OPTION> <OPTION value=3D102461>The administration =
listens to=20
        boys and girls.</OPTION> <OPTION value=3D102462>Teachers treat =
all=20
        students fairly and consisten...</OPTION> <OPTION=20
        value=3D102463>Administrators treat all students fairly and=20
        con...</OPTION> <OPTION value=3D102464>I usually know how well =
my child is=20
        doing in sch...</OPTION> <OPTION value=3D102465>I respect the =
teachers at=20
        this school.</OPTION> <OPTION value=3D102466>The teachers make =
sure my=20
        child has learned the ...</OPTION> <OPTION value=3D102467>The =
school staff=20
        is open to suggestions from par...</OPTION> <OPTION =
value=3D102468>The=20
        principal and teachers feel pride in this =
sc...</OPTION></SELECT> <INPUT=20
      id=3De_12_filterVal type=3Dhidden name=3De_12_filterVal> <SELECT=20
      class=3DitemControl id=3De_12_filterValSel=20
      onchange=3DchangeFilterVal(0,102468,12) name=3De_12_filterValSel> =
<OPTION=20
        value=3D-1 selected>[ show all ]</OPTION></SELECT> ] </DIV>
      <TABLE border=3D0>
        <TBODY>
        <TR vAlign=3Dtop>
          <TD><B>Notes</B>: </TD>
          <TD><TEXTAREA id=3Danalysis_102468 name=3Danalysis_102468 =
cols=3D60 onchange=3DsaveAnalysis(0,102468,12)></TEXTAREA>=20
            <SPAN id=3Dstatus_12></SPAN></TD></TR>
        <TR id=3DhideItemRow_12>
          <TD colSpan=3D2><INPUT id=3Dinclude_102468 type=3Dhidden =
value=3D0=20
            name=3Dinclude_102468> <A=20
            href=3D"javascript:showHide(0,102468,12,1)">Hide item</A> =
<!--											<input type=3D"checkbox" name=3D"include_102468" =
id=3D"include_102468" value=3D1 onchange=3D"saveAnalysis(0,102468,12)" =
checked=3Dchecked />Include in report =
--></TD></TR></TBODY></TABLE></FONT></TD></TR></TBODY></TABLE>
<SCRIPT>
				// <!--
				loadEntry(12);
				// -->
			</SCRIPT>
<INPUT type=3Dhidden name=3DitemIDList> </FORM>
<HR>

<CENTER><FONT color=3Dnavy size=3D-1>Created by <A=20
href=3D"http://esrealitycheck.com/"><IMG=20
src=3D"http://www.esrealitycheck.com/img/rc_20.gif" =
border=3D0></A>.</FONT></CENTER>
<SCRIPT>
	<!--
	function forPrinting(yes) {
		hideByID("rcMenu", yes);
		hideByID("adminWarning", yes);
		hideByID("endSoonWarning", yes);
		hideByID("showControlPanelBtn", yes);
		hideByID("controlPanel", yes);
		hideByID("closePrintView", !yes);
		for (var i =3D 1; ; ++i) {	// go until past last field
			if (!hideByID("itemOptions_" + i, yes))
				break;
			hideByID("hideItemRow_" + i, yes);
		}
	}
	function hideByID(id, yes) {
		var fld =3D document.getElementById(id);
		if (fld) {
			fld.style.display =3D (yes ? "none" : "");
			return true;
		} else
			return false;	// couldn't find it
	}
	// -->
</SCRIPT>
</BODY></HTML>

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/logo2.gif

R0lGODlhhgA1AOYAAP////j4+//29vb2+v/v7/Dw9v/m5ufn8f/f39/f7P/U1Nzc6v/MzNTU5f/C
wtDQ4/q/wf+9vc3N4f+1tcXF3P+srP+np72917e31P+ZmbOz0a2tzv+MjLukv/+EhKSkyJ+fxf94
eP9wcP9mZo2Nu8h3jf9bW4SEtYx8qn9/sv9RUf9JSXp6r3V1rHpzqP9BQf88PGtrpv8zM2Rkov8q
Kv8gIFpanFVVmf8YGFJSl/AYHv8QEM8fMl1EhUpKkv8ICOQNGN8MGf8AAOQGEUFBjfgAA/AABuUA
Czo6idABFGoiXb4AGrUAHjExgysrgJQBLCcnfYQBMyEhem4BO1IJTmEBQBkZdR0QakkASUIATBAQ
cCoEWQ4ObiUFXS4BVSQDWwgIawsAYgAAZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5
BAUUAAAALAAAAACGADUAAAf/gEKCg4SDOyoZAIqLjI2Oj5AAgi+LDDs7CIqTkZydnp+dhaKFMgSg
p46bih6CHppClKiys6CCOy+4uboygya0qKoACDIvmZKwv8nKi8GQETuCy57NjdTS19PInSaCDtiQ
1sza3+SR4Y0i3eXV46nt6/DHsZGW0fGv8+759+WCNR4AAwZUwUuQiEcIOJjQhSsRAAYMcZngYEzc
PAQRIpg6dkuXoggAISEAGIEfp1EohajYuIgAN5SuADhIKSQmvkWshHg7JmqVPUcza5psyUGFiQk8
aQqRYcFRvZQxg6Y8eNOnzlc9AeSEFNQmPwUyLtFQMUGQDAdo06ItWHERAmhL/y20BWUBrrFgOXeG
2/qo61ALOH4I3iGjwjkOgjg4eiHIV7KcTeXhVCfZEV+grfi5/EGIsOF3bs02YqA086IIJuCKiomX
8t6fjfzGA8u5swgB5wAUZAkgXWmbvqFW1eoaNHEhXE2vm1CjtiEPAio/QiwksiLGsCLqivxSSA2G
BVmPyzuc0eXYyr8J4KB6EI2d0h0hEKSCEfZPEWyVbJRfqHTy8U2GXF/pXSPACO0J8YMKBjCSm26C
sIQdb5DkpJgj/Yk3D4CvDYiZf9gIoIJztnhVniPUWeebdZHc90iGw3Fo3HmMyHYNASMWUkMFjzw4
n0qLfFaDJ745Y1prVwVoVf9yIC4jIolLKQCOcYzwsgMjNTRGYSMWCOIQf0eOR1lBj+TE44cm/iLA
CiT+8EKDU+6DoiBnyjRIDRzs5wgB0Oyg52lhbkjZSxcyooAtdS5iYzJPErLglg5SGZoQjinSJU0x
UefPLoEKuJNU371AFQDYYSqNCG2aEN1Jki5iZSMKlLraIpcK9x9lAHQXDAEF2WooWpCimOqqnOAy
aiQW4CJlIwl5oAJDLCIggna4RGYsrcrWuNC1jFTgQUThwRqCDDS8AEEDH7SQAxFNtEuEDSyUkKCq
Q9WLzaIAcCBDYD8cQQUYAIsh8MBdHOHoCsTaq3AkAKLXZL46FCFxEUd4MfD/xWIwUQQhQXQwwMIg
V0jndLgGoIESSWw8yBJhYCxGFSoLcsQXXPhAQcg4B2nQI9gZc4ANXLxsBCFFTIHxFgYPYkQWA1tx
gjQFXCD11AAQQUQMOSvygNUgKMKnEDswAKY2BTQBxsBYDD3IED3M0AILLvBQyBMYg2HDx7JcMEMT
LgsMgMBEZA3ABQKnIOAOZxKQkxBSDmA2xlHELEQIi0zQHhBXuAzGDXh/coEUfV/8txiBZ024GIa7
mlJTA/hw9sVWoEADITg0KAAMnTmwwAxa1N0CKDFgTEQLKRRv/Oil53x66jglWMNOJwQ9sN0HAGAB
ia5EQGKlEjw+sBY3dzLD/8BSdB0J4IIvv6cFAdWZgBUXg8ECI7PfSYCsOLRVgA/CB8BJCgNj3vlI
l77CneIErxMY1hhxvUH8wAPtOZYiBoCEi3EBA5E4nRg08An0mc6AnwiAEy7WBP8xggD1EwQOOjMX
RSygdwOzQSSIIDASgMKDygOhJxYgPYFtYDpQGsQKIjE+8kHiAQKTwilCJwYpxCABkSgACNYFw4Fd
wBEgmAERQHexK6qvESDg4u8UoYEEaqEACFnhKJACCQkkkAtodAQAxWC+DjJRgY/YQBVddsVFbICL
ffOiDgdHwyRyUBEkSKAVImGCIO4gYY5IIBig6IhCxtGOWrCaJolQRQECoP+IA9uk1R6wiOBdTJRE
IOUXL1BIMWghBZcEQCKbFgkHBBEGnBjAGynZCBoqcYkEdAQJBHbGRQyzcLHE4sBmwEtHLI+VF2Om
Izbwxs41QgC9GgTlMmhBay6id8mzYzgZUcQ+JiCAU0un1NBYABjWERKn2yMR+uiIBOzRhpDgAJTY
CAn+DQwKkKDhODuBw0bMsY8tuKMVZSmwMXJCgxdLZiP41rTqPcIACYLTIzCQQDEssJJNREVBGXFQ
RVBUoVe0pCc0KIWEBhMSswylRBWhqx9EYgGAdKUEIOHSZhL0pQYVWB+TaLyiFhWK4PScwGagiBzU
MIojPKVF+QOXH8gAEg3/iOrAbhAJDQzypwNVREmRJ06lok4R7XSlTxmhgT02kZ6MiAAOcHBVRwSA
BPC7mBQWwAnQFbOsjxhrEj8BuiaYlXmnM2wkYtBRMYDBBxIwYSdM5oTGauEDnQCBwHJwQ6CSVKiK
KORaHeFUMYy2EV9UhEs9yYgB3KCxjnUCCyjgTbTqTQqw1cLTPEFRpnpipIsY6zHD2ojhrnSQBeAi
KSExAMaGDgxWcAISiOADHyABClqArcCsgE9P2FNgTYDrI4ArVtACIK1imMFMF4HeHKxXEanVGng7
8YG8KvS+4UXFA6rYhBRcYLTkBcBYAeDVJMZAnesk4/disAEEozG+5RWDl0MhsQAbuPW+sDvBeyOR
gFYykayBNa8iNHtHera1xIP7qklFDIkASGAGVtDuc6XAgtOCAgQn7RuI5chiADygtIFkRAF4FzpB
nrWevZPChhdxgA3YQApcAJiUp8wFKBy4tr9IgAaMerzivZMRFyjeaKPG5RSM9gIk4DIUE1A88S5i
yylYLigCoOUUzOAGN7BBDEhwganOIhAAOw==

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/TagLine.gif

R0lGODlhTAESAMQAAP///+/v9d/f7M/P4r+/2a+vz5+fxY+PvH9/sm9vqWZmmU9PlT8/jC8vgh8f
eQ8PbwAAZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUU
AAAALAAAAABMARIAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslUISDQKISA
YBCnKgYiqG2qsLZqszAwbWEEiOkAFfi6NLhLQCCw64SAeAhGyd9nXid9NHtLhABpMYolEAgEP38x
ki6MIlUCCAcBIwIHjyZ5IgNuAAJlAAMICKUAUwYIqCVaVAUkqggGIwGftiO4rQGwApRUB6WnI6ID
vAaiIskABZqcAZAi1iaem2CeoKnB18CXVqOrpda8rNCkmgDqrd7XicLface7d9Wwup2f15ZE3EM1
7t0AVa1E8OMEbRUqWrlunSMxbZMIOJlitQiIwMEDBg8aiCgQkgEEBSUc//SDUE4ByicMGkBY2cCB
zH4kYn48qRBCA5MoAdQ0meASy5vvGnx84CDQSJYe3RjCEnNoUAAODgAAycBjmQe+Eoi8xbSBTEgk
f/I84GCEggUAYCLdo+DozERHvcYdevLngwcjS/J0ZRZplEBpoBAYwBRkA04GfALF2wiKlbox7xJw
4IBB0REJlo6NbPauTqIiMCMNoLTrgzJdBISU6UsFRwhlBmB50E+2LAAJ4G5WAwAsY1QkRbAUcQDw
rAecdJdpcKaAmjRuCKA8HhgA2+iOZgVVAGkqpJgKnev29FhEcABvRWQtsQCu9929XwvALYI3d2mA
iaFbWIClcUZ9cfEXmf9W+0HCGzSvuWLfAuUgwgiFnMim1QOfWTdAQMpBMqB7BUJQ2wh3BbCAGw9o
tddWDnDCRiomkujdA24EwABcXXTEnIu2EUcOinWwxMCRDzilmx4KPEBAcgh8dKRJkNT4zhR4nPeZ
UGfQUYUaATClgC9RTkmlZyNQVwJM+MRVjivnnRGmLQlY0dWUMkkDQQDrNeJLAFgaieQWaJKkh5RH
TiEGAmNdWSRD1rkpkJCBmpkknENiSgIjVgLHQBoMcQkipozuEugJIC1gACegznKGIqViMwWaT221
RRoNJPBbChy9GegqwM4jXwEMHLAAAi7F1RSw6/QxhRS2jtBFXR8tQJz/AE1C4EAmywJLTCCUGCBT
eOZFmxpcKm2lBbP9GSCWCc4WySwoBgCWbEfzZmKFIXBaAms5lvzKbJXX7GEhcX1UERAtQhIpKZGj
vtMRBGCNCse/JMyKmBoXW7vcCr0S2eAIBiQEX5MDHNCVLfUyJAwnd+FlMgNBhWmAdD2Z0s8ATbWM
zarx9ecUACVLrMYeI8thXWScKPDmAGEtMF9KLupGwMgK5ThTjT6/s6oYXWOXBioHiLRHwFf3UTQY
BgtLGVbgKoC1zaNiETYEdDSMjYsCULgfKip+OynR0E2K7Zs+dlHHU26H0nC5IDljrckFeJTIA3u+
E1IBBdSkHG+dvymt/yMELACdbo80dx3p9a66eedtGVh6eDk1UEDpbS1ILFVOcWZfGgsQUG9QumW+
JuhnbcXb7KUoYLnmtsMuaZifVm4FrgXUq9XZlJ63/OSaGryOMiYeegABCVDlwO0gWaM3ptQ/2dnb
JIQZfOcoxcR+WxeD+ZH814NAAuxwqR4t7wkmcxwJyhWAbNnuBB9Rjn1S4bEFoAICbDlJqKRVJ5ag
Iko+IYktJtaUUVQQOQ4QoCQGcMLUaMs6cSJB+mrTOYopIFQOmODxeIOFBmLugU/ZEguhYMGHDcAk
D7ghXup1qYeh7R0O9AXbWgIBHbIGg3H54Z/qUsUy1E0cSFRixGqYxElqcJEBsHkVcY5oQ0ilsITR
8mEIBUHHOraLjhGzox73yMc+rsAApqtjHv1IyEIakgkGQGMdj3jIRjrykZCMpCQnSclKWvKSPQgB
ADs=

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/esp_mini-26.gif

R0lGODlhSwAaAMQAAN/f38zMzL+/v6+vr6ioqJmZmY+Pj4CAgH9/f3BwcGZmZlBQUP8AAEBAQDMz
MyAgIBAQEAAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUU
ABIALAAAAABLABoAAAX/oMSMZGmeaKqubCq9cCzPdG3fOJ40fB8UvSAwyBsGAy8AgrcoSAJE345H
6DmnVaIT5ogcJICHQKKINF4FiGQRUaAjkkYkAXaMAQ7HSwARGBwBAhFwAnYSDxEGaxFqLw50BhEP
LwlfMHKWMAdmMEibmZ5eMmwDMAYCBWOCcBICpXJ3g0gSjYJnNJgSlS+bZwN6Ep8SBpbCxGCDNqsy
sC9sbgNurZwBkzFyD7nBjA0Qt5vZotvhX8s15pcRYxIDgwALs4Le3syiB8WchbyiA/hf/dMiADiX
7Jo6GIgUWJt2q1G6TGN6yRAWg+ITWhFKJVkAA92LZi8iRdjCEAaAgR/F/yXgKLFiBI4xEswJqSeS
A5QKbgWU0WXdC0Yx5L0IAAGlzEHdvKQZRAcNBEZNJSw1kzAkhAcJ8mgcgCjCTUqDHswiI+1J1wdd
HOZYi0OAT7YyUOZoQbeu3bsj4Ordy7dvAQQI3gL4a2AgALcCkARyi3IwgsJxDSDQCAaxXBh/A8N1
0AAVBEVSISTwA6HAu0FOljYYOADCAgFsSCb4/Etsqy5ieNpJA7rtTKnlXppygy4XAK8ID0ZCkITR
wJYdfxfIdCPAIOYwYgfdmfJLGey6hD/12cUJ9KHX95aRpHHQ2z3XASP60gU8AkbWI4yVQ+f8i/UP
ULYWV4OU4t4MqyDWxZkXiNgnSYIPbaNTDARmtNZJznCyYAxIFCcKG1Hdx9GBKZnHSQwYLjKhMmUJ
V4AkjRFSUByiCLJQMzI1dZw10BXwWosw+RbYbLPI1MAAXBXFhoV8mDHQiwoIgEBpMJRxygK2BYDb
AALIdEoEgU05VlvEHHBZAPccUAoAaaaWZmP3QBbUPSQJkOadA/lxz2V99elnX3gFKuigIQAAOw==

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/opt1.gif

R0lGODlhSQArANUAAP///+71+N/s8s/i7L/Z5a/P35/F2ZS91pC804CzzH+yzHiuyXCpxm+pxWCg
v5lm/1CWuUCMs2lm3zCDrFZm0iB5pjpmvyZms2lGrxBwnw9vnwBmmVY5jwBMczomYABAXwUwTCYa
QAAgMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUAA8ALAAAAABJACsAAAb/wMeD
sikaj8ikcslsOkEc4cPirFqvWOPH85BcJ4RJluDImosizOUaAUSyAMXZ3AkZI4lyEc+o7N17CX1H
EwkJbxMABn5HfIwVExB6ZyN/AABlBgACAQAQG21vmpyeRQmXlwYEl3JGmpcBYgqdBXMblRsNbp+J
DEUFAqBuvb/BiQYaGwpvcYSKGxUCwQqAtrgaAwAFGdSolxOh3d4T1GJHzUbUjKfkALZFuEWzBboO
EfcRGqH1+Pm6n+daFflXBAEADdTe3SoyIQAEAQQqBBggScCnUBIpOrC4QUMAAQwYDEiwAV0RjwIc
GCSgzN07XBA6OdwwQcClMMIQ2QSAk+ZO/44mGe4skCzhS0JIKiRbojSJhqVNGCk8Em+qVYVVr2o1
k/Uqma1WuloNCnZJ1UKH9jiQFGhQEQd58GxwwPMNKEFSyy405c2AMlobRnX69ApApw2rmgkupXfv
saJvqCEC4GsDsGMbMtgs0oyY5WCNcZVDYlQcqgPVTnGWY/pb6IGM07nkh28BY4Orc2HqBxXstY8h
R7YskrEiBIkpT7lsVnwjQL3xal7iaNTnTTExDa/KbZ2nOehInkZN8p1pY6rn0ysRq/51+/fs3/u+
kwda2gqHIqx1wL9IhrR3JcAIA5MQeNckV+HSxiX2NNOGArMEUIA6cwGy2CcG+ZFIAwtisrgVLrpE
cJGDcUjWEQAIbCDAADRRVgw0igWgQYjPJXhSNts8KAyELgXmkIetASAGAQJU0Aw22mQwB34AwnNE
AxImIkc4PbYRQACw2YNPMhBscpARUNZyRmICOeYQRBsAt0o7R2TTSnMcFWGTXzSdydIcOhoBk0xv
ONAJkD1WKJV03rkCACPZBWDXGXk6aUR50JjRWxESIgGpGY3udR5di16VaXxXgVPWp/KBRWqpWp2K
qnurgtcqdEEAADs=

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/opt2.gif

R0lGODlhSQArANUAAP///+71+N/s8s/i7L/Z5a/P35/F2Y+80oCzzH+yzHGqxmWjwWCgv1CWuZlm
/0CMsz2LsWlm3zCDrFZm0iB5pjpmv2lGryZmsxBwnw9vnwBmmVY5jwBMczomYABAXwUwTCYaQAAg
MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUAA4ALAAAAABJACsAAAb/QIdj
oikaj8ikcslsOj8boaPirFqvWKOn44gkGQQmRRBQAB7Z9DVkuSQTAOYDYFgAGup8kwM6MhAMcEYP
CAoURQcAhg8YGA8Uf4dFhIZ6WCJGBgCbAXEammR3GpuKZ3Odm4egnXiWVZgaEnQaY3GyCkUFAhpw
D3O+AAQZDQAJt7m7rk6wcBJFCHFwpJsSvb9zCRrY0tPOykywZq2JGmYMvr4Z1qbF2sXm6A8Z3+BF
FAECf5u0AQMNDALwrAOWDds9fwBb0VMCS0ODTgEIeJIgYBMBZwOxuctG0aK3hUkaFvl4hMI8NSZB
1lPJ8orIljAZxpwpk6bNIg0JMaCFAA2F/54PGPxjsFMDhp6TCklSULRcU5aw5mw6125bpwJwDjE4
8wlAKDyJDh2DGe4MHo3buFIAcECDgAGxFCGj1c5AgJMtYWUYAKCAo6rFBBWxS2wnN1LOCAhYmy2m
yAQBCsgqeEawuwABisBDN49YRUlkRwZoICAMPgUSq3kqwrfxwX8BjVQ0QBPWQwCjNTBAZXi1bgCg
Owb7qAl0aCMkaaUxXkRAAZsvWW5FU5umBOrVmxAouv0IsQcSulcRrzI6knajGhch1kBjFfTl/QAi
9JtA0GBM//2kgO0P9Z8+9bSVfUkhIIlOajSkCSdxSFSMgwRgVsA1uJFCG1oPbpLNKndIBdfAU1bA
IgttGFRUBHqBcUXhAI0UAMB1gGXTzli6mPGAQpcU0csznqCYgGAUFjUHVZTJmM1hm0DAl19MSFAA
AQZgYERZ4/TYWIqTsNOWQ3dM5g4a7WyWTjmRLYEBZhKFgZM9+Ohj5Yk/ekJhAIVgNs9pqaXHD0IB
STBaaUuIo0FYa04CkURwwgkkOwN0IoA3u02VaCwVDXdbANghwd9gq72UXBqfMocEXiNZMeKUN7Hk
pwB4mZeqHn4GQJKrr4J6FQIGFlqrKw6SQh2tuyoDbLCWDEtsHiIEAQA7

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/opt3.gif

R0lGODlhSQArANUAAP///+71+N/s8s/i7L/Z5a/P35/F2Y+80oCzzH+yzHCpxm+pxWCgv1CWuZlm
/0CMs2lm3zCDrFZm0iB5pjpmv2lGryZmsxBwnw9vnwBmmVY5jwBMczomYABAXwUwTCYaQAAgMAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUAA4ALAAAAABJACsAAAb/QIdD
kikaj8ikcslsOj0aoYPirFqvWGOH44BcI4RIlsDImougiuX6ADyygMTZvPkYH4hyEa+Y7N17CH1H
EQgIbxEABn5zWCF/AABlBgACAQANGW1vlJaYRQiRkQYEkXKNV48ZC26ZiQpFBQKabq+xs4kGGBkJ
b3GojkUYAwAFFwmiohGbyMkAEchiR7/AVqpFCQEFrAwP3g8Ym9zf4KyZ06fVTqoRAQ0CBBMBAw0M
Apmb8vT2mRgBAgoUDECQgZq6JqoaXHKXIYKASGFoIXoIIGJDivcKpju45FpDJBN2LQmZBINIjtZQ
qjTjcaVLJi1fyjwSc+bMa3jKTDiUYac3/wb1GOi5wFOTIEYK9GRIKlNVm0jdfrVJkK0YMj8MAHW6
lOkAAD+JFjQtwuoBPqlxkL2ZAOBABgEDGgKAlUFWz18GApxcqWpYsQtTaVEFYCRvA0m8nD3LQEAA
2418j2QrkEgOM8J/AgQgK4ncrsMPGb1k5w5ehn8KSkHDXITYKX31MhZ5aMBmwoWZGFxCjOxIVtEO
IUrLQEn0aEIgzRifXcBmhpoos76xbXOZ8+dFDr8hc11lwk8Gu6tTtXNCVgJv8CBg5JMBAjHup+cU
b8Spm1Jxtn5qs7uYKG+iKNWdfb4kYEtds7RBQAZZCRBOHGWdQx+BGjWTzDK/PFZEHH4ZI3xTBAUQ
cMAF9f1R4DjfPHgKNdQsoI1MlxBTWxEUxgEbP4JtuKKBpS3o0gQGZjCAj9hJpNFFwuV4pEYKARDA
dC9N4FU60BmxlxXDycSfhFXSd8YExDDSpZdW4FGEdDSSCUxWBjQQZppqouKVk0qNGacT4SBh551Z
7MlnKkEAADs=

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/opt4.gif

R0lGODlhSQArANUAAP///+71+N/s8s/i7L/Z5a/P35/F2Y+80oCzzH+yzHCpxm+pxV+fv1CWuZlm
/0CMs2lm3zCDrFZm0iB5pjpmv2lGryZmsxBwnw9vnwBmmVY5jwBMczomYABAXwUwTCYaQAAgMAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUAA4ALAAAAABJACsAAAb/QIdD
kikaj8ikcslsOj0aoYPirFqvWGOH44AsG4BHNjl5XMZjUMXyBTTQxkcAIDjDrZtPMRKJTy5mRQ8I
ChMZfHuGgIZGBWEAC3dXIUUJAIYMYQ9hGQZ0cw0GARkXAQYZmYyVbpySVZQZEwAHGQIDGZsPEQAK
RQUCuw2ZARcEt0eyAAyuVrCdAWDLuZYA1dURAgUDAwCWkUfcBKe9zEzOmwGjuGELyg/vDxjUDANz
qhlgCpkCAfflR84ycEsgKMyEAAOECXgja1SmAkjaIWAwh8C/JQFTFRSDrRqBPgJPYVCGBAM3AAQc
LbuIJKCTCRjGRIjJEmPNm1hc4tyZRGcb/zFKCKzk6cSnEjBvlHQj+qrIBAQPGEAVxEDY0wlPoyLo
k4kAUKY2182pdirBnAK50FmbQKAaQbBhNw24cMFRBEti0qLEAIbgUrhxSa5jYGnjJoKHM/wF3LMg
LXxuCq97tzTxYsYACwaYmE4eAMOVl17GXASW3DnAMkjWi1j0W9JGTC8FCduV7Ne1bRfB8MBfbjhG
f98JLhzNuYmxpmaNKozBygtTcSFAwEifEes7ZVdjkPiw2QAFLGHi5ImfmwwHLh2CxBNWuwdvunfD
m2EkLVvryf2KtVQUTZywmARAAYCEloBkz0SjmjXW9EGAALLgxswDQsV2xALg7dLaAwiio4NOO9zB
ExMYAgDwHzMXlPgaLBFAI4BFAQigQFt3fWbEQE4hpFBStQBwykXpEbBiEQ3MEYAYFG234BEa7VEi
SrR54tsdm6Q3pBG0OTXGiUWAd1GKtyxGXDmZfMVMegpsYgAjYzITgZnMtMXgW20Wh8SblK1Zmp13
iMlnOXX+2USggmIUBAA7

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/opt5.gif

R0lGODlhSQArANUAAP///+71+N/s8s/i7L/Z5a/P35/F2ZC804CzzH+yzHCpxm+pxWSiwWCgv5lm
/1CWuUuTt0CMs2lm3zCDrFZm0iB5pjpmv2lGryZmsxBwnw9vnwBmmVY5jwBMczomYABAXwUwTCYa
QAAgMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUAA4ALAAAAABJACsAAAb/QIeD
sikaj8ikcslsOkEcocPirFqvWOPH45Bkv+Cw6IIJm8/NTqhYmTwaxQhCUTHK4ZlIpYGIHOV0G3l7
CHVxCHCHgWAjRQkBAAUbBgACkA8bEQCbDZqQmwZFlJsBE56bAHWanJOVl4yOAH4TAApFBQIbC7KY
mgMZGQUAE7ShFQICmgQaDwAJurwbtLYbuLAbCQCxqJsTGgOReQCJmg3ZhggADM6Z7N/h2dzDX43Y
2tCdEfoajgEFmgeKNHuwC9OGAwAgsNP0rF+BXfn20YvFJsCANwIwTQjwQAABT4gCBNCgIYCABgg/
LmS3sSOBChYxGsxSL5uRCQI2EZiw4QEk/46+IAngKS1nJA0M2z3zCYBjUZ1EaTKpwO8I0aRRjRhy
knUDVTP1viRFQ/ZI2CxIt5Yle9ZIAwJNCCRaW7YtRSbs6NY9wsfcvQ195QAG8BEwIsF6pYpCBWkx
KW0ENiUY1fRvYiv1ignKKQ1AqAycNzjTDNryZSc1ZRVJZ8/PBtaiE2RzDft0lXoFiyCEZnB37NwH
TdteUg/myXTajPPZVMSZcuTDbxthGiCywJ/WY/fELjw6krZdi4S36h1z+fMb7KK/rH693vbu18KP
z5a+7fn2weZHg6A/AiP47cfEKswVEaCASmRTFYAIgiEMImY1+IVRAARkoIRZRLBANQBkcCQhhlaY
EoshB4KYTQENmMQgiFVoIEwlUZXIIlLfsXiGjDZ+FwQAOw==

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/opt6_hot.gif

R0lGODlhSQAmANUAAP/////v7//f3//MzP+/v/+vr/+Zmf+Pj/+AgP9/f/9wcP9mZplm//9QUP9A
QP8zM8wzgM8wd/8gIP8QEO0SLPINIP8AAPQDB/AAAE0zgN8AANMAAEcwd4wDB38AABoSLBMNIAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUAAwALAAAAABJACYAAAb/QAYj
crEYj8ikcslsOpuYDkfIoDyv2Kz2uPkwIMwGwLEtm5meTCUMaJzfbw3I+HgcHZKJY2J0IBQSFnV0
gXqBcHAhRgkAgQtjDmMWBgACAW0GARYTAQYWj4eIZ4oWEgAHFgIDFpEODwAKRgUCrw2PARMEq6Jv
pJMBYgusY4wAxsYPAgUDAwCMsbyjdwABmsMOCgALDtx7xQsDl6HRW74WzQl9YxIBA7YCbqaajwXk
0keg6mTJxgR2554maLNnxtyTPATtGUzIkMnChhCPPDzzwJ8FAsIiKploppUFZxo39llgq8+fUH6E
SUBAZiW3MY8IcEOQUSOpBJfqUbLUZpixxW0gIyVoRcAYpZ8hb0p6BW2WhWwO3AgdNlSSM6huki4C
sPUYsgnNCugJ6syjM7AAxGq1wMhItm3d+LANUOBVulZm082tZ3OrEXbuFsATBEwAAQsBBCgo+iDv
g8KH+7LlSkdAPzsNLgH7dGlg3szUskbkOI5OktJK/q0NuZr1aNcJDYi2wBF2R5ASbZMjgAtJbd1Z
InnyDVxU0Uqqfxd38kpmu9zLz0C9SJl2dIoAnO+yft1MNuTQu5eZoNqIcvFYzqN/EiIIADs=

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/opt7.gif

R0lGODlhSQArAMQAAP//////zP/M/8z//8z/zMzM/8zMzJnMzJmZzJlm/2bMzGaZzGaZmWZmzGZm
mWYzmTOZzDOZmTNmzDNmmTMzZgCZmQBmmQAzZgAzMwAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUU
AAkALAAAAABJACsAAAX/YJI0VmmeaKqubOtij5hIbm3fuHlRY14WiwUg4ivWYDQfQMEALIzQ1e4E
QSyIJchkoSBZIoCDBGupKiYmLRddtkZXGdMBQAegIXX6wVLQAyAWc3V3eXZ4dE9vKHFfYRYTAwON
BY9zRAAIeBETjpCSYAYWQgpCEAyKKYxCbAqGTlmvS2BVdiWtE3gKjQgWA2FsqCWqfyUHAhV4e6IB
gJiaQolzophlSyUIjsHCJohzoWBOQgNoSw5/ngvejbpgCLMElNoWjF992Xj24yXOQ491YtV45RKC
SN48FMAa7SHDIiELhtroqcCTyKBFiSoiJLFoECPHj6lAilThcSTIkiY5SqJM2ZGlyZUug8GMqWgm
zSg2bxrJqdMHz544fgK1IXSoi6JGWSBNSpIpqqVOT0CNuo0qlKlUsUbV6pQrU69JwRoVO5QsULM9
M4QAADs=

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/grayBar.gif

R0lGODlhkQAHAJEAAABmmf//zP4BAgAAACH5BAQUAP8ALAAAAACRAAcAAAIehI+py+0Po5y02ouz
3rz7D4biSJbmiabqyrbuC3cFADs=

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/redBar.gif

R0lGODlhkQAFAJEAAP8AAP//zP4BAgAAACH5BAQUAP8ALAAAAACRAAUAAAIZhI+py+0Po5y02ouz
3rz7D4biSJbmiaZaAQA7

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/rcmenu/graybar2.gif

R0lGODlhkQAFAJEAAJmZmf//zP4BAgAAACH5BAQUAP8ALAAAAACRAAUAAAIZhI+py+0Po5y02ouz
3rz7D4biSJbmiaZaAQA7

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/img/diamondWhite.gif

R0lGODlhCgAKAJEAAP///5mZmWZmZgAAACH5BAUUAAMALAAAAAAKAAoAAAIanBdxGwDKnINISiWs
TVqKqn1G4y2gaAboUAAAOw==

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/img/help2b.gif

R0lGODlhLAAPANUAAP/////39/X1+///mf/t7fDw+efn9f/X19/f8tbW7//Bwc7O68bG6L+/5bi4
4/+Zmf9/f5ub15GR0/9mZoWFzn9/zHJyxm5uxWNjwf8nJ1NTu1BQuf8REf8HB0NDtP8AADo6sDEx
rSkpqSAgphkZoxMToAAAmf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUACcALAAAAAAsAA8AAAbewJNQ
WPGYjp7KcMlsOp9Ci8kTSRgWEqMFyu0KQ54EYEwGLEAh5kD9XD81oAL5kclMxoWQZuke9tlODSMI
ZBkfhx8dYwgkDX6AA5GPJ2uSJxoWZASHDwqHB2MYe0J/lKakqJRuayULZQAEBByHZA0lfpG5lZOr
jyYCrwGHHAFkBSaTj7q9p6atrw+0ZQy3qcpNzKYaF68HEBCvosmofcyWaw0kYmQQ0ouN46e5vKpD
GiIG7O4IIxteXKW+gGjwaowDEWn+QQkYxQQICgwQLKggwsQWhRiZUDCCRElGjEEAADs=

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/info.gif

R0lGODlhEAAQALMAAP///+/v/N/f+c/P9b+/8p+f7I+P6X9/5W9v4l9f309P3D8/2S8v1R8f0gAA
zP4BAiH5BAUUAA8ALAAAAAAQABAAAARqEEhAUnOuJTJnQI5iEIShOEjgMQ0XJMpANYwKII1tYIoU
NAiKgyMhYA4TY6XXEcg6CouhM1gsCh3DhVg8dozDrzeZmZIdyIkWJkZDN+Guu8vB2cDpXxAQYHHw
MzUeICIkJig2XxYYGlwAEQA7

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/rc/images/triangle-right.gif

R0lGODlhCgAKAMQAAAAA/+/v/7W1/2Nj/15e/8zM/x4e/////25u/xsb/9PT/8PD/xAQ/3t7/+Li
/ysr/3Bw/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAH
AP8ALAAAAAAKAAoAAAUr4HE4whKI6KE0iHCmyvAQLkwwCf2qN2BACpSi9wuKhjidUKYUsmopkikV
AgA7

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/img/learnMore_Tiny.gif

R0lGODlhDwAPANUAAAAAmX5+y/8AAP/AwN+4VmJiwP/MM/9QUPj4/FBLpejo9qCMid7e9/+AgP8g
ICYmqNDQ7L+/5RsbpP+vr//MzFRUu/9/fxERoP/v7/9wcHNzx/9AQP/f3/////8QEP8zM2xsxBQU
oe7u+FlZvaGNiTIxpsXF6CMjp3l5yf+PjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAAYALAAAAAAPAA8AAAaWQIPQ
sEiEAKHEYjgklCQBiMikeZQIzRAIMbFYUhhF4YI1lDSIjGAtcGA6lZKBdEJw1h+1oNERXYooHRwH
GxQYa3wdBUYQHY4dGB9rFI4mFwAijx2SHpSODEiNjgNrE5oRFwkajxgDA2+PIwl0CKNrA48Kf2YF
taQCuI5xQgQhFZCubwojZE0lFyAmUyASV0xCRUdJJExBADs=

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.esrealitycheck.com/img/rc_20.gif

R0lGODlhMgAUAOYAAP+/v/+xsf+srL+/2f+oqP+ZmbOz0a+vz/+Ojv+Hh6Kix56exft7ff91dZSU
v/9mZpyJsIyMupaIsv9fX4eHt5h8pf9RUX9/sv9NTXd3rf9AQP87O2trrWlppf8zM2Vlo/8pKf8g
IMU0S1hYm/8YGFBQlv8QEPYOEvQLEHE6c0lJkv8HB/8AAEJCjr8VL/MABegACdYAEDAwg6cGKS0t
gYUKOykpfyEheicedHkBNxUVcxAQcA4ObigAVh4BWwgIawAAZv///wAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5
BAUUAEEALAAAAAAyABQAAAf/gEGCg4SFhkEAh4qLhQyOCIyFCCwFFiyJkJGMliydJpqCDCwMDZ8a
LKCLp5AelIIIDAWDBQwBAAGiDEEIACEsE7uDmaCniQ2uJp0sDUHHyqOjEyytnRjLQQWjjAkmps+f
lrKtQSwmAZPQDKcErZDdQeOLFivTQae+HoLJz5PM5Omn7KEKIu1YPkUgWKx4IOhUAF/iWAR4RU6D
oE65Aga82EnWoQ0KPQrUJ1FUiAm+guDzBRDVRoGfDrUyIXJXzGwTnZnw5yuEBg8BUDH4NHTQMV0m
TqSwcQOHC4UCFA0YIIjDhVSDWhBKFkTCCxYxfADJ0akGBUMXdgBZewCIVqwX/4AQ+tXhRw8YLERU
QMFixtoRhCKsLVFiR9u3mqjGJcQAwg8gHxisIPGARYggH378iDBIbSEgO9TeELTgBugFgj6svcFB
bhAZJYKYViGIRLkV/kYAsTFo7WcgHEpADgL6ggwgA1rfaLGjA5AIahUEeWy00wpCQH703vFZhiC3
cVtcEJ7WdZC4azkH4QHEwaBOJAYZAMKjt/nvb92qltGivwIgowkS13GxBSEcDYMkZJEgpiGm2g0L
RFDCAG7h99+EB3zw2nMDXJCBXMddJRsQOqiXiQOmaUfIcWs9VyFxWrHIVhBqreWcIJ4FocBj9N1A
ww086oBaIQpccMEBQSApiBR0SxpJiJPnDaJeajrwuJYOgBESCAA7

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: text/css;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Location: http://www.esrealitycheck.com/rc/rc.css

BODY {
	COLOR: navy; FONT-FAMILY: Arial, Geneva; BACKGROUND-COLOR: white
}
.printTable {
	page-break-inside: avoid
}
.pageBreak {
	PAGE-BREAK-BEFORE: always
}

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.esrealitycheck.com/rc/prototype-1.6.0.2.js

/*  Prototype JavaScript framework, version 1.6.0.2
 *  (c) 2005-2008 Sam Stephenson
 *
 *  Prototype is freely distributable under the terms of an MIT-style =
license.
 *  For details, see the Prototype web site: http://www.prototypejs.org/
 *
 =
*------------------------------------------------------------------------=
--*/

var Prototype =3D {
  Version: '1.6.0.2',

  Browser: {
    IE:     !!(window.attachEvent && !window.opera),
    Opera:  !!window.opera,
    WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
    Gecko:  navigator.userAgent.indexOf('Gecko') > -1 && =
navigator.userAgent.indexOf('KHTML') =3D=3D -1,
    MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
  },

  BrowserFeatures: {
    XPath: !!document.evaluate,
    ElementExtensions: !!window.HTMLElement,
    SpecificElementExtensions:
      document.createElement('div').__proto__ &&
      document.createElement('div').__proto__ !=3D=3D
        document.createElement('form').__proto__
  },

  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
  JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,

  emptyFunction: function() { },
  K: function(x) { return x }
};

if (Prototype.Browser.MobileSafari)
  Prototype.BrowserFeatures.SpecificElementExtensions =3D false;


/* Based on Alex Arnell's inheritance implementation. */
var Class =3D {
  create: function() {
    var parent =3D null, properties =3D $A(arguments);
    if (Object.isFunction(properties[0]))
      parent =3D properties.shift();

    function klass() {
      this.initialize.apply(this, arguments);
    }

    Object.extend(klass, Class.Methods);
    klass.superclass =3D parent;
    klass.subclasses =3D [];

    if (parent) {
      var subclass =3D function() { };
      subclass.prototype =3D parent.prototype;
      klass.prototype =3D new subclass;
      parent.subclasses.push(klass);
    }

    for (var i =3D 0; i < properties.length; i++)
      klass.addMethods(properties[i]);

    if (!klass.prototype.initialize)
      klass.prototype.initialize =3D Prototype.emptyFunction;

    klass.prototype.constructor =3D klass;

    return klass;
  }
};

Class.Methods =3D {
  addMethods: function(source) {
    var ancestor   =3D this.superclass && this.superclass.prototype;
    var properties =3D Object.keys(source);

    if (!Object.keys({ toString: true }).length)
      properties.push("toString", "valueOf");

    for (var i =3D 0, length =3D properties.length; i < length; i++) {
      var property =3D properties[i], value =3D source[property];
      if (ancestor && Object.isFunction(value) &&
          value.argumentNames().first() =3D=3D "$super") {
        var method =3D value, value =3D Object.extend((function(m) {
          return function() { return ancestor[m].apply(this, arguments) =
};
        })(property).wrap(method), {
          valueOf:  function() { return method },
          toString: function() { return method.toString() }
        });
      }
      this.prototype[property] =3D value;
    }

    return this;
  }
};

var Abstract =3D { };

Object.extend =3D function(destination, source) {
  for (var property in source)
    destination[property] =3D source[property];
  return destination;
};

Object.extend(Object, {
  inspect: function(object) {
    try {
      if (Object.isUndefined(object)) return 'undefined';
      if (object =3D=3D=3D null) return 'null';
      return object.inspect ? object.inspect() : String(object);
    } catch (e) {
      if (e instanceof RangeError) return '...';
      throw e;
    }
  },

  toJSON: function(object) {
    var type =3D typeof object;
    switch (type) {
      case 'undefined':
      case 'function':
      case 'unknown': return;
      case 'boolean': return object.toString();
    }

    if (object =3D=3D=3D null) return 'null';
    if (object.toJSON) return object.toJSON();
    if (Object.isElement(object)) return;

    var results =3D [];
    for (var property in object) {
      var value =3D Object.toJSON(object[property]);
      if (!Object.isUndefined(value))
        results.push(property.toJSON() + ': ' + value);
    }

    return '{' + results.join(', ') + '}';
  },

  toQueryString: function(object) {
    return $H(object).toQueryString();
  },

  toHTML: function(object) {
    return object && object.toHTML ? object.toHTML() : =
String.interpret(object);
  },

  keys: function(object) {
    var keys =3D [];
    for (var property in object)
      keys.push(property);
    return keys;
  },

  values: function(object) {
    var values =3D [];
    for (var property in object)
      values.push(object[property]);
    return values;
  },

  clone: function(object) {
    return Object.extend({ }, object);
  },

  isElement: function(object) {
    return object && object.nodeType =3D=3D 1;
  },

  isArray: function(object) {
    return object !=3D null && typeof object =3D=3D "object" &&
      'splice' in object && 'join' in object;
  },

  isHash: function(object) {
    return object instanceof Hash;
  },

  isFunction: function(object) {
    return typeof object =3D=3D "function";
  },

  isString: function(object) {
    return typeof object =3D=3D "string";
  },

  isNumber: function(object) {
    return typeof object =3D=3D "number";
  },

  isUndefined: function(object) {
    return typeof object =3D=3D "undefined";
  }
});

Object.extend(Function.prototype, {
  argumentNames: function() {
    var names =3D =
this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").inv=
oke("strip");
    return names.length =3D=3D 1 && !names[0] ? [] : names;
  },

  bind: function() {
    if (arguments.length < 2 && Object.isUndefined(arguments[0])) return =
this;
    var __method =3D this, args =3D $A(arguments), object =3D =
args.shift();
    return function() {
      return __method.apply(object, args.concat($A(arguments)));
    }
  },

  bindAsEventListener: function() {
    var __method =3D this, args =3D $A(arguments), object =3D =
args.shift();
    return function(event) {
      return __method.apply(object, [event || =
window.event].concat(args));
    }
  },

  curry: function() {
    if (!arguments.length) return this;
    var __method =3D this, args =3D $A(arguments);
    return function() {
      return __method.apply(this, args.concat($A(arguments)));
    }
  },

  delay: function() {
    var __method =3D this, args =3D $A(arguments), timeout =3D =
args.shift() * 1000;
    return window.setTimeout(function() {
      return __method.apply(__method, args);
    }, timeout);
  },

  wrap: function(wrapper) {
    var __method =3D this;
    return function() {
      return wrapper.apply(this, =
[__method.bind(this)].concat($A(arguments)));
    }
  },

  methodize: function() {
    if (this._methodized) return this._methodized;
    var __method =3D this;
    return this._methodized =3D function() {
      return __method.apply(null, [this].concat($A(arguments)));
    };
  }
});

Function.prototype.defer =3D Function.prototype.delay.curry(0.01);

Date.prototype.toJSON =3D function() {
  return '"' + this.getUTCFullYear() + '-' +
    (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
    this.getUTCDate().toPaddedString(2) + 'T' +
    this.getUTCHours().toPaddedString(2) + ':' +
    this.getUTCMinutes().toPaddedString(2) + ':' +
    this.getUTCSeconds().toPaddedString(2) + 'Z"';
};

var Try =3D {
  these: function() {
    var returnValue;

    for (var i =3D 0, length =3D arguments.length; i < length; i++) {
      var lambda =3D arguments[i];
      try {
        returnValue =3D lambda();
        break;
      } catch (e) { }
    }

    return returnValue;
  }
};

RegExp.prototype.match =3D RegExp.prototype.test;

RegExp.escape =3D function(str) {
  return String(str).replace(/([.*+?^=3D!:${}()|[\]\/\\])/g, '\\$1');
};

/*-----------------------------------------------------------------------=
---*/

var PeriodicalExecuter =3D Class.create({
  initialize: function(callback, frequency) {
    this.callback =3D callback;
    this.frequency =3D frequency;
    this.currentlyExecuting =3D false;

    this.registerCallback();
  },

  registerCallback: function() {
    this.timer =3D setInterval(this.onTimerEvent.bind(this), =
this.frequency * 1000);
  },

  execute: function() {
    this.callback(this);
  },

  stop: function() {
    if (!this.timer) return;
    clearInterval(this.timer);
    this.timer =3D null;
  },

  onTimerEvent: function() {
    if (!this.currentlyExecuting) {
      try {
        this.currentlyExecuting =3D true;
        this.execute();
      } finally {
        this.currentlyExecuting =3D false;
      }
    }
  }
});
Object.extend(String, {
  interpret: function(value) {
    return value =3D=3D null ? '' : String(value);
  },
  specialChar: {
    '\b': '\\b',
    '\t': '\\t',
    '\n': '\\n',
    '\f': '\\f',
    '\r': '\\r',
    '\\': '\\\\'
  }
});

Object.extend(String.prototype, {
  gsub: function(pattern, replacement) {
    var result =3D '', source =3D this, match;
    replacement =3D arguments.callee.prepareReplacement(replacement);

    while (source.length > 0) {
      if (match =3D source.match(pattern)) {
        result +=3D source.slice(0, match.index);
        result +=3D String.interpret(replacement(match));
        source  =3D source.slice(match.index + match[0].length);
      } else {
        result +=3D source, source =3D '';
      }
    }
    return result;
  },

  sub: function(pattern, replacement, count) {
    replacement =3D this.gsub.prepareReplacement(replacement);
    count =3D Object.isUndefined(count) ? 1 : count;

    return this.gsub(pattern, function(match) {
      if (--count < 0) return match[0];
      return replacement(match);
    });
  },

  scan: function(pattern, iterator) {
    this.gsub(pattern, iterator);
    return String(this);
  },

  truncate: function(length, truncation) {
    length =3D length || 30;
    truncation =3D Object.isUndefined(truncation) ? '...' : truncation;
    return this.length > length ?
      this.slice(0, length - truncation.length) + truncation : =
String(this);
  },

  strip: function() {
    return this.replace(/^\s+/, '').replace(/\s+$/, '');
  },

  stripTags: function() {
    return this.replace(/<\/?[^>]+>/gi, '');
  },

  stripScripts: function() {
    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), =
'');
  },

  extractScripts: function() {
    var matchAll =3D new RegExp(Prototype.ScriptFragment, 'img');
    var matchOne =3D new RegExp(Prototype.ScriptFragment, 'im');
    return (this.match(matchAll) || []).map(function(scriptTag) {
      return (scriptTag.match(matchOne) || ['', ''])[1];
    });
  },

  evalScripts: function() {
    return this.extractScripts().map(function(script) { return =
eval(script) });
  },

  escapeHTML: function() {
    var self =3D arguments.callee;
    self.text.data =3D this;
    return self.div.innerHTML;
  },

  unescapeHTML: function() {
    var div =3D new Element('div');
    div.innerHTML =3D this.stripTags();
    return div.childNodes[0] ? (div.childNodes.length > 1 ?
      $A(div.childNodes).inject('', function(memo, node) { return =
memo+node.nodeValue }) :
      div.childNodes[0].nodeValue) : '';
  },

  toQueryParams: function(separator) {
    var match =3D this.strip().match(/([^?#]*)(#.*)?$/);
    if (!match) return { };

    return match[1].split(separator || '&').inject({ }, function(hash, =
pair) {
      if ((pair =3D pair.split('=3D'))[0]) {
        var key =3D decodeURIComponent(pair.shift());
        var value =3D pair.length > 1 ? pair.join('=3D') : pair[0];
        if (value !=3D undefined) value =3D decodeURIComponent(value);

        if (key in hash) {
          if (!Object.isArray(hash[key])) hash[key] =3D [hash[key]];
          hash[key].push(value);
        }
        else hash[key] =3D value;
      }
      return hash;
    });
  },

  toArray: function() {
    return this.split('');
  },

  succ: function() {
    return this.slice(0, this.length - 1) +
      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
  },

  times: function(count) {
    return count < 1 ? '' : new Array(count + 1).join(this);
  },

  camelize: function() {
    var parts =3D this.split('-'), len =3D parts.length;
    if (len =3D=3D 1) return parts[0];

    var camelized =3D this.charAt(0) =3D=3D '-'
      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
      : parts[0];

    for (var i =3D 1; i < len; i++)
      camelized +=3D parts[i].charAt(0).toUpperCase() + =
parts[i].substring(1);

    return camelized;
  },

  capitalize: function() {
    return this.charAt(0).toUpperCase() + =
this.substring(1).toLowerCase();
  },

  underscore: function() {
    return this.gsub(/::/, =
'/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{=
1}_#{2}').gsub(/-/,'_').toLowerCase();
  },

  dasherize: function() {
    return this.gsub(/_/,'-');
  },

  inspect: function(useDoubleQuotes) {
    var escapedString =3D this.gsub(/[\x00-\x1f\\]/, function(match) {
      var character =3D String.specialChar[match[0]];
      return character ? character : '\\u00' + =
match[0].charCodeAt().toPaddedString(2, 16);
    });
    if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') =
+ '"';
    return "'" + escapedString.replace(/'/g, '\\\'') + "'";
  },

  toJSON: function() {
    return this.inspect(true);
  },

  unfilterJSON: function(filter) {
    return this.sub(filter || Prototype.JSONFilter, '#{1}');
  },

  isJSON: function() {
    var str =3D this;
    if (str.blank()) return false;
    str =3D this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
    return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
  },

  evalJSON: function(sanitize) {
    var json =3D this.unfilterJSON();
    try {
      if (!sanitize || json.isJSON()) return eval('(' + json + ')');
    } catch (e) { }
    throw new SyntaxError('Badly formed JSON string: ' + =
this.inspect());
  },

  include: function(pattern) {
    return this.indexOf(pattern) > -1;
  },

  startsWith: function(pattern) {
    return this.indexOf(pattern) =3D=3D=3D 0;
  },

  endsWith: function(pattern) {
    var d =3D this.length - pattern.length;
    return d >=3D 0 && this.lastIndexOf(pattern) =3D=3D=3D d;
  },

  empty: function() {
    return this =3D=3D '';
  },

  blank: function() {
    return /^\s*$/.test(this);
  },

  interpolate: function(object, pattern) {
    return new Template(this, pattern).evaluate(object);
  }
});

if (Prototype.Browser.WebKit || Prototype.Browser.IE) =
Object.extend(String.prototype, {
  escapeHTML: function() {
    return =
this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
  },
  unescapeHTML: function() {
    return =
this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
  }
});

String.prototype.gsub.prepareReplacement =3D function(replacement) {
  if (Object.isFunction(replacement)) return replacement;
  var template =3D new Template(replacement);
  return function(match) { return template.evaluate(match) };
};

String.prototype.parseQuery =3D String.prototype.toQueryParams;

Object.extend(String.prototype.escapeHTML, {
  div:  document.createElement('div'),
  text: document.createTextNode('')
});

with (String.prototype.escapeHTML) div.appendChild(text);

var Template =3D Class.create({
  initialize: function(template, pattern) {
    this.template =3D template.toString();
    this.pattern =3D pattern || Template.Pattern;
  },

  evaluate: function(object) {
    if (Object.isFunction(object.toTemplateReplacements))
      object =3D object.toTemplateReplacements();

    return this.template.gsub(this.pattern, function(match) {
      if (object =3D=3D null) return '';

      var before =3D match[1] || '';
      if (before =3D=3D '\\') return match[2];

      var ctx =3D object, expr =3D match[3];
      var pattern =3D /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
      match =3D pattern.exec(expr);
      if (match =3D=3D null) return before;

      while (match !=3D null) {
        var comp =3D match[1].startsWith('[') ? match[2].gsub('\\\\]', =
']') : match[1];
        ctx =3D ctx[comp];
        if (null =3D=3D ctx || '' =3D=3D match[3]) break;
        expr =3D expr.substring('[' =3D=3D match[3] ? match[1].length : =
match[0].length);
        match =3D pattern.exec(expr);
      }

      return before + String.interpret(ctx);
    });
  }
});
Template.Pattern =3D /(^|.|\r|\n)(#\{(.*?)\})/;

var $break =3D { };

var Enumerable =3D {
  each: function(iterator, context) {
    var index =3D 0;
    iterator =3D iterator.bind(context);
    try {
      this._each(function(value) {
        iterator(value, index++);
      });
    } catch (e) {
      if (e !=3D $break) throw e;
    }
    return this;
  },

  eachSlice: function(number, iterator, context) {
    iterator =3D iterator ? iterator.bind(context) : Prototype.K;
    var index =3D -number, slices =3D [], array =3D this.toArray();
    while ((index +=3D number) < array.length)
      slices.push(array.slice(index, index+number));
    return slices.collect(iterator, context);
  },

  all: function(iterator, context) {
    iterator =3D iterator ? iterator.bind(context) : Prototype.K;
    var result =3D true;
    this.each(function(value, index) {
      result =3D result && !!iterator(value, index);
      if (!result) throw $break;
    });
    return result;
  },

  any: function(iterator, context) {
    iterator =3D iterator ? iterator.bind(context) : Prototype.K;
    var result =3D false;
    this.each(function(value, index) {
      if (result =3D !!iterator(value, index))
        throw $break;
    });
    return result;
  },

  collect: function(iterator, context) {
    iterator =3D iterator ? iterator.bind(context) : Prototype.K;
    var results =3D [];
    this.each(function(value, index) {
      results.push(iterator(value, index));
    });
    return results;
  },

  detect: function(iterator, context) {
    iterator =3D iterator.bind(context);
    var result;
    this.each(function(value, index) {
      if (iterator(value, index)) {
        result =3D value;
        throw $break;
      }
    });
    return result;
  },

  findAll: function(iterator, context) {
    iterator =3D iterator.bind(context);
    var results =3D [];
    this.each(function(value, index) {
      if (iterator(value, index))
        results.push(value);
    });
    return results;
  },

  grep: function(filter, iterator, context) {
    iterator =3D iterator ? iterator.bind(context) : Prototype.K;
    var results =3D [];

    if (Object.isString(filter))
      filter =3D new RegExp(filter);

    this.each(function(value, index) {
      if (filter.match(value))
        results.push(iterator(value, index));
    });
    return results;
  },

  include: function(object) {
    if (Object.isFunction(this.indexOf))
      if (this.indexOf(object) !=3D -1) return true;

    var found =3D false;
    this.each(function(value) {
      if (value =3D=3D object) {
        found =3D true;
        throw $break;
      }
    });
    return found;
  },

  inGroupsOf: function(number, fillWith) {
    fillWith =3D Object.isUndefined(fillWith) ? null : fillWith;
    return this.eachSlice(number, function(slice) {
      while(slice.length < number) slice.push(fillWith);
      return slice;
    });
  },

  inject: function(memo, iterator, context) {
    iterator =3D iterator.bind(context);
    this.each(function(value, index) {
      memo =3D iterator(memo, value, index);
    });
    return memo;
  },

  invoke: function(method) {
    var args =3D $A(arguments).slice(1);
    return this.map(function(value) {
      return value[method].apply(value, args);
    });
  },

  max: function(iterator, context) {
    iterator =3D iterator ? iterator.bind(context) : Prototype.K;
    var result;
    this.each(function(value, index) {
      value =3D iterator(value, index);
      if (result =3D=3D null || value >=3D result)
        result =3D value;
    });
    return result;
  },

  min: function(iterator, context) {
    iterator =3D iterator ? iterator.bind(context) : Prototype.K;
    var result;
    this.each(function(value, index) {
      value =3D iterator(value, index);
      if (result =3D=3D null || value < result)
        result =3D value;
    });
    return result;
  },

  partition: function(iterator, context) {
    iterator =3D iterator ? iterator.bind(context) : Prototype.K;
    var trues =3D [], falses =3D [];
    this.each(function(value, index) {
      (iterator(value, index) ?
        trues : falses).push(value);
    });
    return [trues, falses];
  },

  pluck: function(property) {
    var results =3D [];
    this.each(function(value) {
      results.push(value[property]);
    });
    return results;
  },

  reject: function(iterator, context) {
    iterator =3D iterator.bind(context);
    var results =3D [];
    this.each(function(value, index) {
      if (!iterator(value, index))
        results.push(value);
    });
    return results;
  },

  sortBy: function(iterator, context) {
    iterator =3D iterator.bind(context);
    return this.map(function(value, index) {
      return {value: value, criteria: iterator(value, index)};
    }).sort(function(left, right) {
      var a =3D left.criteria, b =3D right.criteria;
      return a < b ? -1 : a > b ? 1 : 0;
    }).pluck('value');
  },

  toArray: function() {
    return this.map();
  },

  zip: function() {
    var iterator =3D Prototype.K, args =3D $A(arguments);
    if (Object.isFunction(args.last()))
      iterator =3D args.pop();

    var collections =3D [this].concat(args).map($A);
    return this.map(function(value, index) {
      return iterator(collections.pluck(index));
    });
  },

  size: function() {
    return this.toArray().length;
  },

  inspect: function() {
    return '#<Enumerable:' + this.toArray().inspect() + '>';
  }
};

Object.extend(Enumerable, {
  map:     Enumerable.collect,
  find:    Enumerable.detect,
  select:  Enumerable.findAll,
  filter:  Enumerable.findAll,
  member:  Enumerable.include,
  entries: Enumerable.toArray,
  every:   Enumerable.all,
  some:    Enumerable.any
});
function $A(iterable) {
  if (!iterable) return [];
  if (iterable.toArray) return iterable.toArray();
  var length =3D iterable.length || 0, results =3D new Array(length);
  while (length--) results[length] =3D iterable[length];
  return results;
}

if (Prototype.Browser.WebKit) {
  $A =3D function(iterable) {
    if (!iterable) return [];
    if (!(Object.isFunction(iterable) && iterable =3D=3D '[object =
NodeList]') &&
        iterable.toArray) return iterable.toArray();
    var length =3D iterable.length || 0, results =3D new Array(length);
    while (length--) results[length] =3D iterable[length];
    return results;
  };
}

Array.from =3D $A;

Object.extend(Array.prototype, Enumerable);

if (!Array.prototype._reverse) Array.prototype._reverse =3D =
Array.prototype.reverse;

Object.extend(Array.prototype, {
  _each: function(iterator) {
    for (var i =3D 0, length =3D this.length; i < length; i++)
      iterator(this[i]);
  },

  clear: function() {
    this.length =3D 0;
    return this;
  },

  first: function() {
    return this[0];
  },

  last: function() {
    return this[this.length - 1];
  },

  compact: function() {
    return this.select(function(value) {
      return value !=3D null;
    });
  },

  flatten: function() {
    return this.inject([], function(array, value) {
      return array.concat(Object.isArray(value) ?
        value.flatten() : [value]);
    });
  },

  without: function() {
    var values =3D $A(arguments);
    return this.select(function(value) {
      return !values.include(value);
    });
  },

  reverse: function(inline) {
    return (inline !=3D=3D false ? this : this.toArray())._reverse();
  },

  reduce: function() {
    return this.length > 1 ? this : this[0];
  },

  uniq: function(sorted) {
    return this.inject([], function(array, value, index) {
      if (0 =3D=3D index || (sorted ? array.last() !=3D value : =
!array.include(value)))
        array.push(value);
      return array;
    });
  },

  intersect: function(array) {
    return this.uniq().findAll(function(item) {
      return array.detect(function(value) { return item =3D=3D=3D value =
});
    });
  },

  clone: function() {
    return [].concat(this);
  },

  size: function() {
    return this.length;
  },

  inspect: function() {
    return '[' + this.map(Object.inspect).join(', ') + ']';
  },

  toJSON: function() {
    var results =3D [];
    this.each(function(object) {
      var value =3D Object.toJSON(object);
      if (!Object.isUndefined(value)) results.push(value);
    });
    return '[' + results.join(', ') + ']';
  }
});

// use native browser JS 1.6 implementation if available
if (Object.isFunction(Array.prototype.forEach))
  Array.prototype._each =3D Array.prototype.forEach;

if (!Array.prototype.indexOf) Array.prototype.indexOf =3D function(item, =
i) {
  i || (i =3D 0);
  var length =3D this.length;
  if (i < 0) i =3D length + i;
  for (; i < length; i++)
    if (this[i] =3D=3D=3D item) return i;
  return -1;
};

if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf =3D =
function(item, i) {
  i =3D isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
  var n =3D this.slice(0, i).reverse().indexOf(item);
  return (n < 0) ? n : i - n - 1;
};

Array.prototype.toArray =3D Array.prototype.clone;

function $w(string) {
  if (!Object.isString(string)) return [];
  string =3D string.strip();
  return string ? string.split(/\s+/) : [];
}

if (Prototype.Browser.Opera){
  Array.prototype.concat =3D function() {
    var array =3D [];
    for (var i =3D 0, length =3D this.length; i < length; i++) =
array.push(this[i]);
    for (var i =3D 0, length =3D arguments.length; i < length; i++) {
      if (Object.isArray(arguments[i])) {
        for (var j =3D 0, arrayLength =3D arguments[i].length; j < =
arrayLength; j++)
          array.push(arguments[i][j]);
      } else {
        array.push(arguments[i]);
      }
    }
    return array;
  };
}
Object.extend(Number.prototype, {
  toColorPart: function() {
    return this.toPaddedString(2, 16);
  },

  succ: function() {
    return this + 1;
  },

  times: function(iterator) {
    $R(0, this, true).each(iterator);
    return this;
  },

  toPaddedString: function(length, radix) {
    var string =3D this.toString(radix || 10);
    return '0'.times(length - string.length) + string;
  },

  toJSON: function() {
    return isFinite(this) ? this.toString() : 'null';
  }
});

$w('abs round ceil floor').each(function(method){
  Number.prototype[method] =3D Math[method].methodize();
});
function $H(object) {
  return new Hash(object);
};

var Hash =3D Class.create(Enumerable, (function() {

  function toQueryPair(key, value) {
    if (Object.isUndefined(value)) return key;
    return key + '=3D' + encodeURIComponent(String.interpret(value));
  }

  return {
    initialize: function(object) {
      this._object =3D Object.isHash(object) ? object.toObject() : =
Object.clone(object);
    },

    _each: function(iterator) {
      for (var key in this._object) {
        var value =3D this._object[key], pair =3D [key, value];
        pair.key =3D key;
        pair.value =3D value;
        iterator(pair);
      }
    },

    set: function(key, value) {
      return this._object[key] =3D value;
    },

    get: function(key) {
      return this._object[key];
    },

    unset: function(key) {
      var value =3D this._object[key];
      delete this._object[key];
      return value;
    },

    toObject: function() {
      return Object.clone(this._object);
    },

    keys: function() {
      return this.pluck('key');
    },

    values: function() {
      return this.pluck('value');
    },

    index: function(value) {
      var match =3D this.detect(function(pair) {
        return pair.value =3D=3D=3D value;
      });
      return match && match.key;
    },

    merge: function(object) {
      return this.clone().update(object);
    },

    update: function(object) {
      return new Hash(object).inject(this, function(result, pair) {
        result.set(pair.key, pair.value);
        return result;
      });
    },

    toQueryString: function() {
      return this.map(function(pair) {
        var key =3D encodeURIComponent(pair.key), values =3D pair.value;

        if (values && typeof values =3D=3D 'object') {
          if (Object.isArray(values))
            return values.map(toQueryPair.curry(key)).join('&');
        }
        return toQueryPair(key, values);
      }).join('&');
    },

    inspect: function() {
      return '#<Hash:{' + this.map(function(pair) {
        return pair.map(Object.inspect).join(': ');
      }).join(', ') + '}>';
    },

    toJSON: function() {
      return Object.toJSON(this.toObject());
    },

    clone: function() {
      return new Hash(this);
    }
  }
})());

Hash.prototype.toTemplateReplacements =3D Hash.prototype.toObject;
Hash.from =3D $H;
var ObjectRange =3D Class.create(Enumerable, {
  initialize: function(start, end, exclusive) {
    this.start =3D start;
    this.end =3D end;
    this.exclusive =3D exclusive;
  },

  _each: function(iterator) {
    var value =3D this.start;
    while (this.include(value)) {
      iterator(value);
      value =3D value.succ();
    }
  },

  include: function(value) {
    if (value < this.start)
      return false;
    if (this.exclusive)
      return value < this.end;
    return value <=3D this.end;
  }
});

var $R =3D function(start, end, exclusive) {
  return new ObjectRange(start, end, exclusive);
};

var Ajax =3D {
  getTransport: function() {
    return Try.these(
      function() {return new XMLHttpRequest()},
      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
    ) || false;
  },

  activeRequestCount: 0
};

Ajax.Responders =3D {
  responders: [],

  _each: function(iterator) {
    this.responders._each(iterator);
  },

  register: function(responder) {
    if (!this.include(responder))
      this.responders.push(responder);
  },

  unregister: function(responder) {
    this.responders =3D this.responders.without(responder);
  },

  dispatch: function(callback, request, transport, json) {
    this.each(function(responder) {
      if (Object.isFunction(responder[callback])) {
        try {
          responder[callback].apply(responder, [request, transport, =
json]);
        } catch (e) { }
      }
    });
  }
};

Object.extend(Ajax.Responders, Enumerable);

Ajax.Responders.register({
  onCreate:   function() { Ajax.activeRequestCount++ },
  onComplete: function() { Ajax.activeRequestCount-- }
});

Ajax.Base =3D Class.create({
  initialize: function(options) {
    this.options =3D {
      method:       'post',
      asynchronous: true,
      contentType:  'application/x-www-form-urlencoded',
      encoding:     'UTF-8',
      parameters:   '',
      evalJSON:     true,
      evalJS:       true
    };
    Object.extend(this.options, options || { });

    this.options.method =3D this.options.method.toLowerCase();

    if (Object.isString(this.options.parameters))
      this.options.parameters =3D =
this.options.parameters.toQueryParams();
    else if (Object.isHash(this.options.parameters))
      this.options.parameters =3D this.options.parameters.toObject();
  }
});

Ajax.Request =3D Class.create(Ajax.Base, {
  _complete: false,

  initialize: function($super, url, options) {
    $super(options);
    this.transport =3D Ajax.getTransport();
    this.request(url);
  },

  request: function(url) {
    this.url =3D url;
    this.method =3D this.options.method;
    var params =3D Object.clone(this.options.parameters);

    if (!['get', 'post'].include(this.method)) {
      // simulate other verbs over post
      params['_method'] =3D this.method;
      this.method =3D 'post';
    }

    this.parameters =3D params;

    if (params =3D Object.toQueryString(params)) {
      // when GET, append parameters to URL
      if (this.method =3D=3D 'get')
        this.url +=3D (this.url.include('?') ? '&' : '?') + params;
      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
        params +=3D '&_=3D';
    }

    try {
      var response =3D new Ajax.Response(this);
      if (this.options.onCreate) this.options.onCreate(response);
      Ajax.Responders.dispatch('onCreate', this, response);

      this.transport.open(this.method.toUpperCase(), this.url,
        this.options.asynchronous);

      if (this.options.asynchronous) =
this.respondToReadyState.bind(this).defer(1);

      this.transport.onreadystatechange =3D =
this.onStateChange.bind(this);
      this.setRequestHeaders();

      this.body =3D this.method =3D=3D 'post' ? (this.options.postBody =
|| params) : null;
      this.transport.send(this.body);

      /* Force Firefox to handle ready state 4 for synchronous requests =
*/
      if (!this.options.asynchronous && this.transport.overrideMimeType)
        this.onStateChange();

    }
    catch (e) {
      this.dispatchException(e);
    }
  },

  onStateChange: function() {
    var readyState =3D this.transport.readyState;
    if (readyState > 1 && !((readyState =3D=3D 4) && this._complete))
      this.respondToReadyState(this.transport.readyState);
  },

  setRequestHeaders: function() {
    var headers =3D {
      'X-Requested-With': 'XMLHttpRequest',
      'X-Prototype-Version': Prototype.Version,
      'Accept': 'text/javascript, text/html, application/xml, text/xml, =
*/*'
    };

    if (this.method =3D=3D 'post') {
      headers['Content-type'] =3D this.options.contentType +
        (this.options.encoding ? '; charset=3D' + this.options.encoding =
: '');

      /* Force "Connection: close" for older Mozilla browsers to work
       * around a bug where XMLHttpRequest sends an incorrect
       * Content-length header. See Mozilla Bugzilla #246651.
       */
      if (this.transport.overrideMimeType &&
          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < =
2005)
            headers['Connection'] =3D 'close';
    }

    // user-defined headers
    if (typeof this.options.requestHeaders =3D=3D 'object') {
      var extras =3D this.options.requestHeaders;

      if (Object.isFunction(extras.push))
        for (var i =3D 0, length =3D extras.length; i < length; i +=3D =
2)
          headers[extras[i]] =3D extras[i+1];
      else
        $H(extras).each(function(pair) { headers[pair.key] =3D =
pair.value });
    }

    for (var name in headers)
      this.transport.setRequestHeader(name, headers[name]);
  },

  success: function() {
    var status =3D this.getStatus();
    return !status || (status >=3D 200 && status < 300);
  },

  getStatus: function() {
    try {
      return this.transport.status || 0;
    } catch (e) { return 0 }
  },

  respondToReadyState: function(readyState) {
    var state =3D Ajax.Request.Events[readyState], response =3D new =
Ajax.Response(this);

    if (state =3D=3D 'Complete') {
      try {
        this._complete =3D true;
        (this.options['on' + response.status]
         || this.options['on' + (this.success() ? 'Success' : =
'Failure')]
         || Prototype.emptyFunction)(response, response.headerJSON);
      } catch (e) {
        this.dispatchException(e);
      }

      var contentType =3D response.getHeader('Content-type');
      if (this.options.evalJS =3D=3D 'force'
          || (this.options.evalJS && this.isSameOrigin() && contentType
          && =
contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s=
*$/i)))
        this.evalResponse();
    }

    try {
      (this.options['on' + state] || Prototype.emptyFunction)(response, =
response.headerJSON);
      Ajax.Responders.dispatch('on' + state, this, response, =
response.headerJSON);
    } catch (e) {
      this.dispatchException(e);
    }

    if (state =3D=3D 'Complete') {
      // avoid memory leak in MSIE: clean up
      this.transport.onreadystatechange =3D Prototype.emptyFunction;
    }
  },

  isSameOrigin: function() {
    var m =3D this.url.match(/^\s*https?:\/\/[^\/]*/);
    return !m || (m[0] =3D=3D =
'#{protocol}//#{domain}#{port}'.interpolate({
      protocol: location.protocol,
      domain: document.domain,
      port: location.port ? ':' + location.port : ''
    }));
  },

  getHeader: function(name) {
    try {
      return this.transport.getResponseHeader(name) || null;
    } catch (e) { return null }
  },

  evalResponse: function() {
    try {
      return eval((this.transport.responseText || '').unfilterJSON());
    } catch (e) {
      this.dispatchException(e);
    }
  },

  dispatchException: function(exception) {
    (this.options.onException || Prototype.emptyFunction)(this, =
exception);
    Ajax.Responders.dispatch('onException', this, exception);
  }
});

Ajax.Request.Events =3D
  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];

Ajax.Response =3D Class.create({
  initialize: function(request){
    this.request =3D request;
    var transport  =3D this.transport  =3D request.transport,
        readyState =3D this.readyState =3D transport.readyState;

    if((readyState > 2 && !Prototype.Browser.IE) || readyState =3D=3D 4) =
{
      this.status       =3D this.getStatus();
      this.statusText   =3D this.getStatusText();
      this.responseText =3D String.interpret(transport.responseText);
      this.headerJSON   =3D this._getHeaderJSON();
    }

    if(readyState =3D=3D 4) {
      var xml =3D transport.responseXML;
      this.responseXML  =3D Object.isUndefined(xml) ? null : xml;
      this.responseJSON =3D this._getResponseJSON();
    }
  },

  status:      0,
  statusText: '',

  getStatus: Ajax.Request.prototype.getStatus,

  getStatusText: function() {
    try {
      return this.transport.statusText || '';
    } catch (e) { return '' }
  },

  getHeader: Ajax.Request.prototype.getHeader,

  getAllHeaders: function() {
    try {
      return this.getAllResponseHeaders();
    } catch (e) { return null }
  },

  getResponseHeader: function(name) {
    return this.transport.getResponseHeader(name);
  },

  getAllResponseHeaders: function() {
    return this.transport.getAllResponseHeaders();
  },

  _getHeaderJSON: function() {
    var json =3D this.getHeader('X-JSON');
    if (!json) return null;
    json =3D decodeURIComponent(escape(json));
    try {
      return json.evalJSON(this.request.options.sanitizeJSON ||
        !this.request.isSameOrigin());
    } catch (e) {
      this.request.dispatchException(e);
    }
  },

  _getResponseJSON: function() {
    var options =3D this.request.options;
    if (!options.evalJSON || (options.evalJSON !=3D 'force' &&
      !(this.getHeader('Content-type') || =
'').include('application/json')) ||
        this.responseText.blank())
          return null;
    try {
      return this.responseText.evalJSON(options.sanitizeJSON ||
        !this.request.isSameOrigin());
    } catch (e) {
      this.request.dispatchException(e);
    }
  }
});

Ajax.Updater =3D Class.create(Ajax.Request, {
  initialize: function($super, container, url, options) {
    this.container =3D {
      success: (container.success || container),
      failure: (container.failure || (container.success ? null : =
container))
    };

    options =3D Object.clone(options);
    var onComplete =3D options.onComplete;
    options.onComplete =3D (function(response, json) {
      this.updateContent(response.responseText);
      if (Object.isFunction(onComplete)) onComplete(response, json);
    }).bind(this);

    $super(url, options);
  },

  updateContent: function(responseText) {
    var receiver =3D this.container[this.success() ? 'success' : =
'failure'],
        options =3D this.options;

    if (!options.evalScripts) responseText =3D =
responseText.stripScripts();

    if (receiver =3D $(receiver)) {
      if (options.insertion) {
        if (Object.isString(options.insertion)) {
          var insertion =3D { }; insertion[options.insertion] =3D =
responseText;
          receiver.insert(insertion);
        }
        else options.insertion(receiver, responseText);
      }
      else receiver.update(responseText);
    }
  }
});

Ajax.PeriodicalUpdater =3D Class.create(Ajax.Base, {
  initialize: function($super, container, url, options) {
    $super(options);
    this.onComplete =3D this.options.onComplete;

    this.frequency =3D (this.options.frequency || 2);
    this.decay =3D (this.options.decay || 1);

    this.updater =3D { };
    this.container =3D container;
    this.url =3D url;

    this.start();
  },

  start: function() {
    this.options.onComplete =3D this.updateComplete.bind(this);
    this.onTimerEvent();
  },

  stop: function() {
    this.updater.options.onComplete =3D undefined;
    clearTimeout(this.timer);
    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
  },

  updateComplete: function(response) {
    if (this.options.decay) {
      this.decay =3D (response.responseText =3D=3D this.lastText ?
        this.decay * this.options.decay : 1);

      this.lastText =3D response.responseText;
    }
    this.timer =3D this.onTimerEvent.bind(this).delay(this.decay * =
this.frequency);
  },

  onTimerEvent: function() {
    this.updater =3D new Ajax.Updater(this.container, this.url, =
this.options);
  }
});
function $(element) {
  if (arguments.length > 1) {
    for (var i =3D 0, elements =3D [], length =3D arguments.length; i < =
length; i++)
      elements.push($(arguments[i]));
    return elements;
  }
  if (Object.isString(element))
    element =3D document.getElementById(element);
  return Element.extend(element);
}

if (Prototype.BrowserFeatures.XPath) {
  document._getElementsByXPath =3D function(expression, parentElement) {
    var results =3D [];
    var query =3D document.evaluate(expression, $(parentElement) || =
document,
      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
    for (var i =3D 0, length =3D query.snapshotLength; i < length; i++)
      results.push(Element.extend(query.snapshotItem(i)));
    return results;
  };
}

/*-----------------------------------------------------------------------=
---*/

if (!window.Node) var Node =3D { };

if (!Node.ELEMENT_NODE) {
  // DOM level 2 ECMAScript Language Binding
  Object.extend(Node, {
    ELEMENT_NODE: 1,
    ATTRIBUTE_NODE: 2,
    TEXT_NODE: 3,
    CDATA_SECTION_NODE: 4,
    ENTITY_REFERENCE_NODE: 5,
    ENTITY_NODE: 6,
    PROCESSING_INSTRUCTION_NODE: 7,
    COMMENT_NODE: 8,
    DOCUMENT_NODE: 9,
    DOCUMENT_TYPE_NODE: 10,
    DOCUMENT_FRAGMENT_NODE: 11,
    NOTATION_NODE: 12
  });
}

(function() {
  var element =3D this.Element;
  this.Element =3D function(tagName, attributes) {
    attributes =3D attributes || { };
    tagName =3D tagName.toLowerCase();
    var cache =3D Element.cache;
    if (Prototype.Browser.IE && attributes.name) {
      tagName =3D '<' + tagName + ' name=3D"' + attributes.name + '">';
      delete attributes.name;
      return Element.writeAttribute(document.createElement(tagName), =
attributes);
    }
    if (!cache[tagName]) cache[tagName] =3D =
Element.extend(document.createElement(tagName));
    return Element.writeAttribute(cache[tagName].cloneNode(false), =
attributes);
  };
  Object.extend(this.Element, element || { });
}).call(window);

Element.cache =3D { };

Element.Methods =3D {
  visible: function(element) {
    return $(element).style.display !=3D 'none';
  },

  toggle: function(element) {
    element =3D $(element);
    Element[Element.visible(element) ? 'hide' : 'show'](element);
    return element;
  },

  hide: function(element) {
    $(element).style.display =3D 'none';
    return element;
  },

  show: function(element) {
    $(element).style.display =3D '';
    return element;
  },

  remove: function(element) {
    element =3D $(element);
    element.parentNode.removeChild(element);
    return element;
  },

  update: function(element, content) {
    element =3D $(element);
    if (content && content.toElement) content =3D content.toElement();
    if (Object.isElement(content)) return =
element.update().insert(content);
    content =3D Object.toHTML(content);
    element.innerHTML =3D content.stripScripts();
    content.evalScripts.bind(content).defer();
    return element;
  },

  replace: function(element, content) {
    element =3D $(element);
    if (content && content.toElement) content =3D content.toElement();
    else if (!Object.isElement(content)) {
      content =3D Object.toHTML(content);
      var range =3D element.ownerDocument.createRange();
      range.selectNode(element);
      content.evalScripts.bind(content).defer();
      content =3D =
range.createContextualFragment(content.stripScripts());
    }
    element.parentNode.replaceChild(content, element);
    return element;
  },

  insert: function(element, insertions) {
    element =3D $(element);

    if (Object.isString(insertions) || Object.isNumber(insertions) ||
        Object.isElement(insertions) || (insertions && =
(insertions.toElement || insertions.toHTML)))
          insertions =3D {bottom:insertions};

    var content, insert, tagName, childNodes;

    for (var position in insertions) {
      content  =3D insertions[position];
      position =3D position.toLowerCase();
      insert =3D Element._insertionTranslations[position];

      if (content && content.toElement) content =3D content.toElement();
      if (Object.isElement(content)) {
        insert(element, content);
        continue;
      }

      content =3D Object.toHTML(content);

      tagName =3D ((position =3D=3D 'before' || position =3D=3D 'after')
        ? element.parentNode : element).tagName.toUpperCase();

      childNodes =3D Element._getContentFromAnonymousElement(tagName, =
content.stripScripts());

      if (position =3D=3D 'top' || position =3D=3D 'after') =
childNodes.reverse();
      childNodes.each(insert.curry(element));

      content.evalScripts.bind(content).defer();
    }

    return element;
  },

  wrap: function(element, wrapper, attributes) {
    element =3D $(element);
    if (Object.isElement(wrapper))
      $(wrapper).writeAttribute(attributes || { });
    else if (Object.isString(wrapper)) wrapper =3D new Element(wrapper, =
attributes);
    else wrapper =3D new Element('div', wrapper);
    if (element.parentNode)
      element.parentNode.replaceChild(wrapper, element);
    wrapper.appendChild(element);
    return wrapper;
  },

  inspect: function(element) {
    element =3D $(element);
    var result =3D '<' + element.tagName.toLowerCase();
    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
      var property =3D pair.first(), attribute =3D pair.last();
      var value =3D (element[property] || '').toString();
      if (value) result +=3D ' ' + attribute + '=3D' + =
value.inspect(true);
    });
    return result + '>';
  },

  recursivelyCollect: function(element, property) {
    element =3D $(element);
    var elements =3D [];
    while (element =3D element[property])
      if (element.nodeType =3D=3D 1)
        elements.push(Element.extend(element));
    return elements;
  },

  ancestors: function(element) {
    return $(element).recursivelyCollect('parentNode');
  },

  descendants: function(element) {
    return $(element).select("*");
  },

  firstDescendant: function(element) {
    element =3D $(element).firstChild;
    while (element && element.nodeType !=3D 1) element =3D =
element.nextSibling;
    return $(element);
  },

  immediateDescendants: function(element) {
    if (!(element =3D $(element).firstChild)) return [];
    while (element && element.nodeType !=3D 1) element =3D =
element.nextSibling;
    if (element) return [element].concat($(element).nextSiblings());
    return [];
  },

  previousSiblings: function(element) {
    return $(element).recursivelyCollect('previousSibling');
  },

  nextSiblings: function(element) {
    return $(element).recursivelyCollect('nextSibling');
  },

  siblings: function(element) {
    element =3D $(element);
    return =
element.previousSiblings().reverse().concat(element.nextSiblings());
  },

  match: function(element, selector) {
    if (Object.isString(selector))
      selector =3D new Selector(selector);
    return selector.match($(element));
  },

  up: function(element, expression, index) {
    element =3D $(element);
    if (arguments.length =3D=3D 1) return $(element.parentNode);
    var ancestors =3D element.ancestors();
    return Object.isNumber(expression) ? ancestors[expression] :
      Selector.findElement(ancestors, expression, index);
  },

  down: function(element, expression, index) {
    element =3D $(element);
    if (arguments.length =3D=3D 1) return element.firstDescendant();
    return Object.isNumber(expression) ? =
element.descendants()[expression] :
      element.select(expression)[index || 0];
  },

  previous: function(element, expression, index) {
    element =3D $(element);
    if (arguments.length =3D=3D 1) return =
$(Selector.handlers.previousElementSibling(element));
    var previousSiblings =3D element.previousSiblings();
    return Object.isNumber(expression) ? previousSiblings[expression] :
      Selector.findElement(previousSiblings, expression, index);
  },

  next: function(element, expression, index) {
    element =3D $(element);
    if (arguments.length =3D=3D 1) return =
$(Selector.handlers.nextElementSibling(element));
    var nextSiblings =3D element.nextSiblings();
    return Object.isNumber(expression) ? nextSiblings[expression] :
      Selector.findElement(nextSiblings, expression, index);
  },

  select: function() {
    var args =3D $A(arguments), element =3D $(args.shift());
    return Selector.findChildElements(element, args);
  },

  adjacent: function() {
    var args =3D $A(arguments), element =3D $(args.shift());
    return Selector.findChildElements(element.parentNode, =
args).without(element);
  },

  identify: function(element) {
    element =3D $(element);
    var id =3D element.readAttribute('id'), self =3D arguments.callee;
    if (id) return id;
    do { id =3D 'anonymous_element_' + self.counter++ } while ($(id));
    element.writeAttribute('id', id);
    return id;
  },

  readAttribute: function(element, name) {
    element =3D $(element);
    if (Prototype.Browser.IE) {
      var t =3D Element._attributeTranslations.read;
      if (t.values[name]) return t.values[name](element, name);
      if (t.names[name]) name =3D t.names[name];
      if (name.include(':')) {
        return (!element.attributes || !element.attributes[name]) ? null =
:
         element.attributes[name].value;
      }
    }
    return element.getAttribute(name);
  },

  writeAttribute: function(element, name, value) {
    element =3D $(element);
    var attributes =3D { }, t =3D Element._attributeTranslations.write;

    if (typeof name =3D=3D 'object') attributes =3D name;
    else attributes[name] =3D Object.isUndefined(value) ? true : value;

    for (var attr in attributes) {
      name =3D t.names[attr] || attr;
      value =3D attributes[attr];
      if (t.values[attr]) name =3D t.values[attr](element, value);
      if (value =3D=3D=3D false || value =3D=3D=3D null)
        element.removeAttribute(name);
      else if (value =3D=3D=3D true)
        element.setAttribute(name, name);
      else element.setAttribute(name, value);
    }
    return element;
  },

  getHeight: function(element) {
    return $(element).getDimensions().height;
  },

  getWidth: function(element) {
    return $(element).getDimensions().width;
  },

  classNames: function(element) {
    return new Element.ClassNames(element);
  },

  hasClassName: function(element, className) {
    if (!(element =3D $(element))) return;
    var elementClassName =3D element.className;
    return (elementClassName.length > 0 && (elementClassName =3D=3D =
className ||
      new RegExp("(^|\\s)" + className + =
"(\\s|$)").test(elementClassName)));
  },

  addClassName: function(element, className) {
    if (!(element =3D $(element))) return;
    if (!element.hasClassName(className))
      element.className +=3D (element.className ? ' ' : '') + className;
    return element;
  },

  removeClassName: function(element, className) {
    if (!(element =3D $(element))) return;
    element.className =3D element.className.replace(
      new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
    return element;
  },

  toggleClassName: function(element, className) {
    if (!(element =3D $(element))) return;
    return element[element.hasClassName(className) ?
      'removeClassName' : 'addClassName'](className);
  },

  // removes whitespace-only text node children
  cleanWhitespace: function(element) {
    element =3D $(element);
    var node =3D element.firstChild;
    while (node) {
      var nextNode =3D node.nextSibling;
      if (node.nodeType =3D=3D 3 && !/\S/.test(node.nodeValue))
        element.removeChild(node);
      node =3D nextNode;
    }
    return element;
  },

  empty: function(element) {
    return $(element).innerHTML.blank();
  },

  descendantOf: function(element, ancestor) {
    element =3D $(element), ancestor =3D $(ancestor);
    var originalAncestor =3D ancestor;

    if (element.compareDocumentPosition)
      return (element.compareDocumentPosition(ancestor) & 8) =3D=3D=3D =
8;

    if (element.sourceIndex && !Prototype.Browser.Opera) {
      var e =3D element.sourceIndex, a =3D ancestor.sourceIndex,
       nextAncestor =3D ancestor.nextSibling;
      if (!nextAncestor) {
        do { ancestor =3D ancestor.parentNode; }
        while (!(nextAncestor =3D ancestor.nextSibling) && =
ancestor.parentNode);
      }
      if (nextAncestor && nextAncestor.sourceIndex)
       return (e > a && e < nextAncestor.sourceIndex);
    }

    while (element =3D element.parentNode)
      if (element =3D=3D originalAncestor) return true;
    return false;
  },

  scrollTo: function(element) {
    element =3D $(element);
    var pos =3D element.cumulativeOffset();
    window.scrollTo(pos[0], pos[1]);
    return element;
  },

  getStyle: function(element, style) {
    element =3D $(element);
    style =3D style =3D=3D 'float' ? 'cssFloat' : style.camelize();
    var value =3D element.style[style];
    if (!value) {
      var css =3D document.defaultView.getComputedStyle(element, null);
      value =3D css ? css[style] : null;
    }
    if (style =3D=3D 'opacity') return value ? parseFloat(value) : 1.0;
    return value =3D=3D 'auto' ? null : value;
  },

  getOpacity: function(element) {
    return $(element).getStyle('opacity');
  },

  setStyle: function(element, styles) {
    element =3D $(element);
    var elementStyle =3D element.style, match;
    if (Object.isString(styles)) {
      element.style.cssText +=3D ';' + styles;
      return styles.include('opacity') ?
        element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : =
element;
    }
    for (var property in styles)
      if (property =3D=3D 'opacity') =
element.setOpacity(styles[property]);
      else
        elementStyle[(property =3D=3D 'float' || property =3D=3D =
'cssFloat') ?
          (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : =
'styleFloat') :
            property] =3D styles[property];

    return element;
  },

  setOpacity: function(element, value) {
    element =3D $(element);
    element.style.opacity =3D (value =3D=3D 1 || value =3D=3D=3D '') ? =
'' :
      (value < 0.00001) ? 0 : value;
    return element;
  },

  getDimensions: function(element) {
    element =3D $(element);
    var display =3D $(element).getStyle('display');
    if (display !=3D 'none' && display !=3D null) // Safari bug
      return {width: element.offsetWidth, height: element.offsetHeight};

    // All *Width and *Height properties give 0 on elements with display =
none,
    // so enable the element temporarily
    var els =3D element.style;
    var originalVisibility =3D els.visibility;
    var originalPosition =3D els.position;
    var originalDisplay =3D els.display;
    els.visibility =3D 'hidden';
    els.position =3D 'absolute';
    els.display =3D 'block';
    var originalWidth =3D element.clientWidth;
    var originalHeight =3D element.clientHeight;
    els.display =3D originalDisplay;
    els.position =3D originalPosition;
    els.visibility =3D originalVisibility;
    return {width: originalWidth, height: originalHeight};
  },

  makePositioned: function(element) {
    element =3D $(element);
    var pos =3D Element.getStyle(element, 'position');
    if (pos =3D=3D 'static' || !pos) {
      element._madePositioned =3D true;
      element.style.position =3D 'relative';
      // Opera returns the offset relative to the positioning context, =
when an
      // element is position relative but top and left have not been =
defined
      if (window.opera) {
        element.style.top =3D 0;
        element.style.left =3D 0;
      }
    }
    return element;
  },

  undoPositioned: function(element) {
    element =3D $(element);
    if (element._madePositioned) {
      element._madePositioned =3D undefined;
      element.style.position =3D
        element.style.top =3D
        element.style.left =3D
        element.style.bottom =3D
        element.style.right =3D '';
    }
    return element;
  },

  makeClipping: function(element) {
    element =3D $(element);
    if (element._overflow) return element;
    element._overflow =3D Element.getStyle(element, 'overflow') || =
'auto';
    if (element._overflow !=3D=3D 'hidden')
      element.style.overflow =3D 'hidden';
    return element;
  },

  undoClipping: function(element) {
    element =3D $(element);
    if (!element._overflow) return element;
    element.style.overflow =3D element._overflow =3D=3D 'auto' ? '' : =
element._overflow;
    element._overflow =3D null;
    return element;
  },

  cumulativeOffset: function(element) {
    var valueT =3D 0, valueL =3D 0;
    do {
      valueT +=3D element.offsetTop  || 0;
      valueL +=3D element.offsetLeft || 0;
      element =3D element.offsetParent;
    } while (element);
    return Element._returnOffset(valueL, valueT);
  },

  positionedOffset: function(element) {
    var valueT =3D 0, valueL =3D 0;
    do {
      valueT +=3D element.offsetTop  || 0;
      valueL +=3D element.offsetLeft || 0;
      element =3D element.offsetParent;
      if (element) {
        if (element.tagName =3D=3D 'BODY') break;
        var p =3D Element.getStyle(element, 'position');
        if (p !=3D=3D 'static') break;
      }
    } while (element);
    return Element._returnOffset(valueL, valueT);
  },

  absolutize: function(element) {
    element =3D $(element);
    if (element.getStyle('position') =3D=3D 'absolute') return;
    // Position.prepare(); // To be done manually by Scripty when it =
needs it.

    var offsets =3D element.positionedOffset();
    var top     =3D offsets[1];
    var left    =3D offsets[0];
    var width   =3D element.clientWidth;
    var height  =3D element.clientHeight;

    element._originalLeft   =3D left - parseFloat(element.style.left  || =
0);
    element._originalTop    =3D top  - parseFloat(element.style.top || =
0);
    element._originalWidth  =3D element.style.width;
    element._originalHeight =3D element.style.height;

    element.style.position =3D 'absolute';
    element.style.top    =3D top + 'px';
    element.style.left   =3D left + 'px';
    element.style.width  =3D width + 'px';
    element.style.height =3D height + 'px';
    return element;
  },

  relativize: function(element) {
    element =3D $(element);
    if (element.getStyle('position') =3D=3D 'relative') return;
    // Position.prepare(); // To be done manually by Scripty when it =
needs it.

    element.style.position =3D 'relative';
    var top  =3D parseFloat(element.style.top  || 0) - =
(element._originalTop || 0);
    var left =3D parseFloat(element.style.left || 0) - =
(element._originalLeft || 0);

    element.style.top    =3D top + 'px';
    element.style.left   =3D left + 'px';
    element.style.height =3D element._originalHeight;
    element.style.width  =3D element._originalWidth;
    return element;
  },

  cumulativeScrollOffset: function(element) {
    var valueT =3D 0, valueL =3D 0;
    do {
      valueT +=3D element.scrollTop  || 0;
      valueL +=3D element.scrollLeft || 0;
      element =3D element.parentNode;
    } while (element);
    return Element._returnOffset(valueL, valueT);
  },

  getOffsetParent: function(element) {
    if (element.offsetParent) return $(element.offsetParent);
    if (element =3D=3D document.body) return $(element);

    while ((element =3D element.parentNode) && element !=3D =
document.body)
      if (Element.getStyle(element, 'position') !=3D 'static')
        return $(element);

    return $(document.body);
  },

  viewportOffset: function(forElement) {
    var valueT =3D 0, valueL =3D 0;

    var element =3D forElement;
    do {
      valueT +=3D element.offsetTop  || 0;
      valueL +=3D element.offsetLeft || 0;

      // Safari fix
      if (element.offsetParent =3D=3D document.body &&
        Element.getStyle(element, 'position') =3D=3D 'absolute') break;

    } while (element =3D element.offsetParent);

    element =3D forElement;
    do {
      if (!Prototype.Browser.Opera || element.tagName =3D=3D 'BODY') {
        valueT -=3D element.scrollTop  || 0;
        valueL -=3D element.scrollLeft || 0;
      }
    } while (element =3D element.parentNode);

    return Element._returnOffset(valueL, valueT);
  },

  clonePosition: function(element, source) {
    var options =3D Object.extend({
      setLeft:    true,
      setTop:     true,
      setWidth:   true,
      setHeight:  true,
      offsetTop:  0,
      offsetLeft: 0
    }, arguments[2] || { });

    // find page position of source
    source =3D $(source);
    var p =3D source.viewportOffset();

    // find coordinate system to use
    element =3D $(element);
    var delta =3D [0, 0];
    var parent =3D null;
    // delta [0,0] will do fine with position: fixed elements,
    // position:absolute needs offsetParent deltas
    if (Element.getStyle(element, 'position') =3D=3D 'absolute') {
      parent =3D element.getOffsetParent();
      delta =3D parent.viewportOffset();
    }

    // correct by body offsets (fixes Safari)
    if (parent =3D=3D document.body) {
      delta[0] -=3D document.body.offsetLeft;
      delta[1] -=3D document.body.offsetTop;
    }

    // set position
    if (options.setLeft)   element.style.left  =3D (p[0] - delta[0] + =
options.offsetLeft) + 'px';
    if (options.setTop)    element.style.top   =3D (p[1] - delta[1] + =
options.offsetTop) + 'px';
    if (options.setWidth)  element.style.width =3D source.offsetWidth + =
'px';
    if (options.setHeight) element.style.height =3D source.offsetHeight =
+ 'px';
    return element;
  }
};

Element.Methods.identify.counter =3D 1;

Object.extend(Element.Methods, {
  getElementsBySelector: Element.Methods.select,
  childElements: Element.Methods.immediateDescendants
});

Element._attributeTranslations =3D {
  write: {
    names: {
      className: 'class',
      htmlFor:   'for'
    },
    values: { }
  }
};

if (Prototype.Browser.Opera) {
  Element.Methods.getStyle =3D Element.Methods.getStyle.wrap(
    function(proceed, element, style) {
      switch (style) {
        case 'left': case 'top': case 'right': case 'bottom':
          if (proceed(element, 'position') =3D=3D=3D 'static') return =
null;
        case 'height': case 'width':
          // returns '0px' for hidden elements; we want it to return =
null
          if (!Element.visible(element)) return null;

          // returns the border-box dimensions rather than the =
content-box
          // dimensions, so we subtract padding and borders from the =
value
          var dim =3D parseInt(proceed(element, style), 10);

          if (dim !=3D=3D element['offset' + style.capitalize()])
            return dim + 'px';

          var properties;
          if (style =3D=3D=3D 'height') {
            properties =3D ['border-top-width', 'padding-top',
             'padding-bottom', 'border-bottom-width'];
          }
          else {
            properties =3D ['border-left-width', 'padding-left',
             'padding-right', 'border-right-width'];
          }
          return properties.inject(dim, function(memo, property) {
            var val =3D proceed(element, property);
            return val =3D=3D=3D null ? memo : memo - parseInt(val, 10);
          }) + 'px';
        default: return proceed(element, style);
      }
    }
  );

  Element.Methods.readAttribute =3D Element.Methods.readAttribute.wrap(
    function(proceed, element, attribute) {
      if (attribute =3D=3D=3D 'title') return element.title;
      return proceed(element, attribute);
    }
  );
}

else if (Prototype.Browser.IE) {
  // IE doesn't report offsets correctly for static elements, so we =
change them
  // to "relative" to get the values, then change them back.
  Element.Methods.getOffsetParent =3D =
Element.Methods.getOffsetParent.wrap(
    function(proceed, element) {
      element =3D $(element);
      var position =3D element.getStyle('position');
      if (position !=3D=3D 'static') return proceed(element);
      element.setStyle({ position: 'relative' });
      var value =3D proceed(element);
      element.setStyle({ position: position });
      return value;
    }
  );

  $w('positionedOffset viewportOffset').each(function(method) {
    Element.Methods[method] =3D Element.Methods[method].wrap(
      function(proceed, element) {
        element =3D $(element);
        var position =3D element.getStyle('position');
        if (position !=3D=3D 'static') return proceed(element);
        // Trigger hasLayout on the offset parent so that IE6 reports
        // accurate offsetTop and offsetLeft values for position: fixed.
        var offsetParent =3D element.getOffsetParent();
        if (offsetParent && offsetParent.getStyle('position') =3D=3D=3D =
'fixed')
          offsetParent.setStyle({ zoom: 1 });
        element.setStyle({ position: 'relative' });
        var value =3D proceed(element);
        element.setStyle({ position: position });
        return value;
      }
    );
  });

  Element.Methods.getStyle =3D function(element, style) {
    element =3D $(element);
    style =3D (style =3D=3D 'float' || style =3D=3D 'cssFloat') ? =
'styleFloat' : style.camelize();
    var value =3D element.style[style];
    if (!value && element.currentStyle) value =3D =
element.currentStyle[style];

    if (style =3D=3D 'opacity') {
      if (value =3D (element.getStyle('filter') || =
'').match(/alpha\(opacity=3D(.*)\)/))
        if (value[1]) return parseFloat(value[1]) / 100;
      return 1.0;
    }

    if (value =3D=3D 'auto') {
      if ((style =3D=3D 'width' || style =3D=3D 'height') && =
(element.getStyle('display') !=3D 'none'))
        return element['offset' + style.capitalize()] + 'px';
      return null;
    }
    return value;
  };

  Element.Methods.setOpacity =3D function(element, value) {
    function stripAlpha(filter){
      return filter.replace(/alpha\([^\)]*\)/gi,'');
    }
    element =3D $(element);
    var currentStyle =3D element.currentStyle;
    if ((currentStyle && !currentStyle.hasLayout) ||
      (!currentStyle && element.style.zoom =3D=3D 'normal'))
        element.style.zoom =3D 1;

    var filter =3D element.getStyle('filter'), style =3D element.style;
    if (value =3D=3D 1 || value =3D=3D=3D '') {
      (filter =3D stripAlpha(filter)) ?
        style.filter =3D filter : style.removeAttribute('filter');
      return element;
    } else if (value < 0.00001) value =3D 0;
    style.filter =3D stripAlpha(filter) +
      'alpha(opacity=3D' + (value * 100) + ')';
    return element;
  };

  Element._attributeTranslations =3D {
    read: {
      names: {
        'class': 'className',
        'for':   'htmlFor'
      },
      values: {
        _getAttr: function(element, attribute) {
          return element.getAttribute(attribute, 2);
        },
        _getAttrNode: function(element, attribute) {
          var node =3D element.getAttributeNode(attribute);
          return node ? node.value : "";
        },
        _getEv: function(element, attribute) {
          attribute =3D element.getAttribute(attribute);
          return attribute ? attribute.toString().slice(23, -2) : null;
        },
        _flag: function(element, attribute) {
          return $(element).hasAttribute(attribute) ? attribute : null;
        },
        style: function(element) {
          return element.style.cssText.toLowerCase();
        },
        title: function(element) {
          return element.title;
        }
      }
    }
  };

  Element._attributeTranslations.write =3D {
    names: Object.extend({
      cellpadding: 'cellPadding',
      cellspacing: 'cellSpacing'
    }, Element._attributeTranslations.read.names),
    values: {
      checked: function(element, value) {
        element.checked =3D !!value;
      },

      style: function(element, value) {
        element.style.cssText =3D value ? value : '';
      }
    }
  };

  Element._attributeTranslations.has =3D {};

  $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
      'encType maxLength readOnly longDesc').each(function(attr) {
    Element._attributeTranslations.write.names[attr.toLowerCase()] =3D =
attr;
    Element._attributeTranslations.has[attr.toLowerCase()] =3D attr;
  });

  (function(v) {
    Object.extend(v, {
      href:        v._getAttr,
      src:         v._getAttr,
      type:        v._getAttr,
      action:      v._getAttrNode,
      disabled:    v._flag,
      checked:     v._flag,
      readonly:    v._flag,
      multiple:    v._flag,
      onload:      v._getEv,
      onunload:    v._getEv,
      onclick:     v._getEv,
      ondblclick:  v._getEv,
      onmousedown: v._getEv,
      onmouseup:   v._getEv,
      onmouseover: v._getEv,
      onmousemove: v._getEv,
      onmouseout:  v._getEv,
      onfocus:     v._getEv,
      onblur:      v._getEv,
      onkeypress:  v._getEv,
      onkeydown:   v._getEv,
      onkeyup:     v._getEv,
      onsubmit:    v._getEv,
      onreset:     v._getEv,
      onselect:    v._getEv,
      onchange:    v._getEv
    });
  })(Element._attributeTranslations.read.values);
}

else if (Prototype.Browser.Gecko && =
/rv:1\.8\.0/.test(navigator.userAgent)) {
  Element.Methods.setOpacity =3D function(element, value) {
    element =3D $(element);
    element.style.opacity =3D (value =3D=3D 1) ? 0.999999 :
      (value =3D=3D=3D '') ? '' : (value < 0.00001) ? 0 : value;
    return element;
  };
}

else if (Prototype.Browser.WebKit) {
  Element.Methods.setOpacity =3D function(element, value) {
    element =3D $(element);
    element.style.opacity =3D (value =3D=3D 1 || value =3D=3D=3D '') ? =
'' :
      (value < 0.00001) ? 0 : value;

    if (value =3D=3D 1)
      if(element.tagName =3D=3D 'IMG' && element.width) {
        element.width++; element.width--;
      } else try {
        var n =3D document.createTextNode(' ');
        element.appendChild(n);
        element.removeChild(n);
      } catch (e) { }

    return element;
  };

  // Safari returns margins on body which is incorrect if the child is =
absolutely
  // positioned.  For performance reasons, redefine =
Element#cumulativeOffset for
  // KHTML/WebKit only.
  Element.Methods.cumulativeOffset =3D function(element) {
    var valueT =3D 0, valueL =3D 0;
    do {
      valueT +=3D element.offsetTop  || 0;
      valueL +=3D element.offsetLeft || 0;
      if (element.offsetParent =3D=3D document.body)
        if (Element.getStyle(element, 'position') =3D=3D 'absolute') =
break;

      element =3D element.offsetParent;
    } while (element);

    return Element._returnOffset(valueL, valueT);
  };
}

if (Prototype.Browser.IE || Prototype.Browser.Opera) {
  // IE and Opera are missing .innerHTML support for TABLE-related and =
SELECT elements
  Element.Methods.update =3D function(element, content) {
    element =3D $(element);

    if (content && content.toElement) content =3D content.toElement();
    if (Object.isElement(content)) return =
element.update().insert(content);

    content =3D Object.toHTML(content);
    var tagName =3D element.tagName.toUpperCase();

    if (tagName in Element._insertionTranslations.tags) {
      $A(element.childNodes).each(function(node) { =
element.removeChild(node) });
      Element._getContentFromAnonymousElement(tagName, =
content.stripScripts())
        .each(function(node) { element.appendChild(node) });
    }
    else element.innerHTML =3D content.stripScripts();

    content.evalScripts.bind(content).defer();
    return element;
  };
}

if ('outerHTML' in document.createElement('div')) {
  Element.Methods.replace =3D function(element, content) {
    element =3D $(element);

    if (content && content.toElement) content =3D content.toElement();
    if (Object.isElement(content)) {
      element.parentNode.replaceChild(content, element);
      return element;
    }

    content =3D Object.toHTML(content);
    var parent =3D element.parentNode, tagName =3D =
parent.tagName.toUpperCase();

    if (Element._insertionTranslations.tags[tagName]) {
      var nextSibling =3D element.next();
      var fragments =3D Element._getContentFromAnonymousElement(tagName, =
content.stripScripts());
      parent.removeChild(element);
      if (nextSibling)
        fragments.each(function(node) { parent.insertBefore(node, =
nextSibling) });
      else
        fragments.each(function(node) { parent.appendChild(node) });
    }
    else element.outerHTML =3D content.stripScripts();

    content.evalScripts.bind(content).defer();
    return element;
  };
}

Element._returnOffset =3D function(l, t) {
  var result =3D [l, t];
  result.left =3D l;
  result.top =3D t;
  return result;
};

Element._getContentFromAnonymousElement =3D function(tagName, html) {
  var div =3D new Element('div'), t =3D =
Element._insertionTranslations.tags[tagName];
  if (t) {
    div.innerHTML =3D t[0] + html + t[1];
    t[2].times(function() { div =3D div.firstChild });
  } else div.innerHTML =3D html;
  return $A(div.childNodes);
};

Element._insertionTranslations =3D {
  before: function(element, node) {
    element.parentNode.insertBefore(node, element);
  },
  top: function(element, node) {
    element.insertBefore(node, element.firstChild);
  },
  bottom: function(element, node) {
    element.appendChild(node);
  },
  after: function(element, node) {
    element.parentNode.insertBefore(node, element.nextSibling);
  },
  tags: {
    TABLE:  ['<table>',                '</table>',                   1],
    TBODY:  ['<table><tbody>',         '</tbody></table>',           2],
    TR:     ['<table><tbody><tr>',     '</tr></tbody></table>',      3],
    TD:     ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
    SELECT: ['<select>',               '</select>',                  1]
  }
};

(function() {
  Object.extend(this.tags, {
    THEAD: this.tags.TBODY,
    TFOOT: this.tags.TBODY,
    TH:    this.tags.TD
  });
}).call(Element._insertionTranslations);

Element.Methods.Simulated =3D {
  hasAttribute: function(element, attribute) {
    attribute =3D Element._attributeTranslations.has[attribute] || =
attribute;
    var node =3D $(element).getAttributeNode(attribute);
    return node && node.specified;
  }
};

Element.Methods.ByTag =3D { };

Object.extend(Element, Element.Methods);

if (!Prototype.BrowserFeatures.ElementExtensions &&
    document.createElement('div').__proto__) {
  window.HTMLElement =3D { };
  window.HTMLElement.prototype =3D =
document.createElement('div').__proto__;
  Prototype.BrowserFeatures.ElementExtensions =3D true;
}

Element.extend =3D (function() {
  if (Prototype.BrowserFeatures.SpecificElementExtensions)
    return Prototype.K;

  var Methods =3D { }, ByTag =3D Element.Methods.ByTag;

  var extend =3D Object.extend(function(element) {
    if (!element || element._extendedByPrototype ||
        element.nodeType !=3D 1 || element =3D=3D window) return =
element;

    var methods =3D Object.clone(Methods),
      tagName =3D element.tagName, property, value;

    // extend methods for specific tags
    if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);

    for (property in methods) {
      value =3D methods[property];
      if (Object.isFunction(value) && !(property in element))
        element[property] =3D value.methodize();
    }

    element._extendedByPrototype =3D Prototype.emptyFunction;
    return element;

  }, {
    refresh: function() {
      // extend methods for all tags (Safari doesn't need this)
      if (!Prototype.BrowserFeatures.ElementExtensions) {
        Object.extend(Methods, Element.Methods);
        Object.extend(Methods, Element.Methods.Simulated);
      }
    }
  });

  extend.refresh();
  return extend;
})();

Element.hasAttribute =3D function(element, attribute) {
  if (element.hasAttribute) return element.hasAttribute(attribute);
  return Element.Methods.Simulated.hasAttribute(element, attribute);
};

Element.addMethods =3D function(methods) {
  var F =3D Prototype.BrowserFeatures, T =3D Element.Methods.ByTag;

  if (!methods) {
    Object.extend(Form, Form.Methods);
    Object.extend(Form.Element, Form.Element.Methods);
    Object.extend(Element.Methods.ByTag, {
      "FORM":     Object.clone(Form.Methods),
      "INPUT":    Object.clone(Form.Element.Methods),
      "SELECT":   Object.clone(Form.Element.Methods),
      "TEXTAREA": Object.clone(Form.Element.Methods)
    });
  }

  if (arguments.length =3D=3D 2) {
    var tagName =3D methods;
    methods =3D arguments[1];
  }

  if (!tagName) Object.extend(Element.Methods, methods || { });
  else {
    if (Object.isArray(tagName)) tagName.each(extend);
    else extend(tagName);
  }

  function extend(tagName) {
    tagName =3D tagName.toUpperCase();
    if (!Element.Methods.ByTag[tagName])
      Element.Methods.ByTag[tagName] =3D { };
    Object.extend(Element.Methods.ByTag[tagName], methods);
  }

  function copy(methods, destination, onlyIfAbsent) {
    onlyIfAbsent =3D onlyIfAbsent || false;
    for (var property in methods) {
      var value =3D methods[property];
      if (!Object.isFunction(value)) continue;
      if (!onlyIfAbsent || !(property in destination))
        destination[property] =3D value.methodize();
    }
  }

  function findDOMClass(tagName) {
    var klass;
    var trans =3D {
      "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
      "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": =
"DList",
      "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": =
"Heading",
      "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
      "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", =
"CAPTION":
      "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", =
"THEAD":
      "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", =
"TR":
      "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
      "FrameSet", "IFRAME": "IFrame"
    };
    if (trans[tagName]) klass =3D 'HTML' + trans[tagName] + 'Element';
    if (window[klass]) return window[klass];
    klass =3D 'HTML' + tagName + 'Element';
    if (window[klass]) return window[klass];
    klass =3D 'HTML' + tagName.capitalize() + 'Element';
    if (window[klass]) return window[klass];

    window[klass] =3D { };
    window[klass].prototype =3D =
document.createElement(tagName).__proto__;
    return window[klass];
  }

  if (F.ElementExtensions) {
    copy(Element.Methods, HTMLElement.prototype);
    copy(Element.Methods.Simulated, HTMLElement.prototype, true);
  }

  if (F.SpecificElementExtensions) {
    for (var tag in Element.Methods.ByTag) {
      var klass =3D findDOMClass(tag);
      if (Object.isUndefined(klass)) continue;
      copy(T[tag], klass.prototype);
    }
  }

  Object.extend(Element, Element.Methods);
  delete Element.ByTag;

  if (Element.extend.refresh) Element.extend.refresh();
  Element.cache =3D { };
};

document.viewport =3D {
  getDimensions: function() {
    var dimensions =3D { };
    var B =3D Prototype.Browser;
    $w('width height').each(function(d) {
      var D =3D d.capitalize();
      dimensions[d] =3D (B.WebKit && !document.evaluate) ? self['inner' =
+ D] :
        (B.Opera) ? document.body['client' + D] : =
document.documentElement['client' + D];
    });
    return dimensions;
  },

  getWidth: function() {
    return this.getDimensions().width;
  },

  getHeight: function() {
    return this.getDimensions().height;
  },

  getScrollOffsets: function() {
    return Element._returnOffset(
      window.pageXOffset || document.documentElement.scrollLeft || =
document.body.scrollLeft,
      window.pageYOffset || document.documentElement.scrollTop || =
document.body.scrollTop);
  }
};
/* Portions of the Selector class are derived from Jack Slocum=92s =
DomQuery,
 * part of YUI-Ext version 0.40, distributed under the terms of an =
MIT-style
 * license.  Please see http://www.yui-ext.com/ for more information. */

var Selector =3D Class.create({
  initialize: function(expression) {
    this.expression =3D expression.strip();
    this.compileMatcher();
  },

  shouldUseXPath: function() {
    if (!Prototype.BrowserFeatures.XPath) return false;

    var e =3D this.expression;

    // Safari 3 chokes on :*-of-type and :empty
    if (Prototype.Browser.WebKit &&
     (e.include("-of-type") || e.include(":empty")))
      return false;

    // XPath can't do namespaced attributes, nor can it read
    // the "checked" property from DOM nodes
    if ((/(\[[\w-]*?:|:checked)/).test(this.expression))
      return false;

    return true;
  },

  compileMatcher: function() {
    if (this.shouldUseXPath())
      return this.compileXPathMatcher();

    var e =3D this.expression, ps =3D Selector.patterns, h =3D =
Selector.handlers,
        c =3D Selector.criteria, le, p, m;

    if (Selector._cache[e]) {
      this.matcher =3D Selector._cache[e];
      return;
    }

    this.matcher =3D ["this.matcher =3D function(root) {",
                    "var r =3D root, h =3D Selector.handlers, c =3D =
false, n;"];

    while (e && le !=3D e && (/\S/).test(e)) {
      le =3D e;
      for (var i in ps) {
        p =3D ps[i];
        if (m =3D e.match(p)) {
          this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
    	      new Template(c[i]).evaluate(m));
          e =3D e.replace(m[0], '');
          break;
        }
      }
    }

    this.matcher.push("return h.unique(n);\n}");
    eval(this.matcher.join('\n'));
    Selector._cache[this.expression] =3D this.matcher;
  },

  compileXPathMatcher: function() {
    var e =3D this.expression, ps =3D Selector.patterns,
        x =3D Selector.xpath, le, m;

    if (Selector._cache[e]) {
      this.xpath =3D Selector._cache[e]; return;
    }

    this.matcher =3D ['.//*'];
    while (e && le !=3D e && (/\S/).test(e)) {
      le =3D e;
      for (var i in ps) {
        if (m =3D e.match(ps[i])) {
          this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
            new Template(x[i]).evaluate(m));
          e =3D e.replace(m[0], '');
          break;
        }
      }
    }

    this.xpath =3D this.matcher.join('');
    Selector._cache[this.expression] =3D this.xpath;
  },

  findElements: function(root) {
    root =3D root || document;
    if (this.xpath) return document._getElementsByXPath(this.xpath, =
root);
    return this.matcher(root);
  },

  match: function(element) {
    this.tokens =3D [];

    var e =3D this.expression, ps =3D Selector.patterns, as =3D =
Selector.assertions;
    var le, p, m;

    while (e && le !=3D=3D e && (/\S/).test(e)) {
      le =3D e;
      for (var i in ps) {
        p =3D ps[i];
        if (m =3D e.match(p)) {
          // use the Selector.assertions methods unless the selector
          // is too complex.
          if (as[i]) {
            this.tokens.push([i, Object.clone(m)]);
            e =3D e.replace(m[0], '');
          } else {
            // reluctantly do a document-wide search
            // and look for a match in the array
            return this.findElements(document).include(element);
          }
        }
      }
    }

    var match =3D true, name, matches;
    for (var i =3D 0, token; token =3D this.tokens[i]; i++) {
      name =3D token[0], matches =3D token[1];
      if (!Selector.assertions[name](element, matches)) {
        match =3D false; break;
      }
    }

    return match;
  },

  toString: function() {
    return this.expression;
  },

  inspect: function() {
    return "#<Selector:" + this.expression.inspect() + ">";
  }
});

Object.extend(Selector, {
  _cache: { },

  xpath: {
    descendant:   "//*",
    child:        "/*",
    adjacent:     "/following-sibling::*[1]",
    laterSibling: '/following-sibling::*',
    tagName:      function(m) {
      if (m[1] =3D=3D '*') return '';
      return "[local-name()=3D'" + m[1].toLowerCase() +
             "' or local-name()=3D'" + m[1].toUpperCase() + "']";
    },
    className:    "[contains(concat(' ', @class, ' '), ' #{1} ')]",
    id:           "[@id=3D'#{1}']",
    attrPresence: function(m) {
      m[1] =3D m[1].toLowerCase();
      return new Template("[@#{1}]").evaluate(m);
    },
    attr: function(m) {
      m[1] =3D m[1].toLowerCase();
      m[3] =3D m[5] || m[6];
      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
    },
    pseudo: function(m) {
      var h =3D Selector.xpath.pseudos[m[1]];
      if (!h) return '';
      if (Object.isFunction(h)) return h(m);
      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
    },
    operators: {
      '=3D':  "[@#{1}=3D'#{3}']",
      '!=3D': "[@#{1}!=3D'#{3}']",
      '^=3D': "[starts-with(@#{1}, '#{3}')]",
      '$=3D': "[substring(@#{1}, (string-length(@#{1}) - =
string-length('#{3}') + 1))=3D'#{3}']",
      '*=3D': "[contains(@#{1}, '#{3}')]",
      '~=3D': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
      '|=3D': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
    },
    pseudos: {
      'first-child': '[not(preceding-sibling::*)]',
      'last-child':  '[not(following-sibling::*)]',
      'only-child':  '[not(preceding-sibling::* or =
following-sibling::*)]',
      'empty':       "[count(*) =3D 0 and (count(text()) =3D 0 or =
translate(text(), ' \t\r\n', '') =3D '')]",
      'checked':     "[@checked]",
      'disabled':    "[@disabled]",
      'enabled':     "[not(@disabled)]",
      'not': function(m) {
        var e =3D m[6], p =3D Selector.patterns,
            x =3D Selector.xpath, le, v;

        var exclusion =3D [];
        while (e && le !=3D e && (/\S/).test(e)) {
          le =3D e;
          for (var i in p) {
            if (m =3D e.match(p[i])) {
              v =3D Object.isFunction(x[i]) ? x[i](m) : new =
Template(x[i]).evaluate(m);
              exclusion.push("(" + v.substring(1, v.length - 1) + ")");
              e =3D e.replace(m[0], '');
              break;
            }
          }
        }
        return "[not(" + exclusion.join(" and ") + ")]";
      },
      'nth-child':      function(m) {
        return =
Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
      },
      'nth-last-child': function(m) {
        return =
Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
      },
      'nth-of-type':    function(m) {
        return Selector.xpath.pseudos.nth("position() ", m);
      },
      'nth-last-of-type': function(m) {
        return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", =
m);
      },
      'first-of-type':  function(m) {
        m[6] =3D "1"; return Selector.xpath.pseudos['nth-of-type'](m);
      },
      'last-of-type':   function(m) {
        m[6] =3D "1"; return =
Selector.xpath.pseudos['nth-last-of-type'](m);
      },
      'only-of-type':   function(m) {
        var p =3D Selector.xpath.pseudos; return p['first-of-type'](m) + =
p['last-of-type'](m);
      },
      nth: function(fragment, m) {
        var mm, formula =3D m[6], predicate;
        if (formula =3D=3D 'even') formula =3D '2n+0';
        if (formula =3D=3D 'odd')  formula =3D '2n+1';
        if (mm =3D formula.match(/^(\d+)$/)) // digit only
          return '[' + fragment + "=3D " + mm[1] + ']';
        if (mm =3D formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
          if (mm[1] =3D=3D "-") mm[1] =3D -1;
          var a =3D mm[1] ? Number(mm[1]) : 1;
          var b =3D mm[2] ? Number(mm[2]) : 0;
          predicate =3D "[((#{fragment} - #{b}) mod #{a} =3D 0) and " +
          "((#{fragment} - #{b}) div #{a} >=3D 0)]";
          return new Template(predicate).evaluate({
            fragment: fragment, a: a, b: b });
        }
      }
    }
  },

  criteria: {
    tagName:      'n =3D h.tagName(n, r, "#{1}", c);      c =3D false;',
    className:    'n =3D h.className(n, r, "#{1}", c);    c =3D false;',
    id:           'n =3D h.id(n, r, "#{1}", c);           c =3D false;',
    attrPresence: 'n =3D h.attrPresence(n, r, "#{1}", c); c =3D false;',
    attr: function(m) {
      m[3] =3D (m[5] || m[6]);
      return new Template('n =3D h.attr(n, r, "#{1}", "#{3}", "#{2}", =
c); c =3D false;').evaluate(m);
    },
    pseudo: function(m) {
      if (m[6]) m[6] =3D m[6].replace(/"/g, '\\"');
      return new Template('n =3D h.pseudo(n, "#{1}", "#{6}", r, c); c =
=3D false;').evaluate(m);
    },
    descendant:   'c =3D "descendant";',
    child:        'c =3D "child";',
    adjacent:     'c =3D "adjacent";',
    laterSibling: 'c =3D "laterSibling";'
  },

  patterns: {
    // combinators must be listed first
    // (and descendant needs to be last combinator)
    laterSibling: /^\s*~\s*/,
    child:        /^\s*>\s*/,
    adjacent:     /^\s*\+\s*/,
    descendant:   /^\s/,

    // selectors follow
    tagName:      /^\s*(\*|[\w\-]+)(\b|$)?/,
    id:           /^#([\w\-\*]+)(\b|$)/,
    className:    /^\.([\w\-\*]+)(\b|$)/,
    pseudo:
/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis=
)abled|not)(\((.*?)\))?(\b|$|(?=3D\s|[:+~>]))/,
    attrPresence: /^\[([\w]+)\]/,
    attr:         =
/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=3D)\s*((['"])([^\4]*?)\4|([^'"][^=
\]]*?)))?\]/
  },

  // for Selector.match and Element#match
  assertions: {
    tagName: function(element, matches) {
      return matches[1].toUpperCase() =3D=3D =
element.tagName.toUpperCase();
    },

    className: function(element, matches) {
      return Element.hasClassName(element, matches[1]);
    },

    id: function(element, matches) {
      return element.id =3D=3D=3D matches[1];
    },

    attrPresence: function(element, matches) {
      return Element.hasAttribute(element, matches[1]);
    },

    attr: function(element, matches) {
      var nodeValue =3D Element.readAttribute(element, matches[1]);
      return nodeValue && Selector.operators[matches[2]](nodeValue, =
matches[5] || matches[6]);
    }
  },

  handlers: {
    // UTILITY FUNCTIONS
    // joins two collections
    concat: function(a, b) {
      for (var i =3D 0, node; node =3D b[i]; i++)
        a.push(node);
      return a;
    },

    // marks an array of nodes for counting
    mark: function(nodes) {
      var _true =3D Prototype.emptyFunction;
      for (var i =3D 0, node; node =3D nodes[i]; i++)
        node._countedByPrototype =3D _true;
      return nodes;
    },

    unmark: function(nodes) {
      for (var i =3D 0, node; node =3D nodes[i]; i++)
        node._countedByPrototype =3D undefined;
      return nodes;
    },

    // mark each child node with its position (for nth calls)
    // "ofType" flag indicates whether we're indexing for nth-of-type
    // rather than nth-child
    index: function(parentNode, reverse, ofType) {
      parentNode._countedByPrototype =3D Prototype.emptyFunction;
      if (reverse) {
        for (var nodes =3D parentNode.childNodes, i =3D nodes.length - =
1, j =3D 1; i >=3D 0; i--) {
          var node =3D nodes[i];
          if (node.nodeType =3D=3D 1 && (!ofType || =
node._countedByPrototype)) node.nodeIndex =3D j++;
        }
      } else {
        for (var i =3D 0, j =3D 1, nodes =3D parentNode.childNodes; node =
=3D nodes[i]; i++)
          if (node.nodeType =3D=3D 1 && (!ofType || =
node._countedByPrototype)) node.nodeIndex =3D j++;
      }
    },

    // filters out duplicates and extends all nodes
    unique: function(nodes) {
      if (nodes.length =3D=3D 0) return nodes;
      var results =3D [], n;
      for (var i =3D 0, l =3D nodes.length; i < l; i++)
        if (!(n =3D nodes[i])._countedByPrototype) {
          n._countedByPrototype =3D Prototype.emptyFunction;
          results.push(Element.extend(n));
        }
      return Selector.handlers.unmark(results);
    },

    // COMBINATOR FUNCTIONS
    descendant: function(nodes) {
      var h =3D Selector.handlers;
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)
        h.concat(results, node.getElementsByTagName('*'));
      return results;
    },

    child: function(nodes) {
      var h =3D Selector.handlers;
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {
        for (var j =3D 0, child; child =3D node.childNodes[j]; j++)
          if (child.nodeType =3D=3D 1 && child.tagName !=3D '!') =
results.push(child);
      }
      return results;
    },

    adjacent: function(nodes) {
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {
        var next =3D this.nextElementSibling(node);
        if (next) results.push(next);
      }
      return results;
    },

    laterSibling: function(nodes) {
      var h =3D Selector.handlers;
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)
        h.concat(results, Element.nextSiblings(node));
      return results;
    },

    nextElementSibling: function(node) {
      while (node =3D node.nextSibling)
	      if (node.nodeType =3D=3D 1) return node;
      return null;
    },

    previousElementSibling: function(node) {
      while (node =3D node.previousSibling)
        if (node.nodeType =3D=3D 1) return node;
      return null;
    },

    // TOKEN FUNCTIONS
    tagName: function(nodes, root, tagName, combinator) {
      var uTagName =3D tagName.toUpperCase();
      var results =3D [], h =3D Selector.handlers;
      if (nodes) {
        if (combinator) {
          // fastlane for ordinary descendant combinators
          if (combinator =3D=3D "descendant") {
            for (var i =3D 0, node; node =3D nodes[i]; i++)
              h.concat(results, node.getElementsByTagName(tagName));
            return results;
          } else nodes =3D this[combinator](nodes);
          if (tagName =3D=3D "*") return nodes;
        }
        for (var i =3D 0, node; node =3D nodes[i]; i++)
          if (node.tagName.toUpperCase() =3D=3D=3D uTagName) =
results.push(node);
        return results;
      } else return root.getElementsByTagName(tagName);
    },

    id: function(nodes, root, id, combinator) {
      var targetNode =3D $(id), h =3D Selector.handlers;
      if (!targetNode) return [];
      if (!nodes && root =3D=3D document) return [targetNode];
      if (nodes) {
        if (combinator) {
          if (combinator =3D=3D 'child') {
            for (var i =3D 0, node; node =3D nodes[i]; i++)
              if (targetNode.parentNode =3D=3D node) return =
[targetNode];
          } else if (combinator =3D=3D 'descendant') {
            for (var i =3D 0, node; node =3D nodes[i]; i++)
              if (Element.descendantOf(targetNode, node)) return =
[targetNode];
          } else if (combinator =3D=3D 'adjacent') {
            for (var i =3D 0, node; node =3D nodes[i]; i++)
              if (Selector.handlers.previousElementSibling(targetNode) =
=3D=3D node)
                return [targetNode];
          } else nodes =3D h[combinator](nodes);
        }
        for (var i =3D 0, node; node =3D nodes[i]; i++)
          if (node =3D=3D targetNode) return [targetNode];
        return [];
      }
      return (targetNode && Element.descendantOf(targetNode, root)) ? =
[targetNode] : [];
    },

    className: function(nodes, root, className, combinator) {
      if (nodes && combinator) nodes =3D this[combinator](nodes);
      return Selector.handlers.byClassName(nodes, root, className);
    },

    byClassName: function(nodes, root, className) {
      if (!nodes) nodes =3D Selector.handlers.descendant([root]);
      var needle =3D ' ' + className + ' ';
      for (var i =3D 0, results =3D [], node, nodeClassName; node =3D =
nodes[i]; i++) {
        nodeClassName =3D node.className;
        if (nodeClassName.length =3D=3D 0) continue;
        if (nodeClassName =3D=3D className || (' ' + nodeClassName + ' =
').include(needle))
          results.push(node);
      }
      return results;
    },

    attrPresence: function(nodes, root, attr, combinator) {
      if (!nodes) nodes =3D root.getElementsByTagName("*");
      if (nodes && combinator) nodes =3D this[combinator](nodes);
      var results =3D [];
      for (var i =3D 0, node; node =3D nodes[i]; i++)
        if (Element.hasAttribute(node, attr)) results.push(node);
      return results;
    },

    attr: function(nodes, root, attr, value, operator, combinator) {
      if (!nodes) nodes =3D root.getElementsByTagName("*");
      if (nodes && combinator) nodes =3D this[combinator](nodes);
      var handler =3D Selector.operators[operator], results =3D [];
      for (var i =3D 0, node; node =3D nodes[i]; i++) {
        var nodeValue =3D Element.readAttribute(node, attr);
        if (nodeValue =3D=3D=3D null) continue;
        if (handler(nodeValue, value)) results.push(node);
      }
      return results;
    },

    pseudo: function(nodes, name, value, root, combinator) {
      if (nodes && combinator) nodes =3D this[combinator](nodes);
      if (!nodes) nodes =3D root.getElementsByTagName("*");
      return Selector.pseudos[name](nodes, value, root);
    }
  },

  pseudos: {
    'first-child': function(nodes, value, root) {
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {
        if (Selector.handlers.previousElementSibling(node)) continue;
          results.push(node);
      }
      return results;
    },
    'last-child': function(nodes, value, root) {
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {
        if (Selector.handlers.nextElementSibling(node)) continue;
          results.push(node);
      }
      return results;
    },
    'only-child': function(nodes, value, root) {
      var h =3D Selector.handlers;
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)
        if (!h.previousElementSibling(node) && =
!h.nextElementSibling(node))
          results.push(node);
      return results;
    },
    'nth-child':        function(nodes, formula, root) {
      return Selector.pseudos.nth(nodes, formula, root);
    },
    'nth-last-child':   function(nodes, formula, root) {
      return Selector.pseudos.nth(nodes, formula, root, true);
    },
    'nth-of-type':      function(nodes, formula, root) {
      return Selector.pseudos.nth(nodes, formula, root, false, true);
    },
    'nth-last-of-type': function(nodes, formula, root) {
      return Selector.pseudos.nth(nodes, formula, root, true, true);
    },
    'first-of-type':    function(nodes, formula, root) {
      return Selector.pseudos.nth(nodes, "1", root, false, true);
    },
    'last-of-type':     function(nodes, formula, root) {
      return Selector.pseudos.nth(nodes, "1", root, true, true);
    },
    'only-of-type':     function(nodes, formula, root) {
      var p =3D Selector.pseudos;
      return p['last-of-type'](p['first-of-type'](nodes, formula, root), =
formula, root);
    },

    // handles the an+b logic
    getIndices: function(a, b, total) {
      if (a =3D=3D 0) return b > 0 ? [b] : [];
      return $R(1, total).inject([], function(memo, i) {
        if (0 =3D=3D (i - b) % a && (i - b) / a >=3D 0) memo.push(i);
        return memo;
      });
    },

    // handles nth(-last)-child, nth(-last)-of-type, and =
(first|last)-of-type
    nth: function(nodes, formula, root, reverse, ofType) {
      if (nodes.length =3D=3D 0) return [];
      if (formula =3D=3D 'even') formula =3D '2n+0';
      if (formula =3D=3D 'odd')  formula =3D '2n+1';
      var h =3D Selector.handlers, results =3D [], indexed =3D [], m;
      h.mark(nodes);
      for (var i =3D 0, node; node =3D nodes[i]; i++) {
        if (!node.parentNode._countedByPrototype) {
          h.index(node.parentNode, reverse, ofType);
          indexed.push(node.parentNode);
        }
      }
      if (formula.match(/^\d+$/)) { // just a number
        formula =3D Number(formula);
        for (var i =3D 0, node; node =3D nodes[i]; i++)
          if (node.nodeIndex =3D=3D formula) results.push(node);
      } else if (m =3D formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // =
an+b
        if (m[1] =3D=3D "-") m[1] =3D -1;
        var a =3D m[1] ? Number(m[1]) : 1;
        var b =3D m[2] ? Number(m[2]) : 0;
        var indices =3D Selector.pseudos.getIndices(a, b, nodes.length);
        for (var i =3D 0, node, l =3D indices.length; node =3D nodes[i]; =
i++) {
          for (var j =3D 0; j < l; j++)
            if (node.nodeIndex =3D=3D indices[j]) results.push(node);
        }
      }
      h.unmark(nodes);
      h.unmark(indexed);
      return results;
    },

    'empty': function(nodes, value, root) {
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {
        // IE treats comments as element nodes
        if (node.tagName =3D=3D '!' || (node.firstChild && =
!node.innerHTML.match(/^\s*$/))) continue;
        results.push(node);
      }
      return results;
    },

    'not': function(nodes, selector, root) {
      var h =3D Selector.handlers, selectorType, m;
      var exclusions =3D new Selector(selector).findElements(root);
      h.mark(exclusions);
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)
        if (!node._countedByPrototype) results.push(node);
      h.unmark(exclusions);
      return results;
    },

    'enabled': function(nodes, value, root) {
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)
        if (!node.disabled) results.push(node);
      return results;
    },

    'disabled': function(nodes, value, root) {
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)
        if (node.disabled) results.push(node);
      return results;
    },

    'checked': function(nodes, value, root) {
      for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)
        if (node.checked) results.push(node);
      return results;
    }
  },

  operators: {
    '=3D':  function(nv, v) { return nv =3D=3D v; },
    '!=3D': function(nv, v) { return nv !=3D v; },
    '^=3D': function(nv, v) { return nv.startsWith(v); },
    '$=3D': function(nv, v) { return nv.endsWith(v); },
    '*=3D': function(nv, v) { return nv.include(v); },
    '~=3D': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + =
' '); },
    '|=3D': function(nv, v) { return ('-' + nv.toUpperCase() + =
'-').include('-' + v.toUpperCase() + '-'); }
  },

  split: function(expression) {
    var expressions =3D [];
    expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, =
function(m) {
      expressions.push(m[1].strip());
    });
    return expressions;
  },

  matchElements: function(elements, expression) {
    var matches =3D $$(expression), h =3D Selector.handlers;
    h.mark(matches);
    for (var i =3D 0, results =3D [], element; element =3D elements[i]; =
i++)
      if (element._countedByPrototype) results.push(element);
    h.unmark(matches);
    return results;
  },

  findElement: function(elements, expression, index) {
    if (Object.isNumber(expression)) {
      index =3D expression; expression =3D false;
    }
    return Selector.matchElements(elements, expression || '*')[index || =
0];
  },

  findChildElements: function(element, expressions) {
    expressions =3D Selector.split(expressions.join(','));
    var results =3D [], h =3D Selector.handlers;
    for (var i =3D 0, l =3D expressions.length, selector; i < l; i++) {
      selector =3D new Selector(expressions[i].strip());
      h.concat(results, selector.findElements(element));
    }
    return (l > 1) ? h.unique(results) : results;
  }
});

if (Prototype.Browser.IE) {
  Object.extend(Selector.handlers, {
    // IE returns comment nodes on getElementsByTagName("*").
    // Filter them out.
    concat: function(a, b) {
      for (var i =3D 0, node; node =3D b[i]; i++)
        if (node.tagName !=3D=3D "!") a.push(node);
      return a;
    },

    // IE improperly serializes _countedByPrototype in =
(inner|outer)HTML.
    unmark: function(nodes) {
      for (var i =3D 0, node; node =3D nodes[i]; i++)
        node.removeAttribute('_countedByPrototype');
      return nodes;
    }
  });
}

function $$() {
  return Selector.findChildElements(document, $A(arguments));
}
var Form =3D {
  reset: function(form) {
    $(form).reset();
    return form;
  },

  serializeElements: function(elements, options) {
    if (typeof options !=3D 'object') options =3D { hash: !!options };
    else if (Object.isUndefined(options.hash)) options.hash =3D true;
    var key, value, submitted =3D false, submit =3D options.submit;

    var data =3D elements.inject({ }, function(result, element) {
      if (!element.disabled && element.name) {
        key =3D element.name; value =3D $(element).getValue();
        if (value !=3D null && (element.type !=3D 'submit' || =
(!submitted &&
            submit !=3D=3D false && (!submit || key =3D=3D submit) && =
(submitted =3D true)))) {
          if (key in result) {
            // a key is already present; construct an array of values
            if (!Object.isArray(result[key])) result[key] =3D =
[result[key]];
            result[key].push(value);
          }
          else result[key] =3D value;
        }
      }
      return result;
    });

    return options.hash ? data : Object.toQueryString(data);
  }
};

Form.Methods =3D {
  serialize: function(form, options) {
    return Form.serializeElements(Form.getElements(form), options);
  },

  getElements: function(form) {
    return $A($(form).getElementsByTagName('*')).inject([],
      function(elements, child) {
        if (Form.Element.Serializers[child.tagName.toLowerCase()])
          elements.push(Element.extend(child));
        return elements;
      }
    );
  },

  getInputs: function(form, typeName, name) {
    form =3D $(form);
    var inputs =3D form.getElementsByTagName('input');

    if (!typeName && !name) return $A(inputs).map(Element.extend);

    for (var i =3D 0, matchingInputs =3D [], length =3D inputs.length; i =
< length; i++) {
      var input =3D inputs[i];
      if ((typeName && input.type !=3D typeName) || (name && input.name =
!=3D name))
        continue;
      matchingInputs.push(Element.extend(input));
    }

    return matchingInputs;
  },

  disable: function(form) {
    form =3D $(form);
    Form.getElements(form).invoke('disable');
    return form;
  },

  enable: function(form) {
    form =3D $(form);
    Form.getElements(form).invoke('enable');
    return form;
  },

  findFirstElement: function(form) {
    var elements =3D $(form).getElements().findAll(function(element) {
      return 'hidden' !=3D element.type && !element.disabled;
    });
    var firstByIndex =3D elements.findAll(function(element) {
      return element.hasAttribute('tabIndex') && element.tabIndex >=3D =
0;
    }).sortBy(function(element) { return element.tabIndex }).first();

    return firstByIndex ? firstByIndex : elements.find(function(element) =
{
      return ['input', 'select', =
'textarea'].include(element.tagName.toLowerCase());
    });
  },

  focusFirstElement: function(form) {
    form =3D $(form);
    form.findFirstElement().activate();
    return form;
  },

  request: function(form, options) {
    form =3D $(form), options =3D Object.clone(options || { });

    var params =3D options.parameters, action =3D =
form.readAttribute('action') || '';
    if (action.blank()) action =3D window.location.href;
    options.parameters =3D form.serialize(true);

    if (params) {
      if (Object.isString(params)) params =3D params.toQueryParams();
      Object.extend(options.parameters, params);
    }

    if (form.hasAttribute('method') && !options.method)
      options.method =3D form.method;

    return new Ajax.Request(action, options);
  }
};

/*-----------------------------------------------------------------------=
---*/

Form.Element =3D {
  focus: function(element) {
    $(element).focus();
    return element;
  },

  select: function(element) {
    $(element).select();
    return element;
  }
};

Form.Element.Methods =3D {
  serialize: function(element) {
    element =3D $(element);
    if (!element.disabled && element.name) {
      var value =3D element.getValue();
      if (value !=3D undefined) {
        var pair =3D { };
        pair[element.name] =3D value;
        return Object.toQueryString(pair);
      }
    }
    return '';
  },

  getValue: function(element) {
    element =3D $(element);
    var method =3D element.tagName.toLowerCase();
    return Form.Element.Serializers[method](element);
  },

  setValue: function(element, value) {
    element =3D $(element);
    var method =3D element.tagName.toLowerCase();
    Form.Element.Serializers[method](element, value);
    return element;
  },

  clear: function(element) {
    $(element).value =3D '';
    return element;
  },

  present: function(element) {
    return $(element).value !=3D '';
  },

  activate: function(element) {
    element =3D $(element);
    try {
      element.focus();
      if (element.select && (element.tagName.toLowerCase() !=3D 'input' =
||
          !['button', 'reset', 'submit'].include(element.type)))
        element.select();
    } catch (e) { }
    return element;
  },

  disable: function(element) {
    element =3D $(element);
    element.blur();
    element.disabled =3D true;
    return element;
  },

  enable: function(element) {
    element =3D $(element);
    element.disabled =3D false;
    return element;
  }
};

/*-----------------------------------------------------------------------=
---*/

var Field =3D Form.Element;
var $F =3D Form.Element.Methods.getValue;

/*-----------------------------------------------------------------------=
---*/

Form.Element.Serializers =3D {
  input: function(element, value) {
    switch (element.type.toLowerCase()) {
      case 'checkbox':
      case 'radio':
        return Form.Element.Serializers.inputSelector(element, value);
      default:
        return Form.Element.Serializers.textarea(element, value);
    }
  },

  inputSelector: function(element, value) {
    if (Object.isUndefined(value)) return element.checked ? =
element.value : null;
    else element.checked =3D !!value;
  },

  textarea: function(element, value) {
    if (Object.isUndefined(value)) return element.value;
    else element.value =3D value;
  },

  select: function(element, index) {
    if (Object.isUndefined(index))
      return this[element.type =3D=3D 'select-one' ?
        'selectOne' : 'selectMany'](element);
    else {
      var opt, value, single =3D !Object.isArray(index);
      for (var i =3D 0, length =3D element.length; i < length; i++) {
        opt =3D element.options[i];
        value =3D this.optionValue(opt);
        if (single) {
          if (value =3D=3D index) {
            opt.selected =3D true;
            return;
          }
        }
        else opt.selected =3D index.include(value);
      }
    }
  },

  selectOne: function(element) {
    var index =3D element.selectedIndex;
    return index >=3D 0 ? this.optionValue(element.options[index]) : =
null;
  },

  selectMany: function(element) {
    var values, length =3D element.length;
    if (!length) return null;

    for (var i =3D 0, values =3D []; i < length; i++) {
      var opt =3D element.options[i];
      if (opt.selected) values.push(this.optionValue(opt));
    }
    return values;
  },

  optionValue: function(opt) {
    // extend element because hasAttribute may not be native
    return Element.extend(opt).hasAttribute('value') ? opt.value : =
opt.text;
  }
};

/*-----------------------------------------------------------------------=
---*/

Abstract.TimedObserver =3D Class.create(PeriodicalExecuter, {
  initialize: function($super, element, frequency, callback) {
    $super(callback, frequency);
    this.element   =3D $(element);
    this.lastValue =3D this.getValue();
  },

  execute: function() {
    var value =3D this.getValue();
    if (Object.isString(this.lastValue) && Object.isString(value) ?
        this.lastValue !=3D value : String(this.lastValue) !=3D =
String(value)) {
      this.callback(this.element, value);
      this.lastValue =3D value;
    }
  }
});

Form.Element.Observer =3D Class.create(Abstract.TimedObserver, {
  getValue: function() {
    return Form.Element.getValue(this.element);
  }
});

Form.Observer =3D Class.create(Abstract.TimedObserver, {
  getValue: function() {
    return Form.serialize(this.element);
  }
});

/*-----------------------------------------------------------------------=
---*/

Abstract.EventObserver =3D Class.create({
  initialize: function(element, callback) {
    this.element  =3D $(element);
    this.callback =3D callback;

    this.lastValue =3D this.getValue();
    if (this.element.tagName.toLowerCase() =3D=3D 'form')
      this.registerFormCallbacks();
    else
      this.registerCallback(this.element);
  },

  onElementEvent: function() {
    var value =3D this.getValue();
    if (this.lastValue !=3D value) {
      this.callback(this.element, value);
      this.lastValue =3D value;
    }
  },

  registerFormCallbacks: function() {
    Form.getElements(this.element).each(this.registerCallback, this);
  },

  registerCallback: function(element) {
    if (element.type) {
      switch (element.type.toLowerCase()) {
        case 'checkbox':
        case 'radio':
          Event.observe(element, 'click', =
this.onElementEvent.bind(this));
          break;
        default:
          Event.observe(element, 'change', =
this.onElementEvent.bind(this));
          break;
      }
    }
  }
});

Form.Element.EventObserver =3D Class.create(Abstract.EventObserver, {
  getValue: function() {
    return Form.Element.getValue(this.element);
  }
});

Form.EventObserver =3D Class.create(Abstract.EventObserver, {
  getValue: function() {
    return Form.serialize(this.element);
  }
});
if (!window.Event) var Event =3D { };

Object.extend(Event, {
  KEY_BACKSPACE: 8,
  KEY_TAB:       9,
  KEY_RETURN:   13,
  KEY_ESC:      27,
  KEY_LEFT:     37,
  KEY_UP:       38,
  KEY_RIGHT:    39,
  KEY_DOWN:     40,
  KEY_DELETE:   46,
  KEY_HOME:     36,
  KEY_END:      35,
  KEY_PAGEUP:   33,
  KEY_PAGEDOWN: 34,
  KEY_INSERT:   45,

  cache: { },

  relatedTarget: function(event) {
    var element;
    switch(event.type) {
      case 'mouseover': element =3D event.fromElement; break;
      case 'mouseout':  element =3D event.toElement;   break;
      default: return null;
    }
    return Element.extend(element);
  }
});

Event.Methods =3D (function() {
  var isButton;

  if (Prototype.Browser.IE) {
    var buttonMap =3D { 0: 1, 1: 4, 2: 2 };
    isButton =3D function(event, code) {
      return event.button =3D=3D buttonMap[code];
    };

  } else if (Prototype.Browser.WebKit) {
    isButton =3D function(event, code) {
      switch (code) {
        case 0: return event.which =3D=3D 1 && !event.metaKey;
        case 1: return event.which =3D=3D 1 && event.metaKey;
        default: return false;
      }
    };

  } else {
    isButton =3D function(event, code) {
      return event.which ? (event.which =3D=3D=3D code + 1) : =
(event.button =3D=3D=3D code);
    };
  }

  return {
    isLeftClick:   function(event) { return isButton(event, 0) },
    isMiddleClick: function(event) { return isButton(event, 1) },
    isRightClick:  function(event) { return isButton(event, 2) },

    element: function(event) {
      var node =3D Event.extend(event).target;
      return Element.extend(node.nodeType =3D=3D Node.TEXT_NODE ? =
node.parentNode : node);
    },

    findElement: function(event, expression) {
      var element =3D Event.element(event);
      if (!expression) return element;
      var elements =3D [element].concat(element.ancestors());
      return Selector.findElement(elements, expression, 0);
    },

    pointer: function(event) {
      return {
        x: event.pageX || (event.clientX +
          (document.documentElement.scrollLeft || =
document.body.scrollLeft)),
        y: event.pageY || (event.clientY +
          (document.documentElement.scrollTop || =
document.body.scrollTop))
      };
    },

    pointerX: function(event) { return Event.pointer(event).x },
    pointerY: function(event) { return Event.pointer(event).y },

    stop: function(event) {
      Event.extend(event);
      event.preventDefault();
      event.stopPropagation();
      event.stopped =3D true;
    }
  };
})();

Event.extend =3D (function() {
  var methods =3D Object.keys(Event.Methods).inject({ }, function(m, =
name) {
    m[name] =3D Event.Methods[name].methodize();
    return m;
  });

  if (Prototype.Browser.IE) {
    Object.extend(methods, {
      stopPropagation: function() { this.cancelBubble =3D true },
      preventDefault:  function() { this.returnValue =3D false },
      inspect: function() { return "[object Event]" }
    });

    return function(event) {
      if (!event) return false;
      if (event._extendedByPrototype) return event;

      event._extendedByPrototype =3D Prototype.emptyFunction;
      var pointer =3D Event.pointer(event);
      Object.extend(event, {
        target: event.srcElement,
        relatedTarget: Event.relatedTarget(event),
        pageX:  pointer.x,
        pageY:  pointer.y
      });
      return Object.extend(event, methods);
    };

  } else {
    Event.prototype =3D Event.prototype || =
document.createEvent("HTMLEvents").__proto__;
    Object.extend(Event.prototype, methods);
    return Prototype.K;
  }
})();

Object.extend(Event, (function() {
  var cache =3D Event.cache;

  function getEventID(element) {
    if (element._prototypeEventID) return element._prototypeEventID[0];
    arguments.callee.id =3D arguments.callee.id || 1;
    return element._prototypeEventID =3D [++arguments.callee.id];
  }

  function getDOMEventName(eventName) {
    if (eventName && eventName.include(':')) return "dataavailable";
    return eventName;
  }

  function getCacheForID(id) {
    return cache[id] =3D cache[id] || { };
  }

  function getWrappersForEventName(id, eventName) {
    var c =3D getCacheForID(id);
    return c[eventName] =3D c[eventName] || [];
  }

  function createWrapper(element, eventName, handler) {
    var id =3D getEventID(element);
    var c =3D getWrappersForEventName(id, eventName);
    if (c.pluck("handler").include(handler)) return false;

    var wrapper =3D function(event) {
      if (!Event || !Event.extend ||
        (event.eventName && event.eventName !=3D eventName))
          return false;

      Event.extend(event);
      handler.call(element, event);
    };

    wrapper.handler =3D handler;
    c.push(wrapper);
    return wrapper;
  }

  function findWrapper(id, eventName, handler) {
    var c =3D getWrappersForEventName(id, eventName);
    return c.find(function(wrapper) { return wrapper.handler =3D=3D =
handler });
  }

  function destroyWrapper(id, eventName, handler) {
    var c =3D getCacheForID(id);
    if (!c[eventName]) return false;
    c[eventName] =3D c[eventName].without(findWrapper(id, eventName, =
handler));
  }

  function destroyCache() {
    for (var id in cache)
      for (var eventName in cache[id])
        cache[id][eventName] =3D null;
  }

  if (window.attachEvent) {
    window.attachEvent("onunload", destroyCache);
  }

  return {
    observe: function(element, eventName, handler) {
      element =3D $(element);
      var name =3D getDOMEventName(eventName);

      var wrapper =3D createWrapper(element, eventName, handler);
      if (!wrapper) return element;

      if (element.addEventListener) {
        element.addEventListener(name, wrapper, false);
      } else {
        element.attachEvent("on" + name, wrapper);
      }

      return element;
    },

    stopObserving: function(element, eventName, handler) {
      element =3D $(element);
      var id =3D getEventID(element), name =3D =
getDOMEventName(eventName);

      if (!handler && eventName) {
        getWrappersForEventName(id, eventName).each(function(wrapper) {
          element.stopObserving(eventName, wrapper.handler);
        });
        return element;

      } else if (!eventName) {
        Object.keys(getCacheForID(id)).each(function(eventName) {
          element.stopObserving(eventName);
        });
        return element;
      }

      var wrapper =3D findWrapper(id, eventName, handler);
      if (!wrapper) return element;

      if (element.removeEventListener) {
        element.removeEventListener(name, wrapper, false);
      } else {
        element.detachEvent("on" + name, wrapper);
      }

      destroyWrapper(id, eventName, handler);

      return element;
    },

    fire: function(element, eventName, memo) {
      element =3D $(element);
      if (element =3D=3D document && document.createEvent && =
!element.dispatchEvent)
        element =3D document.documentElement;

      var event;
      if (document.createEvent) {
        event =3D document.createEvent("HTMLEvents");
        event.initEvent("dataavailable", true, true);
      } else {
        event =3D document.createEventObject();
        event.eventType =3D "ondataavailable";
      }

      event.eventName =3D eventName;
      event.memo =3D memo || { };

      if (document.createEvent) {
        element.dispatchEvent(event);
      } else {
        element.fireEvent(event.eventType, event);
      }

      return Event.extend(event);
    }
  };
})());

Object.extend(Event, Event.Methods);

Element.addMethods({
  fire:          Event.fire,
  observe:       Event.observe,
  stopObserving: Event.stopObserving
});

Object.extend(document, {
  fire:          Element.Methods.fire.methodize(),
  observe:       Element.Methods.observe.methodize(),
  stopObserving: Element.Methods.stopObserving.methodize(),
  loaded:        false
});

(function() {
  /* Support for the DOMContentLoaded event is based on work by Dan =
Webb,
     Matthias Miller, Dean Edwards and John Resig. */

  var timer;

  function fireContentLoadedEvent() {
    if (document.loaded) return;
    if (timer) window.clearInterval(timer);
    document.fire("dom:loaded");
    document.loaded =3D true;
  }

  if (document.addEventListener) {
    if (Prototype.Browser.WebKit) {
      timer =3D window.setInterval(function() {
        if (/loaded|complete/.test(document.readyState))
          fireContentLoadedEvent();
      }, 0);

      Event.observe(window, "load", fireContentLoadedEvent);

    } else {
      document.addEventListener("DOMContentLoaded",
        fireContentLoadedEvent, false);
    }

  } else {
    document.write("<script id=3D__onDOMContentLoaded defer =
src=3D//:><\/script>");
    $("__onDOMContentLoaded").onreadystatechange =3D function() {
      if (this.readyState =3D=3D "complete") {
        this.onreadystatechange =3D null;
        fireContentLoadedEvent();
      }
    };
  }
})();
/*------------------------------- DEPRECATED =
-------------------------------*/

Hash.toQueryString =3D Object.toQueryString;

var Toggle =3D { display: Element.toggle };

Element.Methods.childOf =3D Element.Methods.descendantOf;

var Insertion =3D {
  Before: function(element, content) {
    return Element.insert(element, {before:content});
  },

  Top: function(element, content) {
    return Element.insert(element, {top:content});
  },

  Bottom: function(element, content) {
    return Element.insert(element, {bottom:content});
  },

  After: function(element, content) {
    return Element.insert(element, {after:content});
  }
};

var $continue =3D new Error('"throw $continue" is deprecated, use =
"return" instead');

// This should be moved to script.aculo.us; notice the deprecated =
methods
// further below, that map to the newer Element methods.
var Position =3D {
  // set to true if needed, warning: firefox performance problems
  // NOT neeeded for page scrolling, only if draggable contained in
  // scrollable elements
  includeScrollOffsets: false,

  // must be called before calling withinIncludingScrolloffset, every =
time the
  // page is scrolled
  prepare: function() {
    this.deltaX =3D  window.pageXOffset
                || document.documentElement.scrollLeft
                || document.body.scrollLeft
                || 0;
    this.deltaY =3D  window.pageYOffset
                || document.documentElement.scrollTop
                || document.body.scrollTop
                || 0;
  },

  // caches x/y coordinate pair to use with overlap
  within: function(element, x, y) {
    if (this.includeScrollOffsets)
      return this.withinIncludingScrolloffsets(element, x, y);
    this.xcomp =3D x;
    this.ycomp =3D y;
    this.offset =3D Element.cumulativeOffset(element);

    return (y >=3D this.offset[1] &&
            y <  this.offset[1] + element.offsetHeight &&
            x >=3D this.offset[0] &&
            x <  this.offset[0] + element.offsetWidth);
  },

  withinIncludingScrolloffsets: function(element, x, y) {
    var offsetcache =3D Element.cumulativeScrollOffset(element);

    this.xcomp =3D x + offsetcache[0] - this.deltaX;
    this.ycomp =3D y + offsetcache[1] - this.deltaY;
    this.offset =3D Element.cumulativeOffset(element);

    return (this.ycomp >=3D this.offset[1] &&
            this.ycomp <  this.offset[1] + element.offsetHeight &&
            this.xcomp >=3D this.offset[0] &&
            this.xcomp <  this.offset[0] + element.offsetWidth);
  },

  // within must be called directly before
  overlap: function(mode, element) {
    if (!mode) return 0;
    if (mode =3D=3D 'vertical')
      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
        element.offsetHeight;
    if (mode =3D=3D 'horizontal')
      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
        element.offsetWidth;
  },

  // Deprecation layer -- use newer Element methods now (1.5.2).

  cumulativeOffset: Element.Methods.cumulativeOffset,

  positionedOffset: Element.Methods.positionedOffset,

  absolutize: function(element) {
    Position.prepare();
    return Element.absolutize(element);
  },

  relativize: function(element) {
    Position.prepare();
    return Element.relativize(element);
  },

  realOffset: Element.Methods.cumulativeScrollOffset,

  offsetParent: Element.Methods.getOffsetParent,

  page: Element.Methods.viewportOffset,

  clone: function(source, target, options) {
    options =3D options || { };
    return Element.clonePosition(target, source, options);
  }
};

/*-----------------------------------------------------------------------=
---*/

if (!document.getElementsByClassName) document.getElementsByClassName =
=3D function(instanceMethods){
  function iter(name) {
    return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' =
" + name + " ')]";
  }

  instanceMethods.getElementsByClassName =3D =
Prototype.BrowserFeatures.XPath ?
  function(element, className) {
    className =3D className.toString().strip();
    var cond =3D /\s/.test(className) ? $w(className).map(iter).join('') =
: iter(className);
    return cond ? document._getElementsByXPath('.//*' + cond, element) : =
[];
  } : function(element, className) {
    className =3D className.toString().strip();
    var elements =3D [], classNames =3D (/\s/.test(className) ? =
$w(className) : null);
    if (!classNames && !className) return elements;

    var nodes =3D $(element).getElementsByTagName('*');
    className =3D ' ' + className + ' ';

    for (var i =3D 0, child, cn; child =3D nodes[i]; i++) {
      if (child.className && (cn =3D ' ' + child.className + ' ') && =
(cn.include(className) ||
          (classNames && classNames.all(function(name) {
            return !name.toString().blank() && cn.include(' ' + name + ' =
');
          }))))
        elements.push(Element.extend(child));
    }
    return elements;
  };

  return function(className, parentElement) {
    return $(parentElement || =
document.body).getElementsByClassName(className);
  };
}(Element.Methods);

/*-----------------------------------------------------------------------=
---*/

Element.ClassNames =3D Class.create();
Element.ClassNames.prototype =3D {
  initialize: function(element) {
    this.element =3D $(element);
  },

  _each: function(iterator) {
    this.element.className.split(/\s+/).select(function(name) {
      return name.length > 0;
    })._each(iterator);
  },

  set: function(className) {
    this.element.className =3D className;
  },

  add: function(classNameToAdd) {
    if (this.include(classNameToAdd)) return;
    this.set($A(this).concat(classNameToAdd).join(' '));
  },

  remove: function(classNameToRemove) {
    if (!this.include(classNameToRemove)) return;
    this.set($A(this).without(classNameToRemove).join(' '));
  },

  toString: function() {
    return $A(this).join(' ');
  }
};

Object.extend(Element.ClassNames.prototype, Enumerable);

/*-----------------------------------------------------------------------=
---*/

Element.addMethods();
------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.esrealitycheck.com/rc/excanvas.js

// Copyright 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or =
implied.
// See the License for the specific language governing permissions and
// limitations under the License.


// Known Issues:
//
// * Patterns are not implemented.
// * Radial gradient are not implemented. The VML version of these look =
very
//   different from the canvas one.
// * Clipping paths are not implemented.
// * Coordsize. The width and height attribute have higher priority than =
the
//   width and height style values which isn't correct.
// * Painting mode isn't implemented.
// * Canvas width/height should is using content-box by default. IE in
//   Quirks mode will draw the canvas using border-box. Either change =
your
//   doctype to HTML5
//   (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype)
//   or use Box Sizing Behavior from WebFX
//   (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html)
// * Non uniform scaling does not correctly scale strokes.
// * Optimize. There is always room for speed improvements.

// Only add this code if we do not already have a canvas implementation
if (!document.createElement('canvas').getContext) {

(function() {

  // alias some functions to make (compiled) code shorter
  var m =3D Math;
  var mr =3D m.round;
  var ms =3D m.sin;
  var mc =3D m.cos;
  var abs =3D m.abs;
  var sqrt =3D m.sqrt;

  // this is used for sub pixel precision
  var Z =3D 10;
  var Z2 =3D Z / 2;

  /**
   * This funtion is assigned to the <canvas> elements as =
element.getContext().
   * @this {HTMLElement}
   * @return {CanvasRenderingContext2D_}
   */
  function getContext() {
    return this.context_ ||
        (this.context_ =3D new CanvasRenderingContext2D_(this));
  }

  var slice =3D Array.prototype.slice;

  /**
   * Binds a function to an object. The returned function will always =
use the
   * passed in {@code obj} as {@code this}.
   *
   * Example:
   *
   *   g =3D bind(f, obj, a, b)
   *   g(c, d) // will do f.call(obj, a, b, c, d)
   *
   * @param {Function} f The function to bind the object to
   * @param {Object} obj The object that should act as this when the =
function
   *     is called
   * @param {*} var_args Rest arguments that will be used as the initial
   *     arguments when the function is called
   * @return {Function} A new function that has bound this
   */
  function bind(f, obj, var_args) {
    var a =3D slice.call(arguments, 2);
    return function() {
      return f.apply(obj, a.concat(slice.call(arguments)));
    };
  }

  var G_vmlCanvasManager_ =3D {
    init: function(opt_doc) {
      if (/MSIE/.test(navigator.userAgent) && !window.opera) {
        var doc =3D opt_doc || document;
        // Create a dummy element so that IE will allow canvas elements =
to be
        // recognized.
        doc.createElement('canvas');
        doc.attachEvent('onreadystatechange', bind(this.init_, this, =
doc));
      }
    },

    init_: function(doc) {
      // create xmlns
      if (!doc.namespaces['g_vml_']) {
        doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml',
                           '#default#VML');

      }
      if (!doc.namespaces['g_o_']) {
        doc.namespaces.add('g_o_', =
'urn:schemas-microsoft-com:office:office',
                           '#default#VML');
      }

      // Setup default CSS.  Only add one style sheet per document
      if (!doc.styleSheets['ex_canvas_']) {
        var ss =3D doc.createStyleSheet();
        ss.owningElement.id =3D 'ex_canvas_';
        ss.cssText =3D 'canvas{display:inline-block;overflow:hidden;' +
            // default size is 300x150 in Gecko and Opera
            'text-align:left;width:300px;height:150px}' +
            'g_vml_\\:*{behavior:url(#default#VML)}' +
            'g_o_\\:*{behavior:url(#default#VML)}';

      }

      // find all canvas elements
      var els =3D doc.getElementsByTagName('canvas');
      for (var i =3D 0; i < els.length; i++) {
        this.initElement(els[i]);
      }
    },

    /**
     * Public initializes a canvas element so that it can be used as =
canvas
     * element from now on. This is called automatically before the page =
is
     * loaded but if you are creating elements using createElement you =
need to
     * make sure this is called on the element.
     * @param {HTMLElement} el The canvas element to initialize.
     * @return {HTMLElement} the element that was created.
     */
    initElement: function(el) {
      if (!el.getContext) {

        el.getContext =3D getContext;

        // Remove fallback content. There is no way to hide text nodes =
so we
        // just remove all childNodes. We could hide all elements and =
remove
        // text nodes but who really cares about the fallback content.
        el.innerHTML =3D '';

        // do not use inline function because that will leak memory
        el.attachEvent('onpropertychange', onPropertyChange);
        el.attachEvent('onresize', onResize);

        var attrs =3D el.attributes;
        if (attrs.width && attrs.width.specified) {
          // TODO: use runtimeStyle and coordsize
          // el.getContext().setWidth_(attrs.width.nodeValue);
          el.style.width =3D attrs.width.nodeValue + 'px';
        } else {
          el.width =3D el.clientWidth;
        }
        if (attrs.height && attrs.height.specified) {
          // TODO: use runtimeStyle and coordsize
          // el.getContext().setHeight_(attrs.height.nodeValue);
          el.style.height =3D attrs.height.nodeValue + 'px';
        } else {
          el.height =3D el.clientHeight;
        }
        //el.getContext().setCoordsize_()
      }
      return el;
    }
  };

  function onPropertyChange(e) {
    var el =3D e.srcElement;

    switch (e.propertyName) {
      case 'width':
        el.style.width =3D el.attributes.width.nodeValue + 'px';
        el.getContext().clearRect();
        break;
      case 'height':
        el.style.height =3D el.attributes.height.nodeValue + 'px';
        el.getContext().clearRect();
        break;
    }
  }

  function onResize(e) {
    var el =3D e.srcElement;
    if (el.firstChild) {
      el.firstChild.style.width =3D  el.clientWidth + 'px';
      el.firstChild.style.height =3D el.clientHeight + 'px';
    }
  }

  G_vmlCanvasManager_.init();

  // precompute "00" to "FF"
  var dec2hex =3D [];
  for (var i =3D 0; i < 16; i++) {
    for (var j =3D 0; j < 16; j++) {
      dec2hex[i * 16 + j] =3D i.toString(16) + j.toString(16);
    }
  }

  function createMatrixIdentity() {
    return [
      [1, 0, 0],
      [0, 1, 0],
      [0, 0, 1]
    ];
  }

  function matrixMultiply(m1, m2) {
    var result =3D createMatrixIdentity();

    for (var x =3D 0; x < 3; x++) {
      for (var y =3D 0; y < 3; y++) {
        var sum =3D 0;

        for (var z =3D 0; z < 3; z++) {
          sum +=3D m1[x][z] * m2[z][y];
        }

        result[x][y] =3D sum;
      }
    }
    return result;
  }

  function copyState(o1, o2) {
    o2.fillStyle     =3D o1.fillStyle;
    o2.lineCap       =3D o1.lineCap;
    o2.lineJoin      =3D o1.lineJoin;
    o2.lineWidth     =3D o1.lineWidth;
    o2.miterLimit    =3D o1.miterLimit;
    o2.shadowBlur    =3D o1.shadowBlur;
    o2.shadowColor   =3D o1.shadowColor;
    o2.shadowOffsetX =3D o1.shadowOffsetX;
    o2.shadowOffsetY =3D o1.shadowOffsetY;
    o2.strokeStyle   =3D o1.strokeStyle;
    o2.globalAlpha   =3D o1.globalAlpha;
    o2.arcScaleX_    =3D o1.arcScaleX_;
    o2.arcScaleY_    =3D o1.arcScaleY_;
    o2.lineScale_    =3D o1.lineScale_;
  }

  function processStyle(styleString) {
    var str, alpha =3D 1;

    styleString =3D String(styleString);
    if (styleString.substring(0, 3) =3D=3D 'rgb') {
      var start =3D styleString.indexOf('(', 3);
      var end =3D styleString.indexOf(')', start + 1);
      var guts =3D styleString.substring(start + 1, end).split(',');

      str =3D '#';
      for (var i =3D 0; i < 3; i++) {
        str +=3D dec2hex[Number(guts[i])];
      }

      if (guts.length =3D=3D 4 && styleString.substr(3, 1) =3D=3D 'a') {
        alpha =3D guts[3];
      }
    } else {
      str =3D styleString;
    }

    return {color: str, alpha: alpha};
  }

  function processLineCap(lineCap) {
    switch (lineCap) {
      case 'butt':
        return 'flat';
      case 'round':
        return 'round';
      case 'square':
      default:
        return 'square';
    }
  }

  /**
   * This class implements CanvasRenderingContext2D interface as =
described by
   * the WHATWG.
   * @param {HTMLElement} surfaceElement The element that the 2D context =
should
   * be associated with
   */
  function CanvasRenderingContext2D_(surfaceElement) {
    this.m_ =3D createMatrixIdentity();

    this.mStack_ =3D [];
    this.aStack_ =3D [];
    this.currentPath_ =3D [];

    // Canvas context properties
    this.strokeStyle =3D '#000';
    this.fillStyle =3D '#000';

    this.lineWidth =3D 1;
    this.lineJoin =3D 'miter';
    this.lineCap =3D 'butt';
    this.miterLimit =3D Z * 1;
    this.globalAlpha =3D 1;
    this.canvas =3D surfaceElement;

    var el =3D surfaceElement.ownerDocument.createElement('div');
    el.style.width =3D  surfaceElement.clientWidth + 'px';
    el.style.height =3D surfaceElement.clientHeight + 'px';
    el.style.overflow =3D 'hidden';
    el.style.position =3D 'absolute';
    surfaceElement.appendChild(el);

    this.element_ =3D el;
    this.arcScaleX_ =3D 1;
    this.arcScaleY_ =3D 1;
    this.lineScale_ =3D 1;
  }

  var contextPrototype =3D CanvasRenderingContext2D_.prototype;
  contextPrototype.clearRect =3D function() {
    this.element_.innerHTML =3D '';
  };

  contextPrototype.beginPath =3D function() {
    // TODO: Branch current matrix so that save/restore has no effect
    //       as per safari docs.
    this.currentPath_ =3D [];
  };

  contextPrototype.moveTo =3D function(aX, aY) {
    var p =3D this.getCoords_(aX, aY);
    this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y});
    this.currentX_ =3D p.x;
    this.currentY_ =3D p.y;
  };

  contextPrototype.lineTo =3D function(aX, aY) {
    var p =3D this.getCoords_(aX, aY);
    this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y});

    this.currentX_ =3D p.x;
    this.currentY_ =3D p.y;
  };

  contextPrototype.bezierCurveTo =3D function(aCP1x, aCP1y,
                                            aCP2x, aCP2y,
                                            aX, aY) {
    var p =3D this.getCoords_(aX, aY);
    var cp1 =3D this.getCoords_(aCP1x, aCP1y);
    var cp2 =3D this.getCoords_(aCP2x, aCP2y);
    bezierCurveTo(this, cp1, cp2, p);
  };

  // Helper function that takes the already fixed cordinates.
  function bezierCurveTo(self, cp1, cp2, p) {
    self.currentPath_.push({
      type: 'bezierCurveTo',
      cp1x: cp1.x,
      cp1y: cp1.y,
      cp2x: cp2.x,
      cp2y: cp2.y,
      x: p.x,
      y: p.y
    });
    self.currentX_ =3D p.x;
    self.currentY_ =3D p.y;
  }

  contextPrototype.quadraticCurveTo =3D function(aCPx, aCPy, aX, aY) {
    // the following is lifted almost directly from
    // =
http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes

    var cp =3D this.getCoords_(aCPx, aCPy);
    var p =3D this.getCoords_(aX, aY);

    var cp1 =3D {
      x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_),
      y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_)
    };
    var cp2 =3D {
      x: cp1.x + (p.x - this.currentX_) / 3.0,
      y: cp1.y + (p.y - this.currentY_) / 3.0
    };

    bezierCurveTo(this, cp1, cp2, p);
  };

  contextPrototype.arc =3D function(aX, aY, aRadius,
                                  aStartAngle, aEndAngle, aClockwise) {
    aRadius *=3D Z;
    var arcType =3D aClockwise ? 'at' : 'wa';

    var xStart =3D aX + mc(aStartAngle) * aRadius - Z2;
    var yStart =3D aY + ms(aStartAngle) * aRadius - Z2;

    var xEnd =3D aX + mc(aEndAngle) * aRadius - Z2;
    var yEnd =3D aY + ms(aEndAngle) * aRadius - Z2;

    // IE won't render arches drawn counter clockwise if xStart =3D=3D =
xEnd.
    if (xStart =3D=3D xEnd && !aClockwise) {
      xStart +=3D 0.125; // Offset xStart by 1/80 of a pixel. Use =
something
                       // that can be represented in binary
    }

    var p =3D this.getCoords_(aX, aY);
    var pStart =3D this.getCoords_(xStart, yStart);
    var pEnd =3D this.getCoords_(xEnd, yEnd);

    this.currentPath_.push({type: arcType,
                           x: p.x,
                           y: p.y,
                           radius: aRadius,
                           xStart: pStart.x,
                           yStart: pStart.y,
                           xEnd: pEnd.x,
                           yEnd: pEnd.y});

  };

  contextPrototype.rect =3D function(aX, aY, aWidth, aHeight) {
    this.moveTo(aX, aY);
    this.lineTo(aX + aWidth, aY);
    this.lineTo(aX + aWidth, aY + aHeight);
    this.lineTo(aX, aY + aHeight);
    this.closePath();
  };

  contextPrototype.strokeRect =3D function(aX, aY, aWidth, aHeight) {
    var oldPath =3D this.currentPath_;
    this.beginPath();

    this.moveTo(aX, aY);
    this.lineTo(aX + aWidth, aY);
    this.lineTo(aX + aWidth, aY + aHeight);
    this.lineTo(aX, aY + aHeight);
    this.closePath();
    this.stroke();

    this.currentPath_ =3D oldPath;
  };

  contextPrototype.fillRect =3D function(aX, aY, aWidth, aHeight) {
    var oldPath =3D this.currentPath_;
    this.beginPath();

    this.moveTo(aX, aY);
    this.lineTo(aX + aWidth, aY);
    this.lineTo(aX + aWidth, aY + aHeight);
    this.lineTo(aX, aY + aHeight);
    this.closePath();
    this.fill();

    this.currentPath_ =3D oldPath;
  };

  contextPrototype.createLinearGradient =3D function(aX0, aY0, aX1, aY1) =
{
    var gradient =3D new CanvasGradient_('gradient');
    gradient.x0_ =3D aX0;
    gradient.y0_ =3D aY0;
    gradient.x1_ =3D aX1;
    gradient.y1_ =3D aY1;
    return gradient;
  };

  contextPrototype.createRadialGradient =3D function(aX0, aY0, aR0,
                                                   aX1, aY1, aR1) {
    var gradient =3D new CanvasGradient_('gradientradial');
    gradient.x0_ =3D aX0;
    gradient.y0_ =3D aY0;
    gradient.r0_ =3D aR0;
    gradient.x1_ =3D aX1;
    gradient.y1_ =3D aY1;
    gradient.r1_ =3D aR1;
    return gradient;
  };

  contextPrototype.drawImage =3D function(image, var_args) {
    var dx, dy, dw, dh, sx, sy, sw, sh;

    // to find the original width we overide the width and height
    var oldRuntimeWidth =3D image.runtimeStyle.width;
    var oldRuntimeHeight =3D image.runtimeStyle.height;
    image.runtimeStyle.width =3D 'auto';
    image.runtimeStyle.height =3D 'auto';

    // get the original size
    var w =3D image.width;
    var h =3D image.height;

    // and remove overides
    image.runtimeStyle.width =3D oldRuntimeWidth;
    image.runtimeStyle.height =3D oldRuntimeHeight;

    if (arguments.length =3D=3D 3) {
      dx =3D arguments[1];
      dy =3D arguments[2];
      sx =3D sy =3D 0;
      sw =3D dw =3D w;
      sh =3D dh =3D h;
    } else if (arguments.length =3D=3D 5) {
      dx =3D arguments[1];
      dy =3D arguments[2];
      dw =3D arguments[3];
      dh =3D arguments[4];
      sx =3D sy =3D 0;
      sw =3D w;
      sh =3D h;
    } else if (arguments.length =3D=3D 9) {
      sx =3D arguments[1];
      sy =3D arguments[2];
      sw =3D arguments[3];
      sh =3D arguments[4];
      dx =3D arguments[5];
      dy =3D arguments[6];
      dw =3D arguments[7];
      dh =3D arguments[8];
    } else {
      throw Error('Invalid number of arguments');
    }

    var d =3D this.getCoords_(dx, dy);

    var w2 =3D sw / 2;
    var h2 =3D sh / 2;

    var vmlStr =3D [];

    var W =3D 10;
    var H =3D 10;

    // For some reason that I've now forgotten, using divs didn't work
    vmlStr.push(' <g_vml_:group',
                ' coordsize=3D"', Z * W, ',', Z * H, '"',
                ' coordorigin=3D"0,0"' ,
                ' style=3D"width:', W, 'px;height:', H, =
'px;position:absolute;');

    // If filters are necessary (rotation exists), create them
    // filters are bog-slow, so only create them if abbsolutely =
necessary
    // The following check doesn't account for skews (which don't exist
    // in the canvas spec (yet) anyway.

    if (this.m_[0][0] !=3D 1 || this.m_[0][1]) {
      var filter =3D [];

      // Note the 12/21 reversal
      filter.push('M11=3D', this.m_[0][0], ',',
                  'M12=3D', this.m_[1][0], ',',
                  'M21=3D', this.m_[0][1], ',',
                  'M22=3D', this.m_[1][1], ',',
                  'Dx=3D', mr(d.x / Z), ',',
                  'Dy=3D', mr(d.y / Z), '');

      // Bounding box calculation (need to minimize displayed area so =
that
      // filters don't waste time on unused pixels.
      var max =3D d;
      var c2 =3D this.getCoords_(dx + dw, dy);
      var c3 =3D this.getCoords_(dx, dy + dh);
      var c4 =3D this.getCoords_(dx + dw, dy + dh);

      max.x =3D m.max(max.x, c2.x, c3.x, c4.x);
      max.y =3D m.max(max.y, c2.y, c3.y, c4.y);

      vmlStr.push('padding:0 ', mr(max.x / Z), 'px ', mr(max.y / Z),
                  'px =
0;filter:progid:DXImageTransform.Microsoft.Matrix(',
                  filter.join(''), ", sizingmethod=3D'clip');")
    } else {
      vmlStr.push('top:', mr(d.y / Z), 'px;left:', mr(d.x / Z), 'px;');
    }

    vmlStr.push(' ">' ,
                '<g_vml_:image src=3D"', image.src, '"',
                ' style=3D"width:', Z * dw, 'px;',
                ' height:', Z * dh, 'px;"',
                ' cropleft=3D"', sx / w, '"',
                ' croptop=3D"', sy / h, '"',
                ' cropright=3D"', (w - sx - sw) / w, '"',
                ' cropbottom=3D"', (h - sy - sh) / h, '"',
                ' />',
                '</g_vml_:group>');

    this.element_.insertAdjacentHTML('BeforeEnd',
                                    vmlStr.join(''));
  };

  contextPrototype.stroke =3D function(aFill) {
    var lineStr =3D [];
    var lineOpen =3D false;
    var a =3D processStyle(aFill ? this.fillStyle : this.strokeStyle);
    var color =3D a.color;
    var opacity =3D a.alpha * this.globalAlpha;

    var W =3D 10;
    var H =3D 10;

    lineStr.push('<g_vml_:shape',
                 ' filled=3D"', !!aFill, '"',
                 ' style=3D"position:absolute;width:', W, 'px;height:', =
H, 'px;"',
                 ' coordorigin=3D"0 0" coordsize=3D"', Z * W, ' ', Z * =
H, '"',
                 ' stroked=3D"', !aFill, '"',
                 ' path=3D"');

    var newSeq =3D false;
    var min =3D {x: null, y: null};
    var max =3D {x: null, y: null};

    for (var i =3D 0; i < this.currentPath_.length; i++) {
      var p =3D this.currentPath_[i];
      var c;

      switch (p.type) {
        case 'moveTo':
          c =3D p;
          lineStr.push(' m ', mr(p.x), ',', mr(p.y));
          break;
        case 'lineTo':
          lineStr.push(' l ', mr(p.x), ',', mr(p.y));
          break;
        case 'close':
          lineStr.push(' x ');
          p =3D null;
          break;
        case 'bezierCurveTo':
          lineStr.push(' c ',
                       mr(p.cp1x), ',', mr(p.cp1y), ',',
                       mr(p.cp2x), ',', mr(p.cp2y), ',',
                       mr(p.x), ',', mr(p.y));
          break;
        case 'at':
        case 'wa':
          lineStr.push(' ', p.type, ' ',
                       mr(p.x - this.arcScaleX_ * p.radius), ',',
                       mr(p.y - this.arcScaleY_ * p.radius), ' ',
                       mr(p.x + this.arcScaleX_ * p.radius), ',',
                       mr(p.y + this.arcScaleY_ * p.radius), ' ',
                       mr(p.xStart), ',', mr(p.yStart), ' ',
                       mr(p.xEnd), ',', mr(p.yEnd));
          break;
      }


      // TODO: Following is broken for curves due to
      //       move to proper paths.

      // Figure out dimensions so we can do gradient fills
      // properly
      if (p) {
        if (min.x =3D=3D null || p.x < min.x) {
          min.x =3D p.x;
        }
        if (max.x =3D=3D null || p.x > max.x) {
          max.x =3D p.x;
        }
        if (min.y =3D=3D null || p.y < min.y) {
          min.y =3D p.y;
        }
        if (max.y =3D=3D null || p.y > max.y) {
          max.y =3D p.y;
        }
      }
    }
    lineStr.push(' ">');

    if (!aFill) {
      var lineWidth =3D this.lineScale_ * this.lineWidth;

      // VML cannot correctly render a line if the width is less than =
1px.
      // In that case, we dilute the color to make the line look =
thinner.
      if (lineWidth < 1) {
        opacity *=3D lineWidth;
      }

      lineStr.push(
        '<g_vml_:stroke',
        ' opacity=3D"', opacity, '"',
        ' joinstyle=3D"', this.lineJoin, '"',
        ' miterlimit=3D"', this.miterLimit, '"',
        ' endcap=3D"', processLineCap(this.lineCap), '"',
        ' weight=3D"', lineWidth, 'px"',
        ' color=3D"', color, '" />'
      );
    } else if (typeof this.fillStyle =3D=3D 'object') {
      var fillStyle =3D this.fillStyle;
      var angle =3D 0;
      var focus =3D {x: 0, y: 0};

      // additional offset
      var shift =3D 0;
      // scale factor for offset
      var expansion =3D 1;

      if (fillStyle.type_ =3D=3D 'gradient') {
        var x0 =3D fillStyle.x0_ / this.arcScaleX_;
        var y0 =3D fillStyle.y0_ / this.arcScaleY_;
        var x1 =3D fillStyle.x1_ / this.arcScaleX_;
        var y1 =3D fillStyle.y1_ / this.arcScaleY_;
        var p0 =3D this.getCoords_(x0, y0);
        var p1 =3D this.getCoords_(x1, y1);
        var dx =3D p1.x - p0.x;
        var dy =3D p1.y - p0.y;
        angle =3D Math.atan2(dx, dy) * 180 / Math.PI;

        // The angle should be a non-negative number.
        if (angle < 0) {
          angle +=3D 360;
        }

        // Very small angles produce an unexpected result because they =
are
        // converted to a scientific notation string.
        if (angle < 1e-6) {
          angle =3D 0;
        }
      } else {
        var p0 =3D this.getCoords_(fillStyle.x0_, fillStyle.y0_);
        var width  =3D max.x - min.x;
        var height =3D max.y - min.y;
        focus =3D {
          x: (p0.x - min.x) / width,
          y: (p0.y - min.y) / height
        };

        width  /=3D this.arcScaleX_ * Z;
        height /=3D this.arcScaleY_ * Z;
        var dimension =3D m.max(width, height);
        shift =3D 2 * fillStyle.r0_ / dimension;
        expansion =3D 2 * fillStyle.r1_ / dimension - shift;
      }

      // We need to sort the color stops in ascending order by offset,
      // otherwise IE won't interpret it correctly.
      var stops =3D fillStyle.colors_;
      stops.sort(function(cs1, cs2) {
        return cs1.offset - cs2.offset;
      });

      var length =3D stops.length;
      var color1 =3D stops[0].color;
      var color2 =3D stops[length - 1].color;
      var opacity1 =3D stops[0].alpha * this.globalAlpha;
      var opacity2 =3D stops[length - 1].alpha * this.globalAlpha;

      var colors =3D [];
      for (var i =3D 0; i < length; i++) {
        var stop =3D stops[i];
        colors.push(stop.offset * expansion + shift + ' ' + stop.color);
      }

      // When colors attribute is used, the meanings of opacity and =
o:opacity2
      // are reversed.
      lineStr.push('<g_vml_:fill type=3D"', fillStyle.type_, '"',
                   ' method=3D"none" focus=3D"100%"',
                   ' color=3D"', color1, '"',
                   ' color2=3D"', color2, '"',
                   ' colors=3D"', colors.join(','), '"',
                   ' opacity=3D"', opacity2, '"',
                   ' g_o_:opacity2=3D"', opacity1, '"',
                   ' angle=3D"', angle, '"',
                   ' focusposition=3D"', focus.x, ',', focus.y, '" />');
    } else {
      lineStr.push('<g_vml_:fill color=3D"', color, '" opacity=3D"', =
opacity,
                   '" />');
    }

    lineStr.push('</g_vml_:shape>');

    this.element_.insertAdjacentHTML('beforeEnd', lineStr.join(''));
  };

  contextPrototype.fill =3D function() {
    this.stroke(true);
  }

  contextPrototype.closePath =3D function() {
    this.currentPath_.push({type: 'close'});
  };

  /**
   * @private
   */
  contextPrototype.getCoords_ =3D function(aX, aY) {
    var m =3D this.m_;
    return {
      x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2,
      y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
    }
  };

  contextPrototype.save =3D function() {
    var o =3D {};
    copyState(this, o);
    this.aStack_.push(o);
    this.mStack_.push(this.m_);
    this.m_ =3D matrixMultiply(createMatrixIdentity(), this.m_);
  };

  contextPrototype.restore =3D function() {
    copyState(this.aStack_.pop(), this);
    this.m_ =3D this.mStack_.pop();
  };

  function matrixIsFinite(m) {
    for (var j =3D 0; j < 3; j++) {
      for (var k =3D 0; k < 2; k++) {
        if (!isFinite(m[j][k]) || isNaN(m[j][k])) {
          return false;
        }
      }
    }
    return true;
  }

  function setM(ctx, m, updateLineScale) {
    if (!matrixIsFinite(m)) {
      return;
    }
    ctx.m_ =3D m;

    if (updateLineScale) {
      // Get the line scale.
      // Determinant of this.m_ means how much the area is enlarged by =
the
      // transformation. So its square root can be used as a scale =
factor
      // for width.
      var det =3D m[0][0] * m[1][1] - m[0][1] * m[1][0];
      ctx.lineScale_ =3D sqrt(abs(det));
    }
  }

  contextPrototype.translate =3D function(aX, aY) {
    var m1 =3D [
      [1,  0,  0],
      [0,  1,  0],
      [aX, aY, 1]
    ];

    setM(this, matrixMultiply(m1, this.m_), false);
  };

  contextPrototype.rotate =3D function(aRot) {
    var c =3D mc(aRot);
    var s =3D ms(aRot);

    var m1 =3D [
      [c,  s, 0],
      [-s, c, 0],
      [0,  0, 1]
    ];

    setM(this, matrixMultiply(m1, this.m_), false);
  };

  contextPrototype.scale =3D function(aX, aY) {
    this.arcScaleX_ *=3D aX;
    this.arcScaleY_ *=3D aY;
    var m1 =3D [
      [aX, 0,  0],
      [0,  aY, 0],
      [0,  0,  1]
    ];

    setM(this, matrixMultiply(m1, this.m_), true);
  };

  contextPrototype.transform =3D function(m11, m12, m21, m22, dx, dy) {
    var m1 =3D [
      [m11, m12, 0],
      [m21, m22, 0],
      [dx,  dy,  1]
    ];

    setM(this, matrixMultiply(m1, this.m_), true);
  };

  contextPrototype.setTransform =3D function(m11, m12, m21, m22, dx, dy) =
{
    var m =3D [
      [m11, m12, 0],
      [m21, m22, 0],
      [dx,  dy,  1]
    ];

    setM(this, m, true);
  };

  /******** STUBS ********/
  contextPrototype.clip =3D function() {
    // TODO: Implement
  };

  contextPrototype.arcTo =3D function() {
    // TODO: Implement
  };

  contextPrototype.createPattern =3D function() {
    return new CanvasPattern_;
  };

  // Gradient / Pattern Stubs
  function CanvasGradient_(aType) {
    this.type_ =3D aType;
    this.x0_ =3D 0;
    this.y0_ =3D 0;
    this.r0_ =3D 0;
    this.x1_ =3D 0;
    this.y1_ =3D 0;
    this.r1_ =3D 0;
    this.colors_ =3D [];
  }

  CanvasGradient_.prototype.addColorStop =3D function(aOffset, aColor) {
    aColor =3D processStyle(aColor);
    this.colors_.push({offset: aOffset,
                       color: aColor.color,
                       alpha: aColor.alpha});
  };

  function CanvasPattern_() {}

  // set up externs
  G_vmlCanvasManager =3D G_vmlCanvasManager_;
  CanvasRenderingContext2D =3D CanvasRenderingContext2D_;
  CanvasGradient =3D CanvasGradient_;
  CanvasPattern =3D CanvasPattern_;

})();

} // if

------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.esrealitycheck.com/rc/ProtoChart.js

/**
 * Class: ProtoChart=20
 * Version: v0.5 beta
 *=20
 * ProtoChart is a charting lib on top of Prototype.
 * This library is heavily motivated by excellent work done by:
 * * Flot <http://code.google.com/p/flot/>
 * * Flotr <http://solutoire.com/flotr/>
 *=20
 * Complete examples can be found at: =
<http://www.deensoft.com/lab/protochart>
 */

/**
 * Events:
 * ProtoChart:mousemove - Fired when mouse is moved over the chart
 * ProtoChart:plotclick - Fired when graph is clicked
 * ProtoChart:dataclick - Fired when graph is clicked AND the click is =
on a data point
 * ProtoChart:selected	- Fired when certain region on the graph is =
selected
 * ProtoChart:hit		- Fired when mouse is moved near or over certain data =
point on the graph
 */


if(!Proto) var Proto =3D {};

Proto.Chart =3D Class.create({
	/**
	 * Function:=20
	 * {Object} elem
	 * {Object} data
	 * {Object} options
	 */
	initialize: function(elem, data, options)
	{
		options =3D options || {};
		this.graphData =3D [];
		/**
		 * Property: options
		 *=20
		 * Description: Various options can be set. More details in =
description.
		 *=20
		 * colors:
		 * {Array}		- pass in a array which contains strings of colors you =
want to use. Default has 6 color set.
		 *=20
		 * legend:
		 * {BOOL} 		- show				- if you want to show the legend. Default is =
false
		 * {integer} 	- noColumns			- Number of columns for the legend. =
Default is 1
		 * {function} 	- labelFormatter	- A function that returns a string. =
The function is called with a string and is expected to return a string. =
Default =3D null
		 * {string}		- labelBoxBorderColor - border color for the little label =
boxes. Default #CCC
		 * {HTMLElem}	- container			- an HTML id or HTML element where the =
legend should be rendered. If left null means to put the legend on top =
of the Chart
		 * {string}		- position			- position for the legend on the Chart. =
Default value 'ne'
		 * {integer}	- margin			- default valud of 5
		 * {string} 	- backgroundColor	- default to null (which means =
auto-detect)
		 * {float} 		- backgroundOpacity - leave it 0 to avoid background
		 *=20
		 * xaxis (yaxis) options:
		 * {string} 	- mode 		- default is null but you can pass a string =
"time" to indicate time series
		 * {integer}	- min
		 * {integer}	- max
		 * {float}		- autoscaleMargin - in % to add if auto-setting min/max
		 * {mixed}		- ticks - either [1, 3] or [[1, "a"], 3] or a function =
which gets axis info and returns ticks
		 * {function} 	- tickFormatter - A function that returns a string as a =
tick label. Default is null
		 * {float}		- tickDecimals
		 * {integer}	- tickSize
		 * {integer} 	- minTickSize
		 * {array}		- monthNames
		 * {string}		- timeformat
		 *=20
		 * Points / Lines / Bars options:
		 * {bool}		- show, default is false
		 * {integer}	- radius: default is 3
		 * {integer}	- lineWidth : default is 2
		 * {bool}		- fill : default is true
		 * {string}		- fillColor: default is #ffffff
		 *=20
		 * Grid options:
		 * {string}		- color
		 * {string}		- backgroundColor 	- defualt is *null*
		 * {string}		- tickColor			- default is *#dddddd*
		 * {integer}	- labelMargin		- should be in pixels default is 3
		 * {integer}	- borderWidth		- default *1*
		 * {bool}		- clickable 		- default *null* - pass in TRUE if you wish =
to monitor click events
		 * {mixed}		- coloredAreas 		- default *null* - pass in mixed object =
eg. {x1, x2}
		 * {string}		- coloredAreasColor	- default *#f4f4f4*
		 * {bool}		- drawXAxis			- default *true*
		 * {bool}		- drawYAxis			- default *true*
		 *=20
		 * selection options:
		 * {string}		- mode : either "x", "y" or "xy"
		 * {string}		- color : string
		 */
		this.options =3D this.merge(options,{
			colors: ["#edc240", "#00A8F0", "#C0D800", "#cb4b4b", "#4da74d", =
"#9440ed"],
            legend: {
                show: false,
                noColumns: 1,
                labelFormatter: null,
                labelBoxBorderColor: "#ccc",
                container: null,=20
                position: "ne",
                margin: 5,
                backgroundColor: null,
                backgroundOpacity: 0.85
            },
            xaxis: {
				mode: null,=20
                min: null,
                max: null,
                autoscaleMargin: null,
                ticks: null,
                tickFormatter: null,
                tickDecimals: null,
                tickSize: null,
                minTickSize: null,
                monthNames: null,
                timeformat: null
            },
            yaxis: {
				mode: null,
				min: null,
				max: null,
				ticks: null,
				tickFormatter: null,
				tickDecimals: null,
				tickSize: null,
				minTickSize: null,
				monthNames: null,
				timeformat: null,			=09
                autoscaleMargin: 0.02
            },

            points: {
                show: false,
                radius: 3,
                lineWidth: 2,
                fill: true,
                fillColor: "#ffffff"
            },
            lines: {
                show: false,
                lineWidth: 2,
                fill: false,
                fillColor: null
            },
            bars: {
                show: false,
                lineWidth: 2,
                barWidth: 1,
                fill: true,
                fillColor: null,
				showShadow: false,
				fillOpacity: 0.4,
				autoScale: true
            },
			pies: {
				show: false,
				radius: 50,
				borderWidth: 1,
				fill: true,
				fillColor: null,
				fillOpacity: 0.90,
				labelWidth: 30,
				fontSize: 11,
				autoScale: true
			},
            grid: {
                color: "#545454",
                backgroundColor: null,
                tickColor: "#dddddd",
                labelMargin: 3,
                borderWidth: 1,
                clickable: null,
                coloredAreas: null,
                coloredAreasColor: "#f4f4f4",
				drawXAxis: true,
				drawYAxis: true
            },
			mouse: {
				track: false,
				position: 'se',
				fixedPosition: true,
				clsName: 'mouseValHolder',
				trackFormatter: this.defaultTrackFormatter,
				margin: 3,
				color: '#ff3f19',
				trackDecimals: 1,
				sensibility: 2,
				radius: 5,
				lineColor: '#cb4b4b'
			},
            selection: {
                mode: null,
                color: "#97CBFF"
            },
			allowDataClick: true,
			makeRandomColor: false,
            shadowSize: 4		=09
		});
	=09
		/*
		 * Local variables.
		 */
		this.canvas =3D null;=20
		this.overlay =3D null;
		this.eventHolder =3D null;
		this.context =3D null;
		this.overlayContext =3D null;
	=09
		this.domObj =3D $(elem);

		this.xaxis =3D {};
		this.yaxis =3D {};
		this.chartOffset =3D {left: 0, right: 0, top: 0, bottom: 0};
		this.yLabelMaxWidth =3D 0;
		this.yLabelMaxHeight =3D 0;
		this.xLabelBoxWidth =3D 0;
		this.canvasWidth =3D 0;
		this.canvasHeight =3D 0;
		this.chartWidth =3D 0;
		this.chartHeight =3D 0;
		this.hozScale =3D 0;
		this.vertScale =3D 0;
		this.workarounds =3D {};
	=09
		this.domObj =3D $(elem);
	=09
		this.barDataRange =3D [];
	=09
        this.lastMousePos =3D { pageX: null, pageY: null };
        this.selection =3D { first: { x: -1, y: -1}, second: { x: -1, y: =
-1} };
        this.prevSelection =3D null;
        this.selectionInterval =3D null;
        this.ignoreClick =3D false;=09
		this.prevHit =3D null;
		=09
		if(this.options.makeRandomColor)
			this.options.color =3D this.makeRandomColor(this.options.colors);
	=09
		this.setData(data);
		this.constructCanvas();
		this.setupGrid();
		this.draw();
	},
	/**
	 * Private function internally used.
	 */
	merge: function(src, dest)
	{
		var result =3D dest || {};
		for(var i in src){		 =20
			result[i] =3D (typeof(src[i]) =3D=3D 'object' && !(src[i].constructor =
=3D=3D Array || src[i].constructor =3D=3D RegExp)) ? this.merge(src[i], =
dest[i]) : result[i] =3D src[i];	=09
		}
		return result;=09
	},
	/**
	 * Function: setData
	 * {Object} data
	 *=20
	 * Description:
	 * Sets datasoruces properly then sets the Bar Width accordingly, then =
copies the default data options and then processes the graph data
	 *=20
	 * Returns: none
	 *=20
	 */=09
	setData: function(data)=20
	{
        this.graphData =3D this.parseData(data);	=09
		this.setBarWidth();
        this.copyGraphDataOptions();
        this.processGraphData();
    },
	/**
	 * Function: parseData
	 * {Object} data
	 *=20
	 * Return:=20
	 * {Object} result
	 *=20
	 * Description:
	 * Takes the provided data object and converts it into generic data =
that we can understand. User can pass in data in 3 different ways:
	 * - [d1, d2]
	 * - [{data: d1, label: "data1"}, {data: d2, label: "data2"}]
	 * - [d1, {data: d1, label: "data1"}]
	 *=20
	 * This function parses these senarios and makes it readable
	 */
	parseData: function(data)
	{
		var res =3D [];
		data.each(function(d){
			var s;
			if(d.data) {
				s =3D {};
				for(var v in d) {
					s[v] =3D d[v];
				}
			}
			else {
				s =3D {data: d};
			}
			res.push(s);
		}.bind(this));
		return res;
	},
	/**
	 * function: makeRandomColor
	 * {Object} colorSet
	 *=20
	 * Return:=20
	 * {Array} result - array containing random colors
	 */
	makeRandomColor: function(colorSet)
	{
		var randNum =3D Math.floor(Math.random() * colorSet.length);
		var randArr =3D [];
		var newArr =3D [];
		randArr.push(randNum);
	=09
		while(randArr.length < colorSet.length)
		{
			var tempNum =3D Math.floor(Math.random() * colorSet.length);
=09
			while(checkExisted(tempNum, randArr))
				tempNum =3D Math.floor(Math.random() * colorSet.length);
			=09
			randArr.push(tempNum);
		}
	=09
		randArr.each(function(ra){
			newArr.push(colorSet[ra]);
		=09
		}.bind(this));
		return newArr;	=09
	},
	/**
	 * function: checkExisted
	 * {Object} needle
	 * {Object} haystack
	 *=20
	 * return:=20
	 * {bool} existed - true if it finds needle in the haystack
	 */
	checkExisted: function(needle, haystack)
	{
		var existed =3D false;
		haystack.each(function(aNeedle){
			if(aNeedle =3D=3D needle) {
				existed =3D true;
				throw $break;
			}
		}.bind(this));
		return existed;
	},
	/**
	 * function: setBarWidth
	 *=20
	 * Description: sets the bar width for Bar Graph, you should enable =
*autoScale* property for bar graph
	 */
	setBarWidth: function()
	{
		if(this.options.bars.show && this.options.bars.autoScale)
		{
			this.options.bars.barWidth =3D 1 / this.graphData.length / 1.2;=09
		}
	},
	/**
	 * Function: copyGraphDataOptions
	 *=20
	 * Description: Private function that goes through each graph data =
(series) and assigned the graph
	 * properties to it.
	 */
	copyGraphDataOptions: function()
	{
		var i, neededColors =3D this.graphData.length, usedColors =3D [], =
assignedColors =3D [];
	=09
		this.graphData.each(function(gd){
			var sc =3D gd.color;
			if(sc) {
				--neededColors;
				if(Object.isNumber(sc)) {
					assignedColors.push(sc);
				}
				else {
					usedColors.push(this.parseColor(sc));
				}
			}
		}.bind(this));
	=09
	=09
		assignedColors.each(function(ac){
			neededColors =3D Math.max(neededColors, ac + 1);
		});

        var colors =3D [];
        var variation =3D 0;
        i =3D 0;
        while (colors.length < neededColors) {
            var c;
            if (this.options.colors.length =3D=3D i) {
				c =3D new Proto.Color(100, 100, 100);
			}
			else {
				c =3D this.parseColor(this.options.colors[i]);
			}

            var sign =3D variation % 2 =3D=3D 1 ? -1 : 1;
            var factor =3D 1 + sign * Math.ceil(variation / 2) * 0.2;
            c.scale(factor, factor, factor);

            colors.push(c);
           =20
            ++i;
            if (i >=3D this.options.colors.length) {
                i =3D 0;
                ++variation;
            }
        }

        var colorIndex =3D 0, s;
	=09
		this.graphData.each(function(gd){
			if(gd.color =3D=3D null)
			{
				gd.color =3D colors[colorIndex].toString();
				++colorIndex;
			}
			else if(Object.isNumber(gd.color)) {
				gd.color =3D colors[gd.color].toString();
			}
		=09
            gd.lines =3D Object.extend(Object.clone(this.options.lines), =
gd.lines);=20
            gd.points =3D =
Object.extend(Object.clone(this.options.points), gd.points);=20
            gd.bars =3D Object.extend(Object.clone(this.options.bars), =
gd.bars);=20
            gd.mouse =3D Object.extend(Object.clone(this.options.mouse), =
gd.mouse);
            if (gd.shadowSize =3D=3D null) {
                gd.shadowSize =3D this.options.shadowSize;
			}
		}.bind(this));
		=09
	},
	/**
	 * Function: processGraphData
	 *=20
	 * Description: processes graph data, setup xaxis and yaxis min and max =
points.=20
	 */
	processGraphData: function() {
	=09
		this.xaxis.datamin =3D this.yaxis.datamin =3D Number.MAX_VALUE;
		this.xaxis.datamax =3D this.yaxis.datamax =3D Number.MIN_VALUE;
		=09
		this.graphData.each(function(gd) {
			var data =3D gd.data;
			data.each(function(d){
				if(d =3D=3D null) {
					return;
				}
			=09
				var x =3D d[0], y =3D d[1];
				if(!x || !y || isNaN(x =3D +x) || isNaN(y =3D +y)) {
					d =3D null;
					return;
				}
			=09
				if (x < this.xaxis.datamin)
					this.xaxis.datamin =3D x;
				if (x > this.xaxis.datamax)
					this.xaxis.datamax =3D x;
				if (y < this.yaxis.datamin)
					this.yaxis.datamin =3D y;
				if (y > this.yaxis.datamax)
					this.yaxis.datamax =3D y;
			}.bind(this));
		}.bind(this));

	=09
		if (this.xaxis.datamin =3D=3D Number.MAX_VALUE)
			this.xaxis.datamin =3D 0;
		if (this.yaxis.datamin =3D=3D Number.MAX_VALUE)
			this.yaxis.datamin =3D 0;
		if (this.xaxis.datamax =3D=3D Number.MIN_VALUE)
			this.xaxis.datamax =3D 1;
		if (this.yaxis.datamax =3D=3D Number.MIN_VALUE)
			this.yaxis.datamax =3D 1;
	},
	/**
	 * Function: constructCanvas
	 *=20
	 * Description: constructs the main canvas for drawing. It replicates =
the HTML elem (usually DIV) passed
	 * in via constructor. If there is no height/width assigned to the HTML =
elem then we take a default size
	 * of 400px (width) and 300px (height)
	 */
	constructCanvas: function() {

		this.canvasWidth =3D this.domObj.getWidth();
		this.canvasHeight =3D this.domObj.getHeight();
		this.domObj.update(""); // clear target
		this.domObj.setStyle({
			"position": "relative"
		});=20

		if (this.canvasWidth <=3D 0) {
			this.canvasWdith =3D 400;
		}
		if(this.canvasHeight <=3D 0) {
			this.canvasHeight =3D 300;
		}
	=09
		this.canvas =3D (Prototype.Browser.IE) ? =
document.createElement("canvas") : new Element("CANVAS", {'width': =
this.canvasWidth, 'height': this.canvasHeight});
		Element.extend(this.canvas);
		this.canvas.style.width =3D this.canvasWidth + "px";
		this.canvas.style.height =3D this.canvasHeight + "px";
	=09
		this.domObj.appendChild(this.canvas);
	=09
		if (Prototype.Browser.IE) // excanvas hack
		{
			this.canvas =3D =
$(window.G_vmlCanvasManager.initElement(this.canvas));
		}
		this.canvas =3D $(this.canvas);
	=09
		this.context =3D this.canvas.getContext("2d");

		this.overlay =3D (Prototype.Browser.IE) ? =
document.createElement("canvas") :  new Element("CANVAS", {'width': =
this.canvasWidth, 'height': this.canvasHeight});
		Element.extend(this.overlay);
		this.overlay.style.width =3D this.canvasWidth + "px";
		this.overlay.style.height =3D this.canvasHeight + "px";
		this.overlay.style.position =3D "absolute";
		this.overlay.style.left =3D "0px";
		this.overlay.style.right =3D "0px";
	=09
		this.overlay.setStyle({
			'position': 'absolute',
			'left': '0px',
			'right': '0px'
		});
		this.domObj.appendChild(this.overlay);
	=09
		if (Prototype.Browser.IE) {
			this.overlay =3D =
$(window.G_vmlCanvasManager.initElement(this.overlay));
		}
	=09
		this.overlay =3D $(this.overlay);
		this.overlayContext =3D this.overlay.getContext("2d");

		if(this.options.selection.mode)
		{
			this.overlay.observe('mousedown', this.onMouseDown.bind(this));
			this.overlay.observe('mousemove', this.onMouseMove.bind(this));
		}
		if(this.options.grid.clickable) {
			this.overlay.observe('click', this.onClick.bind(this));
		}
		if(this.options.mouse.track)
		{
			this.overlay.observe('mousemove', this.onMouseMove.bind(this));
		}
	},
	/**
	 * function: setupGrid
	 *=20
	 * Description: a container function that does a few interesting =
things.
	 *=20
	 * 1. calls <extendXRangeIfNeededByBar> function which makes sure that =
our axis are expanded if needed
	 *=20
	 * 2. calls <setRange> function providing xaxis options which fixes the =
ranges according to data points
	 *=20
	 * 3. calls <prepareTickGeneration> function for xaxis which generates =
ticks according to options provided by user
	 *=20
	 * 4. calls <setTicks> function for xaxis that sets the ticks
	 *=20
	 * similar sequence is called for y-axis.=20
	 *=20
	 * At the end if this is a pie chart than we insert Labels (around the =
pie chart) via <insertLabels> and we also call <insertLegend>
	 */
	setupGrid: function()
	{
		if(this.options.bars.show)
		{
			this.xaxis.max +=3D 0.5;
			this.xaxis.min -=3D 0.5;
		}
		//x-axis
		this.extendXRangeIfNeededByBar();
		this.setRange(this.xaxis, this.options.xaxis);
		this.prepareTickGeneration(this.xaxis, this.options.xaxis);
		this.setTicks(this.xaxis, this.options.xaxis);
	=09
	=09
		//y-axis
		this.setRange(this.yaxis, this.options.yaxis);
		this.prepareTickGeneration(this.yaxis, this.options.yaxis);
		this.setTicks(this.yaxis, this.options.yaxis);
		this.setSpacing();
	=09
		if(!this.options.pies.show)
		{
			this.insertLabels();
		}
		this.insertLegend();
	},
	/**
	 * function: setRange
	 *=20
	 * parameters:
	 * {Object} axis
	 * {Object} axisOptions
	 */
	setRange: function(axis, axisOptions) {
		var min =3D axisOptions.min !=3D null ? axisOptions.min : =
axis.datamin;
		var max =3D axisOptions.max !=3D null ? axisOptions.max : =
axis.datamax;

		if (max - min =3D=3D 0.0) {
			// degenerate case
			var widen;
			if (max =3D=3D 0.0)
				widen =3D 1.0;
			else
				widen =3D 0.01;

			min -=3D widen;
			max +=3D widen;
		}
		else {
			// consider autoscaling
			var margin =3D axisOptions.autoscaleMargin;
			if (margin !=3D null) {
				if (axisOptions.min =3D=3D null) {
					min -=3D (max - min) * margin;
					// make sure we don't go below zero if all values
					// are positive
					if (min < 0 && axis.datamin >=3D 0)
						min =3D 0;
				}
				if (axisOptions.max =3D=3D null) {
					max +=3D (max - min) * margin;
					if (max > 0 && axis.datamax <=3D 0)
						max =3D 0;
				}
			}
		}
		axis.min =3D min;
		axis.max =3D max;
	},
	/**
	 * function: prepareTickGeneration
	 *=20
	 * Parameters:
	 * {Object} axis
	 * {Object} axisOptions
	 */
	prepareTickGeneration: function(axis, axisOptions) {
		// estimate number of ticks
		var noTicks;
		if (Object.isNumber(axisOptions.ticks) && axisOptions.ticks > 0)
			noTicks =3D axisOptions.ticks;
		else if (axis =3D=3D this.xaxis)
			noTicks =3D this.canvasWidth / 100;
		else
			noTicks =3D this.canvasHeight / 60;
	=09
		var delta =3D (axis.max - axis.min) / noTicks;
		var size, generator, unit, formatter, i, magn, norm;

		if (axisOptions.mode =3D=3D "time") {
			function formatDate(d, fmt, monthNames) {
				var leftPad =3D function(n) {
					n =3D "" + n;
					return n.length =3D=3D 1 ? "0" + n : n;
				};
			=09
				var r =3D [];
				var escape =3D false;
				if (monthNames =3D=3D null)
					monthNames =3D ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", =
"Aug", "Sep", "Oct", "Nov", "Dec"];
				for (var i =3D 0; i < fmt.length; ++i) {
					var c =3D fmt.charAt(i);
				=09
					if (escape) {
						switch (c) {
						case 'h': c =3D "" + d.getHours(); break;
						case 'H': c =3D leftPad(d.getHours()); break;
						case 'M': c =3D leftPad(d.getMinutes()); break;
						case 'S': c =3D leftPad(d.getSeconds()); break;
						case 'd': c =3D "" + d.getDate(); break;
						case 'm': c =3D "" + (d.getMonth() + 1); break;
						case 'y': c =3D "" + d.getFullYear(); break;
						case 'b': c =3D "" + monthNames[d.getMonth()]; break;
						}
						r.push(c);
						escape =3D false;
					}
					else {
						if (c =3D=3D "%")
							escape =3D true;
						else
							r.push(c);
					}
				}
				return r.join("");
			}
		=09
			=09
			// map of app. size of time units in milliseconds
			var timeUnitSize =3D {
				"second": 1000,
				"minute": 60 * 1000,
				"hour": 60 * 60 * 1000,
				"day": 24 * 60 * 60 * 1000,
				"month": 30 * 24 * 60 * 60 * 1000,
				"year": 365.2425 * 24 * 60 * 60 * 1000
			};


			// the allowed tick sizes, after 1 year we use
			// an integer algorithm
			var spec =3D [
				[1, "second"], [2, "second"], [5, "second"], [10, "second"],
				[30, "second"],=20
				[1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"],
				[30, "minute"],=20
				[1, "hour"], [2, "hour"], [4, "hour"],
				[8, "hour"], [12, "hour"],
				[1, "day"], [2, "day"], [3, "day"],
				[0.25, "month"], [0.5, "month"], [1, "month"],
				[2, "month"], [3, "month"], [6, "month"],
				[1, "year"]
			];

			var minSize =3D 0;
			if (axisOptions.minTickSize !=3D null) {
				if (typeof axisOptions.tickSize =3D=3D "number")
					minSize =3D axisOptions.tickSize;
				else
					minSize =3D axisOptions.minTickSize[0] * =
timeUnitSize[axisOptions.minTickSize[1]];
			}
		=09
			for (i =3D 0; i < spec.length - 1; ++i) {
				if (delta < (spec[i][0] * timeUnitSize[spec[i][1]] + spec[i + 1][0] =
* timeUnitSize[spec[i + 1][1]]) / 2 && spec[i][0] * =
timeUnitSize[spec[i][1]] >=3D minSize) {
					break;
				}
			}
		=09
			size =3D spec[i][0];
			unit =3D spec[i][1];
		=09
			// special-case the possibility of several years
			if (unit =3D=3D "year") {
				magn =3D Math.pow(10, Math.floor(Math.log(delta / timeUnitSize.year) =
/ Math.LN10));
				norm =3D (delta / timeUnitSize.year) / magn;
				if (norm < 1.5)
					size =3D 1;
				else if (norm < 3)
					size =3D 2;
				else if (norm < 7.5)
					size =3D 5;
				else
					size =3D 10;

				size *=3D magn;
			}

			if (axisOptions.tickSize) {
				size =3D axisOptions.tickSize[0];
				unit =3D axisOptions.tickSize[1];
			}
		=09
			var floorInBase =3D this.floorInBase; //gives us a reference to a =
global function..=20
		=09
			generator =3D function(axis) {
				var ticks =3D [],
					tickSize =3D axis.tickSize[0], unit =3D axis.tickSize[1],
					d =3D new Date(axis.min);
			=09
				var step =3D tickSize * timeUnitSize[unit];
			=09
			=09
			=09
				if (unit =3D=3D "second")
					d.setSeconds(floorInBase(d.getSeconds(), tickSize));
				if (unit =3D=3D "minute")
					d.setMinutes(floorInBase(d.getMinutes(), tickSize));
				if (unit =3D=3D "hour")
					d.setHours(floorInBase(d.getHours(), tickSize));
				if (unit =3D=3D "month")
					d.setMonth(floorInBase(d.getMonth(), tickSize));
				if (unit =3D=3D "year")
					d.setFullYear(floorInBase(d.getFullYear(), tickSize));
			=09
				// reset smaller components
				d.setMilliseconds(0);
				if (step >=3D timeUnitSize.minute)
					d.setSeconds(0);
				if (step >=3D timeUnitSize.hour)
					d.setMinutes(0);
				if (step >=3D timeUnitSize.day)
					d.setHours(0);
				if (step >=3D timeUnitSize.day * 4)
					d.setDate(1);
				if (step >=3D timeUnitSize.year)
					d.setMonth(0);


				var carry =3D 0, v;
				do {
					v =3D d.getTime();
					ticks.push({ v: v, label: axis.tickFormatter(v, axis) });
					if (unit =3D=3D "month") {
						if (tickSize < 1) {
							d.setDate(1);
							var start =3D d.getTime();
							d.setMonth(d.getMonth() + 1);
							var end =3D d.getTime();
							d.setTime(v + carry * timeUnitSize.hour + (end - start) * =
tickSize);
							carry =3D d.getHours();
							d.setHours(0);
						}
						else
							d.setMonth(d.getMonth() + tickSize);
					}
					else if (unit =3D=3D "year") {
						d.setFullYear(d.getFullYear() + tickSize);
					}
					else
						d.setTime(v + step);
				} while (v < axis.max);

				return ticks;
			};

			formatter =3D function (v, axis) {
				var d =3D new Date(v);

				// first check global format
				if (axisOptions.timeformat !=3D null)
					return formatDate(d, axisOptions.timeformat, =
axisOptions.monthNames);
			=09
				var t =3D axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];
				var span =3D axis.max - axis.min;
			=09
				if (t < timeUnitSize.minute)
					fmt =3D "%h:%M:%S";
				else if (t < timeUnitSize.day) {
					if (span < 2 * timeUnitSize.day)
						fmt =3D "%h:%M";
					else
						fmt =3D "%b %d %h:%M";
				}
				else if (t < timeUnitSize.month)
					fmt =3D "%b %d";
				else if (t < timeUnitSize.year) {
					if (span < timeUnitSize.year)
						fmt =3D "%b";
					else
						fmt =3D "%b %y";
				}
				else
					fmt =3D "%y";
			=09
				return formatDate(d, fmt, axisOptions.monthNames);
			};
		}
		else {
			// pretty rounding of base-10 numbers
			var maxDec =3D axisOptions.tickDecimals;
			var dec =3D -Math.floor(Math.log(delta) / Math.LN10);
			if (maxDec !=3D null && dec > maxDec)
				dec =3D maxDec;
		=09
			magn =3D Math.pow(10, -dec);
			norm =3D delta / magn; // norm is between 1.0 and 10.0
		=09
			if (norm < 1.5)
				size =3D 1;
			else if (norm < 3) {
				size =3D 2;
				// special case for 2.5, requires an extra decimal
				if (norm > 2.25 && (maxDec =3D=3D null || dec + 1 <=3D maxDec)) {
					size =3D 2.5;
					++dec;
				}
			}
			else if (norm < 7.5)
				size =3D 5;
			else
				size =3D 10;

			size *=3D magn;
		=09
			if (axisOptions.minTickSize !=3D null && size < =
axisOptions.minTickSize)
				size =3D axisOptions.minTickSize;

			if (axisOptions.tickSize !=3D null)
				size =3D axisOptions.tickSize;
		=09
			axis.tickDecimals =3D Math.max(0, (maxDec !=3D null) ? maxDec : dec);
		=09
			var floorInBase =3D this.floorInBase;
		=09
			generator =3D function (axis) {
				var ticks =3D [];
				var start =3D floorInBase(axis.min, axis.tickSize);
				// then spew out all possible ticks
				var i =3D 0, v;
				do {
					v =3D start + i * axis.tickSize;
					ticks.push({ v: v, label: axis.tickFormatter(v, axis) });
					++i;
				} while (v < axis.max);
				return ticks;
			};

			formatter =3D function (v, axis) {
				if(v) {
				return v.toFixed(axis.tickDecimals);
				}
				return 0;
			};
		}

		axis.tickSize =3D unit ? [size, unit] : size;
		axis.tickGenerator =3D generator;
		if (Object.isFunction(axisOptions.tickFormatter))
			axis.tickFormatter =3D function (v, axis) { return "" + =
axisOptions.tickFormatter(v, axis); };
		else
			axis.tickFormatter =3D formatter;
	},
	/**
	 * function: extendXRangeIfNeededByBar
	 */
	extendXRangeIfNeededByBar: function() {

		if (this.options.xaxis.max =3D=3D null) {
			// great, we're autoscaling, check if we might need a bump
			var newmax =3D this.xaxis.max;
			this.graphData.each(function(gd){
				if(gd.bars.show && gd.bars.barWidth + this.xaxis.datamax > newmax)
				{
					newmax =3D this.xaxis.datamax + gd.bars.barWidth;
				}
			}.bind(this));
			this.xaxis.nax =3D newmax;
		=09
		}
	},
	/**
	 * function: setTicks
	 *=20
	 * parameters:
	 * {Object} axis
	 * {Object} axisOptions
	 */
	setTicks: function(axis, axisOptions) {
		axis.ticks =3D [];
	=09
		if (axisOptions.ticks =3D=3D null)
			axis.ticks =3D axis.tickGenerator(axis);
		else if (typeof axisOptions.ticks =3D=3D "number") {
			if (axisOptions.ticks > 0)
				axis.ticks =3D axis.tickGenerator(axis);
		}
		else if (axisOptions.ticks) {
			var ticks =3D axisOptions.ticks;

			if (Object.isFunction(ticks))
				// generate the ticks
				ticks =3D ticks({ min: axis.min, max: axis.max });
		=09
			// clean up the user-supplied ticks, copy them over
			//var i, v;
			ticks.each(function(t, i){
				var v =3D null;
				var label =3D null;
				if(typeof t =3D=3D 'object') {
					v =3D t[0];
					if(t.length > 1) { label =3D t[1]; }
				}
				else {
					v =3D t;
				}
				if(!label) {
					label =3D axis.tickFormatter(v, axis);
				}
				axis.ticks[i] =3D {v: v, label: label}
			}.bind(this));

		}

		if (axisOptions.autoscaleMargin !=3D null && axis.ticks.length > 0) {
			if (axisOptions.min =3D=3D null)
				axis.min =3D Math.min(axis.min, axis.ticks[0].v);
			if (axisOptions.max =3D=3D null && axis.ticks.length > 1)
				axis.max =3D Math.min(axis.max, axis.ticks[axis.ticks.length - =
1].v);
		}
	},
	/**
	 * Function: setSpacing
	 *=20
	 * Parameters: none
	 */
	setSpacing: function() {
		// calculate y label dimensions
		var i, labels =3D [], l;
		for (i =3D 0; i < this.yaxis.ticks.length; ++i) {
			l =3D this.yaxis.ticks[i].label;

			if (l)
				labels.push('<div class=3D"tickLabel">' + l + '</div>');
		}

		if (labels.length > 0) {
			var dummyDiv =3D new Element('div', {'style': =
'position:absolute;top:-10000px;font-size:smaller'});
			dummyDiv.update(labels.join(""));
			this.domObj.insert(dummyDiv);
			this.yLabelMaxWidth =3D dummyDiv.getWidth();
			this.yLabelMaxHeight =3D dummyDiv.select('div')[0].getHeight();
			dummyDiv.remove();
		}

		var maxOutset =3D this.options.grid.borderWidth;
		if (this.options.points.show)
			maxOutset =3D Math.max(maxOutset, this.options.points.radius + =
this.options.points.lineWidth/2);
		for (i =3D 0; i < this.graphData.length; ++i) {
			if (this.graphData[i].points.show)
				maxOutset =3D Math.max(maxOutset, this.graphData[i].points.radius + =
this.graphData[i].points.lineWidth/2);
		}

		this.chartOffset.left =3D this.chartOffset.right =3D =
this.chartOffset.top =3D this.chartOffset.bottom =3D maxOutset;
	=09
		this.chartOffset.left +=3D this.yLabelMaxWidth + =
this.options.grid.labelMargin;
		this.chartWidth =3D this.canvasWidth - this.chartOffset.left - =
this.chartOffset.right;

		this.xLabelBoxWidth =3D this.chartWidth / 6;
		labels =3D [];

		for (i =3D 0; i < this.xaxis.ticks.length; ++i) {
			l =3D this.xaxis.ticks[i].label;
			if (l) {
				labels.push('<span class=3D"tickLabel" width=3D"' + =
this.xLabelBoxWidth + '">' + l + '</span>');
			}
		}

		var xLabelMaxHeight =3D 0;
		if (labels.length > 0) {
			var dummyDiv =3D new Element('div', {'style': =
'position:absolute;top:-10000px;font-size:smaller'});
			dummyDiv.update(labels.join(""));
			this.domObj.appendChild(dummyDiv);=09
			xLabelMaxHeight =3D dummyDiv.getHeight();
			dummyDiv.remove();
		}

		this.chartOffset.bottom +=3D xLabelMaxHeight + =
this.options.grid.labelMargin;
		this.chartHeight =3D this.canvasHeight - this.chartOffset.bottom - =
this.chartOffset.top;
		this.hozScale =3D this.chartWidth / (this.xaxis.max - this.xaxis.min);
		this.vertScale =3D this.chartHeight / (this.yaxis.max - =
this.yaxis.min);
	},
	/**
	 * function: draw
	 */
	draw: function() {
		if(this.options.bars.show)
		{
			this.extendXRangeIfNeededByBar();
			this.setSpacing();
			this.drawGrid();
			this.drawBarGraph(this.graphData, this.barDataRange);
		}
		else if(this.options.pies.show)
		{
			this.preparePieData(this.graphData);
			this.drawPieGraph(this.graphData);
		}
		else
		{
			this.drawGrid();
			for (var i =3D 0; i < this.graphData.length; i++) {
				this.drawGraph(this.graphData[i]);
			}
		}
	},
    /**
     * function: translateHoz
     *=20
     * Paramters:
     * {Object} x
     *=20
     * Description: Given a value this function translate it to relative =
x coord on canvas
     */
	translateHoz: function(x) {
        return (x - this.xaxis.min) * this.hozScale;
    },
	/**
	 * function: translateVert
	 *=20
	 * parameters:
	 * {Object} y
	 *=20
	 * Description: Given a value this function translate it to relative y =
coord on canvas
	 */
    translateVert: function(y) {
        return this.chartHeight - (y - this.yaxis.min) * this.vertScale;
    },=09
	/**
	 * function: drawGrid
	 *=20
	 * parameters: none
	 *=20
	 * description: draws the actual grid on the canvas
	 */
	drawGrid: function() {
		var i;
	=09
		this.context.save();
		this.context.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
		this.context.translate(this.chartOffset.left, this.chartOffset.top);

		// draw background, if any
		if (this.options.grid.backgroundColor !=3D null) {
			this.context.fillStyle =3D this.options.grid.backgroundColor;
			this.context.fillRect(0, 0, this.chartWidth, this.chartHeight);
		}

		// draw colored areas
		if (this.options.grid.coloredAreas) {
			var areas =3D this.options.grid.coloredAreas;
			if (Object.isFunction(areas)) {
				areas =3D areas({ xmin: this.xaxis.min, xmax: this.xaxis.max, ymin: =
this.yaxis.min, ymax: this.yaxis.max });
			}
		=09
			areas.each(function(a){
				// clip
				if (a.x1 =3D=3D null || a.x1 < this.xaxis.min)
					a.x1 =3D this.xaxis.min;
				if (a.x2 =3D=3D null || a.x2 > this.xaxis.max)
					a.x2 =3D this.xaxis.max;
				if (a.y1 =3D=3D null || a.y1 < this.yaxis.min)
					a.y1 =3D this.yaxis.min;
				if (a.y2 =3D=3D null || a.y2 > this.yaxis.max)
					a.y2 =3D this.yaxis.max;

				var tmp;
				if (a.x1 > a.x2) {
					tmp =3D a.x1;
					a.x1 =3D a.x2;
					a.x2 =3D tmp;
				}
				if (a.y1 > a.y2) {
					tmp =3D a.y1;
					a.y1 =3D a.y2;
					a.y2 =3D tmp;
				}

				if (a.x1 >=3D this.xaxis.max || a.x2 <=3D this.xaxis.min || a.x1 =
=3D=3D a.x2
					|| a.y1 >=3D this.yaxis.max || a.y2 <=3D this.yaxis.min || a.y1 =
=3D=3D a.y2)
					return;

				this.context.fillStyle =3D a.color || =
this.options.grid.coloredAreasColor;
				this.context.fillRect(Math.floor(this.translateHoz(a.x1)), =
Math.floor(this.translateVert(a.y2)),
							 Math.floor(this.translateHoz(a.x2) - this.translateHoz(a.x1)), =
Math.floor(this.translateVert(a.y1) - this.translateVert(a.y2)));			=09
			}.bind(this));

		=09
		}
	=09
		// draw the inner grid
		this.context.lineWidth =3D 1;
		this.context.strokeStyle =3D this.options.grid.tickColor;
		this.context.beginPath();
		var v;
		if (this.options.grid.drawXAxis) {
			this.xaxis.ticks.each(function(aTick){
				v =3D aTick.v;
				if(v <=3D this.xaxis.min || v >=3D this.xaxis.max) {
					return;
				}
				this.context.moveTo(Math.floor(this.translateHoz(v)) + =
this.context.lineWidth / 2, 0);
				this.context.lineTo(Math.floor(this.translateHoz(v)) + =
this.context.lineWidth / 2, this.chartHeight);
			}.bind(this));

		}
	=09
		if (this.options.grid.drawYAxis) {
			this.yaxis.ticks.each(function(aTick){
				v =3D aTick.v;
				if(v <=3D this.yaxis.min || v >=3D this.yaxis.max) {
					return;
				}
				this.context.moveTo(0, Math.floor(this.translateVert(v)) + =
this.context.lineWidth / 2);
				this.context.lineTo(this.chartWidth, =
Math.floor(this.translateVert(v)) + this.context.lineWidth / 2);
			}.bind(this));
		=09
		}
		this.context.stroke();
	=09
		if (this.options.grid.borderWidth) {
			// draw border
			this.context.lineWidth =3D this.options.grid.borderWidth;
			this.context.strokeStyle =3D this.options.grid.color;
			this.context.lineJoin =3D "round";
			this.context.strokeRect(0, 0, this.chartWidth, this.chartHeight);
			this.context.restore();
		}
	},
	/**
	 * function: insertLabels
	 *=20
	 * parameters: none
	 *=20
	 * description: inserts the label with proper spacing. Both on X and Y =
axis
	 */
	insertLabels: function() {
		this.domObj.select(".tickLabels").invoke('remove');
	=09
		var i, tick;
		var html =3D '<div class=3D"tickLabels" =
style=3D"font-size:smaller;color:' + this.options.grid.color + '">';
	=09
		// do the x-axis
		this.xaxis.ticks.each(function(tick){
			if (!tick.label || tick.v < this.xaxis.min || tick.v > =
this.xaxis.max)
				return;
			html +=3D '<div style=3D"position:absolute;top:' + =
(this.chartOffset.top + this.chartHeight + =
this.options.grid.labelMargin) + 'px;left:' + (this.chartOffset.left + =
this.translateHoz(tick.v) - this.xLabelBoxWidth/2) + 'px;width:' + =
this.xLabelBoxWidth + 'px;text-align:center" class=3D"tickLabel">' + =
tick.label + "</div>";
		=09
		}.bind(this));
	=09
		// do the y-axis
		this.yaxis.ticks.each(function(tick){
			if (!tick.label || tick.v < this.yaxis.min || tick.v > =
this.yaxis.max)
				return;
			html +=3D '<div id=3D"ylabels" style=3D"position:absolute;top:' + =
(this.chartOffset.top + this.translateVert(tick.v) - =
this.yLabelMaxHeight/2) + 'px;left:0;width:' + this.yLabelMaxWidth + =
'px;text-align:right" class=3D"tickLabel">' + tick.label + "</div>";
		}.bind(this));

		html +=3D '</div>';
	=09
		this.domObj.insert(html);
	},
	/**
	 * function: drawGraph
	 *=20
	 * Paramters:
	 * {Object} graphData
	 *=20
	 * Description: given a graphData (series) this function calls a proper =
lower level method to draw it.
	 */
	drawGraph: function(graphData) {
		if (graphData.lines.show || (!graphData.bars.show && =
!graphData.points.show))
			this.drawGraphLines(graphData);
		if (graphData.bars.show)
			this.drawGraphBar(graphData);
		if (graphData.points.show)
			this.drawGraphPoints(graphData);
	},
	/**
	 * function: plotLine
	 *=20
	 * parameters:
	 * {Object} data
	 * {Object} offset
	 *=20
	 * description:=20
	 * Helper function that plots a line based on the data provided
	 */
	plotLine: function(data, offset) {
        var prev, cur =3D null, drawx =3D null, drawy =3D null;
       =20
        this.context.beginPath();
        for (var i =3D 0; i < data.length; ++i) {
            prev =3D cur;
            cur =3D data[i];

            if (prev =3D=3D null || cur =3D=3D null)
                continue;
           =20
            var x1 =3D prev[0], y1 =3D prev[1],
                x2 =3D cur[0], y2 =3D cur[1];

            // clip with ymin
            if (y1 <=3D y2 && y1 < this.yaxis.min) {
                if (y2 < this.yaxis.min)
                    continue;   // line segment is outside
                // compute new intersection point
                x1 =3D (this.yaxis.min - y1) / (y2 - y1) * (x2 - x1) + =
x1;
                y1 =3D this.yaxis.min;
            }
            else if (y2 <=3D y1 && y2 < this.yaxis.min) {
                if (y1 < this.yaxis.min)
                    continue;
                x2 =3D (this.yaxis.min - y1) / (y2 - y1) * (x2 - x1) + =
x1;
                y2 =3D this.yaxis.min;
            }

            // clip with ymax
            if (y1 >=3D y2 && y1 > this.yaxis.max) {
                if (y2 > this.yaxis.max)
                    continue;
                x1 =3D (this.yaxis.max - y1) / (y2 - y1) * (x2 - x1) + =
x1;
                y1 =3D this.yaxis.max;
            }
            else if (y2 >=3D y1 && y2 > this.yaxis.max) {
                if (y1 > this.yaxis.max)
                    continue;
                x2 =3D (this.yaxis.max - y1) / (y2 - y1) * (x2 - x1) + =
x1;
                y2 =3D this.yaxis.max;
            }

            // clip with xmin
            if (x1 <=3D x2 && x1 < this.xaxis.min) {
                if (x2 < this.xaxis.min)
                    continue;
                y1 =3D (this.xaxis.min - x1) / (x2 - x1) * (y2 - y1) + =
y1;
                x1 =3D this.xaxis.min;
            }
            else if (x2 <=3D x1 && x2 < this.xaxis.min) {
                if (x1 < this.xaxis.min)
                    continue;
                y2 =3D (this.xaxis.min - x1) / (x2 - x1) * (y2 - y1) + =
y1;
                x2 =3D this.xaxis.min;
            }

            // clip with xmax
            if (x1 >=3D x2 && x1 > this.xaxis.max) {
                if (x2 > this.xaxis.max)
                    continue;
                y1 =3D (this.xaxis.max - x1) / (x2 - x1) * (y2 - y1) + =
y1;
                x1 =3D this.xaxis.max;
            }
            else if (x2 >=3D x1 && x2 > this.xaxis.max) {
                if (x1 > this.xaxis.max)
                    continue;
                y2 =3D (this.xaxis.max - x1) / (x2 - x1) * (y2 - y1) + =
y1;
                x2 =3D this.xaxis.max;
            }

            if (drawx !=3D this.translateHoz(x1) || drawy !=3D =
this.translateVert(y1) + offset)
                this.context.moveTo(this.translateHoz(x1), =
this.translateVert(y1) + offset);
           =20
            drawx =3D this.translateHoz(x2);
            drawy =3D this.translateVert(y2) + offset;
            this.context.lineTo(drawx, drawy);
        }
        this.context.stroke();
    },
	/**
	 * function: plotLineArea
	 *=20
	 * parameters:
	 * {Object} data
	 *=20
	 * description:
	 * Helper functoin that plots a colored line graph. This function
	 * takes the data nad then fill in the area on the graph properly
	 */
	plotLineArea: function(data) {
        var prev, cur =3D null;
       =20
        var bottom =3D Math.min(Math.max(0, this.yaxis.min), =
this.yaxis.max);
        var top, lastX =3D 0;

        var areaOpen =3D false;
       =20
        for (var i =3D 0; i < data.length; ++i) {
            prev =3D cur;
            cur =3D data[i];

            if (areaOpen && prev !=3D null && cur =3D=3D null) {
                // close area
                this.context.lineTo(this.translateHoz(lastX), =
this.translateVert(bottom));
                this.context.fill();
                areaOpen =3D false;
                continue;
            }

            if (prev =3D=3D null || cur =3D=3D null)
                continue;
               =20
            var x1 =3D prev[0], y1 =3D prev[1],
                x2 =3D cur[0], y2 =3D cur[1];

            // clip x values
           =20
            // clip with xmin
            if (x1 <=3D x2 && x1 < this.xaxis.min) {
                if (x2 < this.xaxis.min)
                    continue;
                y1 =3D (this.xaxis.min - x1) / (x2 - x1) * (y2 - y1) + =
y1;
                x1 =3D this.xaxis.min;
            }
            else if (x2 <=3D x1 && x2 < this.xaxis.min) {
                if (x1 < this.xaxis.min)
                    continue;
                y2 =3D (this.xaxis.min - x1) / (x2 - x1) * (y2 - y1) + =
y1;
                x2 =3D this.xaxis.min;
            }

            // clip with xmax
            if (x1 >=3D x2 && x1 > this.xaxis.max) {
                if (x2 > this.xaxis.max)
                    continue;
                y1 =3D (this.xaxis.max - x1) / (x2 - x1) * (y2 - y1) + =
y1;
                x1 =3D this.xaxis.max;
            }
            else if (x2 >=3D x1 && x2 > this.xaxis.max) {
                if (x1 > this.xaxis.max)
                    continue;
                y2 =3D (this.xaxis.max - x1) / (x2 - x1) * (y2 - y1) + =
y1;
                x2 =3D this.xaxis.max;
            }

            if (!areaOpen) {
                // open area
                this.context.beginPath();
                this.context.moveTo(this.translateHoz(x1), =
this.translateVert(bottom));
                areaOpen =3D true;
            }
           =20
            // now first check the case where both is outside
            if (y1 >=3D this.yaxis.max && y2 >=3D this.yaxis.max) {
                this.context.lineTo(this.translateHoz(x1), =
this.translateVert(this.yaxis.max));
                this.context.lineTo(this.translateHoz(x2), =
this.translateVert(this.yaxis.max));
                continue;
            }
            else if (y1 <=3D this.yaxis.min && y2 <=3D this.yaxis.min) {
                this.context.lineTo(this.translateHoz(x1), =
this.translateVert(this.yaxis.min));
                this.context.lineTo(this.translateHoz(x2), =
this.translateVert(this.yaxis.min));
                continue;
            }
           =20
            var x1old =3D x1, x2old =3D x2;

            // clip with ymin
            if (y1 <=3D y2 && y1 < this.yaxis.min && y2 >=3D =
this.yaxis.min) {
                x1 =3D (this.yaxis.min - y1) / (y2 - y1) * (x2 - x1) + =
x1;
                y1 =3D this.yaxis.min;
            }
            else if (y2 <=3D y1 && y2 < this.yaxis.min && y1 >=3D =
this.yaxis.min) {
                x2 =3D (this.yaxis.min - y1) / (y2 - y1) * (x2 - x1) + =
x1;
                y2 =3D this.yaxis.min;
            }

            // clip with ymax
            if (y1 >=3D y2 && y1 > this.yaxis.max && y2 <=3D =
this.yaxis.max) {
                x1 =3D (this.yaxis.max - y1) / (y2 - y1) * (x2 - x1) + =
x1;
                y1 =3D this.yaxis.max;
            }
            else if (y2 >=3D y1 && y2 > this.yaxis.max && y1 <=3D =
this.yaxis.max) {
                x2 =3D (this.yaxis.max - y1) / (y2 - y1) * (x2 - x1) + =
x1;
                y2 =3D this.yaxis.max;
            }


            // if the x value was changed we got a rectangle
            // to fill
            if (x1 !=3D x1old) {
                if (y1 <=3D this.yaxis.min)
                    top =3D this.yaxis.min;
                else
                    top =3D this.yaxis.max;
               =20
                this.context.lineTo(this.translateHoz(x1old), =
this.translateVert(top));
                this.context.lineTo(this.translateHoz(x1), =
this.translateVert(top));
            }
           =20
            // fill the triangles
            this.context.lineTo(this.translateHoz(x1), =
this.translateVert(y1));
            this.context.lineTo(this.translateHoz(x2), =
this.translateVert(y2));

            // fill the other rectangle if it's there
            if (x2 !=3D x2old) {
                if (y2 <=3D this.yaxis.min)
                    top =3D this.yaxis.min;
                else
                    top =3D this.yaxis.max;
               =20
                this.context.lineTo(this.translateHoz(x2old), =
this.translateVert(top));
                this.context.lineTo(this.translateHoz(x2), =
this.translateVert(top));
            }

            lastX =3D Math.max(x2, x2old);
        }

        if (areaOpen) {
            this.context.lineTo(this.translateHoz(lastX), =
this.translateVert(bottom));
            this.context.fill();
        }
    },	=09
	/**
	 * function: drawGraphLines
	 *=20
	 * parameters:
	 * {Object} graphData
	 *=20
	 * description:
	 * Main function that daws the line graph. This function is called=20
	 * if <options> lines property is set to show or no other type of=20
	 * graph is specified. This function depends on <plotLineArea> and=20
	 * <plotLine> functions.
	 */
	drawGraphLines: function(graphData) {
        this.context.save();
        this.context.translate(this.chartOffset.left, =
this.chartOffset.top);
        this.context.lineJoin =3D "round";

        var lw =3D graphData.lines.lineWidth;
        var sw =3D graphData.shadowSize;
        // FIXME: consider another form of shadow when filling is turned =
on
        if (sw > 0) {
            // draw shadow in two steps
            this.context.lineWidth =3D sw / 2;
            this.context.strokeStyle =3D "rgba(0,0,0,0.1)";
            this.plotLine(graphData.data, lw/2 + sw/2 + =
this.context.lineWidth/2);

            this.context.lineWidth =3D sw / 2;
            this.context.strokeStyle =3D "rgba(0,0,0,0.2)";
            this.plotLine(graphData.data, lw/2 + =
this.context.lineWidth/2);
        }

        this.context.lineWidth =3D lw;
        this.context.strokeStyle =3D graphData.color;
        if (graphData.lines.fill) {
            this.context.fillStyle =3D graphData.lines.fillColor !=3D =
null ? graphData.lines.fillColor : =
this.parseColor(graphData.color).scale(null, null, null, =
0.4).toString();
            this.plotLineArea(graphData.data, 0);
        }

        this.plotLine(graphData.data, 0);
        this.context.restore();
    },
	/**
	 * function: plotPoints
	 *=20
	 * parameters:
	 * {Object} data
	 * {Object} radius
	 * {Object} fill
	 *=20
	 * description:
	 * Helper function that draws the point graph according to the data =
provided. Size of each=20
	 * point is provided by radius variable and fill specifies if points=20
	 * are filled
	 */
	plotPoints: function(data, radius, fill) {
        for (var i =3D 0; i < data.length; ++i) {
            if (data[i] =3D=3D null)
                continue;
           =20
            var x =3D data[i][0], y =3D data[i][1];
            if (x < this.xaxis.min || x > this.xaxis.max || y < =
this.yaxis.min || y > this.yaxis.max)
                continue;
           =20
            this.context.beginPath();
            this.context.arc(this.translateHoz(x), =
this.translateVert(y), radius, 0, 2 * Math.PI, true);
            if (fill)
                this.context.fill();
            this.context.stroke();
        }
    },
	/**
	 * function: plotPointShadows
	 *=20
	 * parameters:
	 * {Object} data
	 * {Object} offset
	 * {Object} radius
	 *=20
	 * description:=20
	 * Helper function that draws the shadows for the points.
	 */
    plotPointShadows: function(data, offset, radius) {
        for (var i =3D 0; i < data.length; ++i) {
            if (data[i] =3D=3D null)
                continue;
           =20
            var x =3D data[i][0], y =3D data[i][1];
            if (x < this.xaxis.min || x > this.xaxis.max || y < =
this.yaxis.min || y > this.yaxis.max)
                continue;
            this.context.beginPath();
            this.context.arc(this.translateHoz(x), this.translateVert(y) =
+ offset, radius, 0, Math.PI, false);
            this.context.stroke();
        }
    },
	/**
	 * function: drawGraphPoints
	 *=20
	 * paramters:
	 * {Object} graphData
	 *=20
	 * description:
	 * Draws the point graph onto the canvas. This function depends on =
helper=20
	 * functions <plotPointShadows> and <plotPoints>
	 */
    drawGraphPoints: function(graphData) {
       	this.context.save();
        this.context.translate(this.chartOffset.left, =
this.chartOffset.top);

        var lw =3D graphData.lines.lineWidth;
        var sw =3D graphData.shadowSize;
        if (sw > 0) {
            // draw shadow in two steps
            this.context.lineWidth =3D sw / 2;
            this.context.strokeStyle =3D "rgba(0,0,0,0.1)";
            this.plotPointShadows(graphData.data, sw/2 + =
this.context.lineWidth/2, graphData.points.radius);

            this.context.lineWidth =3D sw / 2;
            this.context.strokeStyle =3D "rgba(0,0,0,0.2)";
            this.plotPointShadows(graphData.data, =
this.context.lineWidth/2, graphData.points.radius);
        }

        this.context.lineWidth =3D graphData.points.lineWidth;
        this.context.strokeStyle =3D graphData.color;
        this.context.fillStyle =3D graphData.points.fillColor !=3D null =
? graphData.points.fillColor : graphData.color;
        this.plotPoints(graphData.data, graphData.points.radius, =
graphData.points.fill);
        this.context.restore();
    },
	/**
	 * function: preparePieData
	 *=20
	 * parameters:
	 * {Object} graphData
	 *=20
	 * Description:=20
	 * Helper function that manipulates the given data stream so that it =
can=20
	 * be plotted as a Pie Chart
	 */
	preparePieData: function(graphData)
	{
		for(i =3D 0; i < graphData.length; i++)
		{
			var data =3D 0;
			for(j =3D 0; j < graphData[i].data.length; j++){
				data +=3D parseInt(graphData[i].data[j][1]);
			}
			graphData[i].data =3D data;
		}
	},
	/**
	 * function: drawPieShadow
	 *=20
	 * {Object} anchorX
	 * {Object} anchorY
	 * {Object} radius
	 *=20
	 * description:
	 * Helper function that draws a shadow for the Pie Chart. This just =
draws=20
	 * a circle with offset that simulates shadow. We do not give each =
piece=20
	 * of the pie an individual shadow.
	 */
	drawPieShadow: function(anchorX, anchorY, radius)
	{
		this.context.beginPath();
		this.context.moveTo(anchorX, anchorY);
		this.context.fillStyle =3D 'rgba(0,0,0,' + 0.1 + ')';
		startAngle =3D 0;
		endAngle =3D (Math.PI/180)*360;=09
		this.context.arc(anchorX + 2, anchorY +2, radius + =
(this.options.shadowSize/2), startAngle, endAngle, false);
		this.context.fill();
		this.context.closePath();
	},
	/**
	 * function: drawPieGraph
	 *=20
	 * parameters:
	 * {Object} graphData
	 *=20
	 * description:=20
	 * Draws the actual pie chart. This function depends on helper function =

	 * <drawPieShadow> to draw the actual shadow
	 */
	drawPieGraph: function(graphData)
	{
		var sumData =3D 0;
		var radius =3D 0;
		var centerX =3D this.chartWidth/2;
		var centerY =3D this.chartHeight/2;
		var startAngle =3D 0;
		var endAngle =3D 0;
		var fontSize =3D this.options.pies.fontSize;
		var labelWidth =3D this.options.pies.labelWidth;

		//determine Pie Radius
		if(!this.options.pies.autoScale)
			radius =3D this.options.pies.radius;
		else
			radius =3D (this.chartHeight * 0.85)/2;

		var labelRadius =3D radius * 1.05;

		for(i =3D 0; i < graphData.length; i++)
			sumData +=3D graphData[i].data;

		// used to adjust labels so that everything adds up to 100%
		totalPct =3D 0;
	=09
		//lets draw the shadow first.. we don't need an individual shadow to =
every pie rather we just
		//draw a circle underneath to simulate the shadow...
		this.drawPieShadow(centerX, centerY, radius, 0, 0);=20
	=09
		//lets draw the actual pie chart now.
		graphData.each(function(gd, j){
			var pct =3D gd.data / sumData;
			startAngle =3D endAngle;
			endAngle +=3D pct * (2 * Math.PI);
			var sliceMiddle =3D (endAngle - startAngle) / 2 + startAngle;
			var labelX =3D centerX + Math.cos(sliceMiddle) * labelRadius;
			var labelY =3D centerY + Math.sin(sliceMiddle) * labelRadius;
			var anchorX =3D centerX;
			var anchorY =3D centerY;
			var textAlign =3D null;
			var verticalAlign =3D null;
			var left =3D 0;
			var top =3D 0;
		=09
			//draw pie:
			//drawing pie=09
			this.context.beginPath();
			this.context.moveTo(anchorX, anchorY);			=09
			this.context.arc(anchorX, anchorY, radius, startAngle, endAngle, =
false);
			this.context.closePath();
			this.context.fillStyle =3D this.parseColor(gd.color).scale(null, =
null, null, this.options.pies.fillOpacity).toString();

			if(this.options.pies.fill)	{ this.context.fill(); }

			// drawing labels
			if (sliceMiddle <=3D 0.25 * (2 * Math.PI))=20
			{
				// text on top and align left
				textAlign =3D "left";
				verticalAlign =3D "top";
				left =3D labelX;
				top =3D labelY + fontSize;
			}
			else if (sliceMiddle > 0.25 * (2 * Math.PI) && sliceMiddle <=3D 0.5 * =
(2 * Math.PI))=20
			{
				// text on bottom and align left
				textAlign =3D "left";
				verticalAlign =3D "bottom";
				left =3D labelX - labelWidth;
				top =3D labelY;
			}
			else if (sliceMiddle > 0.5 * (2 * Math.PI) && sliceMiddle <=3D 0.75 * =
(2 * Math.PI))=20
			{
				// text on bottom and align right
				textAlign =3D "right";
				verticalAlign =3D "bottom";
				left =3D labelX - labelWidth;
				top =3D labelY - fontSize;
			}
			else=20
			{
				// text on top and align right
				textAlign =3D "right";
				verticalAlign =3D "bottom";
				left =3D labelX;
				top =3D labelY - fontSize;
			}

			left =3D left + "px";
			top =3D top + "px";
			var textVal =3D Math.round(pct * 100);

			if (j =3D=3D graphData.length - 1) {
				if (textVal + totalPct < 100) {
					textVal =3D textVal + 1;
				} else if (textVal + totalPct > 100) {
					textVal =3D textVal - 1;
				};
			}

			var html =3D "<div style=3D\"position: absolute;zindex:11; width:" + =
labelWidth + "px;fontSize:" + fontSize + "px;overflow:hidden;top:"+ top =
+ ";left:"+ left + ";textAlign:" + textAlign + ";verticalAlign:" + =
verticalAlign +"\">" +  textVal + "%</div>";
			//$(html).appendTo(target);
			this.domObj.insert(html);

			totalPct =3D totalPct + textVal;		=09
		}.bind(this));
	=09
	},
	/**
	 * function: drawBarGraph
	 *=20
	 * parameters:
	 * {Object} graphData
	 * {Object} barDataRange
	 *=20
	 * description:=20
	 * Goes through each series in graphdata and passes it onto =
<drawBarGraphs> function
	 */
	drawBarGraph: function(graphData, barDataRange)
	{
		graphData.each(function(gd, i){
			this.drawGraphBars(gd, i, graphData.size(), barDataRange);
		}.bind(this));
	},
	/**
	 * function: drawGraphBar
	 *=20
	 * parameters:
	 * {Object} graphData
	 *=20
	 * description:
	 * This function is called when an individual series in GraphData is =
bar graph and plots it
	 */
	drawGraphBar: function(graphData)
	{
		this.drawGraphBars(graphData, 0, this.graphData.length, =
this.barDataRange);		=09
	},=09
	/**
	 * function: plotBars
	 *=20
	 * parameters:
	 * {Object} graphData
	 * {Object} data
	 * {Object} barWidth
	 * {Object} offset
	 * {Object} fill
	 * {Object} counter
	 * {Object} total
	 * {Object} barDataRange
	 *=20
	 * description:=20
	 * Helper function that draws the bar graph based on data.
	 */
	plotBars: function(graphData, data, barWidth, offset, fill,counter, =
total, barDataRange) {
		var shift =3D 0;
	=09
		if(total % 2 =3D=3D 0)
		{
			shift =3D (1 + ((counter  - total /2 ) - 1)) * barWidth;
		}
		else
		{
			var interval =3D 0.5;		=09
			if(counter =3D=3D (total/2 - interval )) {
				shift =3D - barWidth * interval;
			}
			else {
				shift =3D (interval + (counter  - Math.round(total/2))) * barWidth;
			}
		}

		var rangeData =3D [];
		data.each(function(d){
			if(!d) return;
		=09
			var x =3D d[0], y =3D d[1];
			var drawLeft =3D true, drawTop =3D true, drawRight =3D true;
			var left =3D x + shift, right =3D x + barWidth + shift, bottom =3D 0, =
top =3D y;
			var rangeDataPoint =3D {};
			rangeDataPoint.left =3D left;
			rangeDataPoint.right =3D right;
			rangeDataPoint.value =3D top;
			rangeData.push(rangeDataPoint);

			if (right < this.xaxis.min || left > this.xaxis.max || top < =
this.yaxis.min || bottom > this.yaxis.max)
				return;

			// clip
			if (left < this.xaxis.min) {
				left =3D this.xaxis.min;
				drawLeft =3D false;
			}

			if (right > this.xaxis.max) {
				right =3D this.xaxis.max;
				drawRight =3D false;
			}

			if (bottom < this.yaxis.min)
				bottom =3D this.yaxis.min;

			if (top > this.yaxis.max) {
				top =3D this.yaxis.max;
				drawTop =3D false;
			}
		=09
			if(graphData.bars.showShadow && graphData.shadowSize > 0)
				this.plotShadowOutline(graphData, this.context.strokeStyle, left, =
bottom, top, right, drawLeft, drawRight, drawTop);
			=09
			// fill the bar
			if (fill) {
				this.context.beginPath();
				this.context.moveTo(this.translateHoz(left), =
this.translateVert(bottom) + offset);
				this.context.lineTo(this.translateHoz(left), this.translateVert(top) =
+ offset);
				this.context.lineTo(this.translateHoz(right), =
this.translateVert(top) + offset);
				this.context.lineTo(this.translateHoz(right), =
this.translateVert(bottom) + offset);
				this.context.fill();
			}

			// draw outline
			if (drawLeft || drawRight || drawTop) {
				this.context.beginPath();
				this.context.moveTo(this.translateHoz(left), =
this.translateVert(bottom) + offset);
				if (drawLeft)
					this.context.lineTo(this.translateHoz(left), =
this.translateVert(top) + offset);
				else
					this.context.moveTo(this.translateHoz(left), =
this.translateVert(top) + offset);

				if (drawTop)
					this.context.lineTo(this.translateHoz(right), =
this.translateVert(top) + offset);
				else
					this.context.moveTo(this.translateHoz(right), =
this.translateVert(top) + offset);
				if (drawRight)
					this.context.lineTo(this.translateHoz(right), =
this.translateVert(bottom) + offset);
				else
					this.context.moveTo(this.translateHoz(right), =
this.translateVert(bottom) + offset);
				this.context.stroke();
			}
		}.bind(this));
	=09
		barDataRange.push(rangeData);
	},
	/**
	 * function: plotShadowOutline
	 *=20
	 * parameters:
	 * {Object} graphData
	 * {Object} orgStrokeStyle
	 * {Object} left
	 * {Object} bottom
	 * {Object} top
	 * {Object} right
	 * {Object} drawLeft
	 * {Object} drawRight
	 * {Object} drawTop
	 *=20
	 * description:
	 * Helper function that draws a outline simulating shadow for bar chart
	 */
	plotShadowOutline: function(graphData, orgStrokeStyle, left, bottom, =
top, right, drawLeft, drawRight, drawTop)
	{
		var orgOpac =3D 0.3;
	=09
		for(var n =3D 1; n <=3D this.options.shadowSize/2; n++)
		{
			var opac =3D orgOpac * n;
			this.context.beginPath();
			this.context.strokeStyle =3D "rgba(0,0,0," + opac + ")";

			this.context.moveTo(this.translateHoz(left) + n, =
this.translateVert(bottom));

			if(drawLeft)
				this.context.lineTo(this.translateHoz(left) + n, =
this.translateVert(top) - n);
			else
				this.context.moveTo(this.translateHoz(left) + n, =
this.translateVert(top) - n);

			if(drawTop)=09
				this.context.lineTo(this.translateHoz(right) + n, =
this.translateVert(top) - n);
			else
				this.context.moveTo(this.translateHoz(right) + n, =
this.translateVert(top) - n);

			if(drawRight)
				this.context.lineTo(this.translateHoz(right) + n, =
this.translateVert(bottom));
			else
				this.context.lineTo(this.translateHoz(right) + n, =
this.translateVert(bottom));

			this.context.stroke();
			this.context.closePath();
		}

		this.context.strokeStyle =3D orgStrokeStyle;
	},
	/**
	 * function: drawGraphBars
	 *=20
	 * parameters:
	 * {Object} graphData=20
	 * {Object} counter
	 * {Object} total
	 * {Object} barDataRange
	 *=20
	 * description:
	 * Draws the actual bar graphs. Calls <plotBars> to draw the individual =
bar
	 */
	drawGraphBars: function(graphData, counter, total, barDataRange){
		this.context.save();
		this.context.translate(this.chartOffset.left, this.chartOffset.top);
		this.context.lineJoin =3D "round";

		var bw =3D graphData.bars.barWidth;
		var lw =3D Math.min(graphData.bars.lineWidth, bw);


		this.context.lineWidth =3D lw;
		this.context.strokeStyle =3D graphData.color;
		if (graphData.bars.fill) {
			this.context.fillStyle =3D graphData.bars.fillColor !=3D null ? =
graphData.bars.fillColor : this.parseColor(graphData.color).scale(null, =
null, null, this.options.bars.fillOpacity).toString();
		}
		this.plotBars(graphData, graphData.data, bw, 0, graphData.bars.fill, =
counter, total, barDataRange);
		this.context.restore();
	},
	/**
	 * function: insertLegend
	 *=20
	 * description:
	 * inserts legend onto the graph. *legend: {show: true}* must be set in =
<options>=20
	 * for for this to work.
	 */
	insertLegend: function() {
		this.domObj.select(".legend").invoke('remove');

		if (!this.options.legend.show)
			return;
	=09
		var fragments =3D [];
		var rowStarted =3D false;
		this.graphData.each(function(gd, index){
			if(!gd.label) {
				return;
			}
			if(index % this.options.legend.noColumns =3D=3D 0) {
				if(rowStarted) {
					fragments.push('</tr>');
				}
				fragments.push('<tr>');
				rowStarted =3D true;
			}
			var label =3D gd.label;
			if(this.options.legend.labelFormatter !=3D null) {
				label =3D this.options.legend.labelFormatter(label);
			}
		=09
			fragments.push(
				'<td class=3D"legendColorBox"><div style=3D"border:1px solid ' + =
this.options.legend.labelBoxBorderColor + ';padding:1px"><div =
style=3D"width:14px;height:10px;background-color:' + gd.color + =
';overflow:hidden"></div></div></td>' +
				'<td class=3D"legendLabel">' + label + '</td>');
		=09
		}.bind(this));

		if (rowStarted)
			fragments.push('</tr>');
	=09
		if(fragments.length > 0){
			var table =3D '<table style=3D"font-size:smaller;color:' + =
this.options.grid.color + '">' + fragments.join("") + '</table>';
			if($(this.options.legend.container) !=3D null){
				$(this.options.legend.container).insert(table);
			}else{
				var pos =3D '';
				var p =3D this.options.legend.position, m =3D =
this.options.legend.margin;
			=09
				if(p.charAt(0) =3D=3D 'n') pos +=3D 'top:' + (m + =
this.chartOffset.top) + 'px;';
				else if(p.charAt(0) =3D=3D 's') pos +=3D 'bottom:' + (m + =
this.chartOffset.bottom) + 'px;';				=09
				if(p.charAt(1) =3D=3D 'e') pos +=3D 'right:' + (m + =
this.chartOffset.right) + 'px;';
				else if(p.charAt(1) =3D=3D 'w') pos +=3D 'left:' + (m + =
this.chartOffset.bottom) + 'px;';
				var div =3D this.domObj.insert('<div class=3D"ProtoChart-legend" =
style=3D"border: 1px solid '+this.options.legend.borderColor+'; =
position:absolute;z-index:2;' + pos +'">' + table + =
'</div>').getElementsBySelector('div.ProtoChart-legend').first();
			=09
				if(this.options.legend.backgroundOpacity !=3D 0.0){
					var c =3D this.options.legend.backgroundColor;
					if(c =3D=3D null){
						var tmp =3D (this.options.grid.backgroundColor !=3D null) ? =
this.options.grid.backgroundColor : this.extractColor(div);
						c =3D this.parseColor(tmp).adjust(null, null, null, 1).toString();
					}
					this.domObj.insert('<div class=3D"ProtoChart-legend-bg" =
style=3D"position:absolute;width:' + div.getWidth() + 'px;height:' + =
div.getHeight() + 'px;' + pos +'background-color:' + c + ';"> =
</div>').select('div.ProtoChart-legend-bg').first().setStyle({
						'opacity': this.options.legend.backgroundOpacity
					});					=09
				}
			}
		}
	},
	/**
	 * Function: onMouseMove
	 *=20
	 * parameters:
	 * event: {Object} ev
	 *=20
	 * Description:
	 * Called whenever the mouse is moved on the graph. This takes care of =
the mousetracking.
	 * This event also fires <ProtoChart:mousemove> event, which gets =
current position of the=20
	 * mouse as a parameters.=20
	 */
	onMouseMove: function(ev) {
		var e =3D ev || window.event;
		if (e.pageX =3D=3D null && e.clientX !=3D null) {
			var de =3D document.documentElement, b =3D $(document.body);
			this.lastMousePos.pageX =3D e.clientX + (de && de.scrollLeft || =
b.scrollLeft || 0);
			this.lastMousePos.pageY =3D e.clientY + (de && de.scrollTop || =
b.scrollTop || 0);
		}
		else {
			this.lastMousePos.pageX =3D e.pageX;
			this.lastMousePos.pageY =3D e.pageY;
		}
	=09
		var offset =3D this.overlay.cumulativeOffset();
		var pos =3D {
			x: this.xaxis.min + (e.pageX - offset.left - this.chartOffset.left) / =
this.hozScale,
			y: this.yaxis.max - (e.pageY - offset.top - this.chartOffset.top) / =
this.vertScale
		};
	=09
		if(this.options.mouse.track && this.selectionInterval =3D=3D null) {
			this.hit(ev, pos);
		}
		this.domObj.fire("ProtoChart:mousemove", [ pos ]);
	},
	/**
	 * Function: onMouseDown
	 *=20
	 * Parameters:
	 * Event - {Object} e
	 *=20
	 * Description:
	 * Called whenever the mouse is clicked.
	 */
	onMouseDown: function(e) {
		if (e.which !=3D 1)  // only accept left-click
			return;
	=09
		document.body.focus();

		if (document.onselectstart !=3D=3D undefined && =
this.workarounds.onselectstart =3D=3D null) {
			this.workarounds.onselectstart =3D document.onselectstart;
			document.onselectstart =3D function () { return false; };
		}
		if (document.ondrag !=3D=3D undefined && this.workarounds.ondrag =
=3D=3D null) {
			this.workarounds.ondrag =3D document.ondrag;
			document.ondrag =3D function () { return false; };
		}
	=09
		this.setSelectionPos(this.selection.first, e);
		=09
		if (this.selectionInterval !=3D null)
			clearInterval(this.selectionInterval);
		this.lastMousePos.pageX =3D null;
		this.selectionInterval =3D =
setInterval(this.updateSelectionOnMouseMove.bind(this), 200);

		this.overlay.observe("mouseup", this.onSelectionMouseUp.bind(this));
	},
	/**
	 * Function: onClick
	 * parameters:
	 * Event - {Object} e
	 * Description:=20
	 * Handles the "click" event on the chart. This function fires =
<ProtoChart:plotclick> event. If
	 * <options.allowDataClick> is enabled then it also fires =
<ProtoChart:dataclick> event which gives
	 * you access to exact data point where user clicked.
	 */
	onClick: function(e) {
		if (this.ignoreClick) {
			this.ignoreClick =3D false;
			return;
		}
		var offset =3D this.overlay.cumulativeOffset();=20
		var pos =3D{
			x: this.xaxis.min + (e.pageX - offset.left - this.chartOffset.left) / =
this.hozScale,
			y: this.yaxis.max - (e.pageY - offset.top - this.chartOffset.top) / =
this.vertScale
		};
		this.domObj.fire("ProtoChart:plotclick", [ pos ]);

		if(this.options.allowDataClick)
		{
			var dataPoint =3D {};
			if(this.options.points.show)
			{
				dataPoint =3D this.getDataClickPoint(pos, this.options);
				this.domObj.fire("ProtoChart:dataclick", [dataPoint]);
			}
			else if(this.options.lines.show && this.options.points.show)
			{
				dataPoint =3D this.getDataClickPoint(pos, this.options);
				this.domObj.fire("ProtoChart:dataclick", [dataPoint]);
			}
			else if(this.options.bars.show)
			{
				if(this.barDataRange.length > 0)
				{
					dataPoint =3D this.getDataClickPoint(pos, this.options, =
this.barDataRange);
					this.domObj.fire("ProtoChart:dataclick", [dataPoint]);
				}
			}
		}
	},
	/**
	 * Internal function used by onClick method.
	 */
	getDataClickPoint: function(pos, options, barDataRange)
	{
		pos.x =3D parseInt(pos.x);
		pos.y =3D parseInt(pos.y);
		var yClick =3D pos.y.toFixed(0);
		var dataVal =3D {};

		dataVal.position =3D pos;
		dataVal.value =3D '';

		if(options.points.show)
		{
			this.graphData.each(function(gd){
				var temp =3D gd.data;
				var xClick =3D parseInt(pos.x.toFixed(0));
				if(xClick < 0) { xClick =3D 0; }
				if(temp[xClick] && yClick >=3D temp[xClick][1] - =
(this.options.points.radius * 10) && yClick <=3D temp[xClick][1] + =
(this.options.points.radius * 10)) {
					dataVal.value =3D temp[xClick][1];
					throw $break;
				}
			=09
			}.bind(this));
		}
		else if(options.bars.show)
		{
			xClick =3D pos.x;
			this.barDataRange.each(function(barData){
				barData.each(function(data){
					var temp =3D data;
					if(xClick > temp.left && xClick < temp.right) {
						dataVal.value =3D temp.value;
						throw $break;
					}
				}.bind(this));
			}.bind(this));

		}

		return dataVal;
	},
	/**
	 * Function: triggerSelectedEvent
	 *=20
	 * Description:
	 * Internal function called when a selection on the graph is made. This =
function
	 * fires <ProtoChart:selected> event which has a parameter representing =
the selection
	 * {
	 * 	x1: {int}, y1: {int},
	 * 	x2: {int}, y2: {int}
	 * }
	 */
	triggerSelectedEvent: function() {
		var x1, x2, y1, y2;
		if (this.selection.first.x <=3D this.selection.second.x) {
			x1 =3D this.selection.first.x;
			x2 =3D this.selection.second.x;
		}
		else {
			x1 =3D this.selection.second.x;
			x2 =3D this.selection.first.x;
		}

		if (this.selection.first.y >=3D this.selection.second.y) {
			y1 =3D this.selection.first.y;
			y2 =3D this.selection.second.y;
		}
		else {
			y1 =3D this.selection.second.y;
			y2 =3D this.selection.first.y;
		}
	=09
		x1 =3D this.xaxis.min + x1 / this.hozScale;
		x2 =3D this.xaxis.min + x2 / this.hozScale;

		y1 =3D this.yaxis.max - y1 / this.vertScale;
		y2 =3D this.yaxis.max - y2 / this.vertScale;

		this.domObj.fire("ProtoChart:selected", [ { x1: x1, y1: y1, x2: x2, =
y2: y2 } ]);
	},
	/**
	 * Internal function
	 */
	onSelectionMouseUp: function(e) {
		if (document.onselectstart !=3D=3D undefined)
			document.onselectstart =3D this.workarounds.onselectstart;
		if (document.ondrag !=3D=3D undefined)
			document.ondrag =3D this.workarounds.ondrag;
	=09
		if (this.selectionInterval !=3D null) {
			clearInterval(this.selectionInterval);
			this.selectionInterval =3D null;
		}

		this.setSelectionPos(this.selection.second, e);
		this.clearSelection();
		if (!this.selectionIsSane() || e.which !=3D 1)
			return false;
	=09
		this.drawSelection();
		this.triggerSelectedEvent();
		this.ignoreClick =3D true;

		return false;
	},
	setSelectionPos: function(pos, e) {
		var offset =3D $(this.overlay).cumulativeOffset();
		if (this.options.selection.mode =3D=3D "y") {
			if (pos =3D=3D this.selection.first)
				pos.x =3D 0;
			else
				pos.x =3D this.chartWidth;
		}
		else {
			pos.x =3D e.pageX - offset.left - this.chartOffset.left;
			pos.x =3D Math.min(Math.max(0, pos.x), this.chartWidth);
		}

		if (this.options.selection.mode =3D=3D "x") {
			if (pos =3D=3D this.selection.first)
				pos.y =3D 0;
			else
				pos.y =3D this.chartHeight;
		}
		else {
			pos.y =3D e.pageY - offset.top - this.chartOffset.top;
			pos.y =3D Math.min(Math.max(0, pos.y), this.chartHeight);
		}
	},
	updateSelectionOnMouseMove: function() {
		if (this.lastMousePos.pageX =3D=3D null)
			return;
	=09
		this.setSelectionPos(this.selection.second, this.lastMousePos);
		this.clearSelection();
		if (this.selectionIsSane())
			this.drawSelection();
	},
	clearSelection: function() {
		if (this.prevSelection =3D=3D null)
			return;

		var x =3D Math.min(this.prevSelection.first.x, =
this.prevSelection.second.x),
			y =3D Math.min(this.prevSelection.first.y, =
this.prevSelection.second.y),
			w =3D Math.abs(this.prevSelection.second.x - =
this.prevSelection.first.x),
			h =3D Math.abs(this.prevSelection.second.y - =
this.prevSelection.first.y);
	=09
		this.overlayContext.clearRect(x + this.chartOffset.left - =
this.overlayContext.lineWidth,
					   		y + this.chartOffset.top - this.overlayContext.lineWidth,
					   		w + this.overlayContext.lineWidth*2,
					   		h + this.overlayContext.lineWidth*2);
	=09
		this.prevSelection =3D null;
	},
	/**
	 * Function: setSelection
	 *=20
	 * Parameters:
	 * Area - {Object} area represented as a range like: {x1: 3, y1: 3, x2: =
4, y2: 8}
	 *=20
	 * Description:=20
	 * Sets the current graph selection to the provided range. Calls =
<drawSelection> and=20
	 * <triggerSelectedEvent> functions internally.
	 */
	setSelection: function(area) {
		this.clearSelection();
	=09
		if (this.options.selection.mode =3D=3D "x") {
			this.selection.first.y =3D 0;
			this.selection.second.y =3D this.chartHeight;
		}
		else {
			this.selection.first.y =3D (this.yaxis.max - area.y1) * =
this.vertScale;
			this.selection.second.y =3D (this.yaxis.max - area.y2) * =
this.vertScale;
		}
		if (this.options.selection.mode =3D=3D "y") {
			this.selection.first.x =3D 0;
			this.selection.second.x =3D this.chartWidth;
		}
		else {
			this.selection.first.x =3D (area.x1 - this.xaxis.min) * =
this.hozScale;
			this.selection.second.x =3D (area.x2 - this.xaxis.min) * =
this.hozScale;
		}

		this.drawSelection();
		this.triggerSelectedEvent();
	},
	/**
	 * Function: drawSelection
	 * Description: Internal function called to draw the selection made on =
the graph.=20
	 */
	drawSelection: function() {
		if (this.prevSelection !=3D null &&
			this.selection.first.x =3D=3D this.prevSelection.first.x &&
			this.selection.first.y =3D=3D this.prevSelection.first.y &&=20
			this.selection.second.x =3D=3D this.prevSelection.second.x &&
			this.selection.second.y =3D=3D this.prevSelection.second.y)
		{
			return;=09
		}
	=09
		this.overlayContext.strokeStyle =3D =
this.parseColor(this.options.selection.color).scale(null, null, null, =
0.8).toString();
		this.overlayContext.lineWidth =3D 1;
		this.context.lineJoin =3D "round";
		this.overlayContext.fillStyle =3D =
this.parseColor(this.options.selection.color).scale(null, null, null, =
0.4).toString();

		this.prevSelection =3D { first:  { x: this.selection.first.x,
									y: this.selection.first.y },
						  second: { x: this.selection.second.x,
									y: this.selection.second.y } };

		var x =3D Math.min(this.selection.first.x, this.selection.second.x),
			y =3D Math.min(this.selection.first.y, this.selection.second.y),
			w =3D Math.abs(this.selection.second.x - this.selection.first.x),
			h =3D Math.abs(this.selection.second.y - this.selection.first.y);
	=09
		this.overlayContext.fillRect(x + this.chartOffset.left, y + =
this.chartOffset.top, w, h);
		this.overlayContext.strokeRect(x + this.chartOffset.left, y + =
this.chartOffset.top, w, h);
	},
	/**
	 * Internal function
	 */
	selectionIsSane: function() {
		var minSize =3D 5;
		return Math.abs(this.selection.second.x - this.selection.first.x) >=3D =
minSize &&
			Math.abs(this.selection.second.y - this.selection.first.y) >=3D =
minSize;
	},
	/**
	 * Internal function that formats the track. This is the format the =
text is shown when mouse
	 * tracking is enabled.
	 */
	defaultTrackFormatter: function(val)
	{
		return '['+val.x+', '+val.y+']';
	},
	/**
	 * Function: clearHit
	 */
	clearHit: function(){
		if(this.prevHit){
			this.overlayContext.clearRect(
				this.translateHoz(this.prevHit.x) + this.chartOffset.left - =
this.options.mouse.radius*2,
				this.translateVert(this.prevHit.y) + this.chartOffset.top - =
this.options.mouse.radius*2,
				this.options.mouse.radius*3 + this.options.points.lineWidth*3,=20
				this.options.mouse.radius*3 + this.options.points.lineWidth*3
			);
			this.prevHit =3D null;
		}	=09
	},=09
	/**
	 * Function: hit
	 *=20
	 * Parameters:=20
	 * 	event - {Object} event object
	 * 	mouse - {Object} mouse object that is used to keep track of mouse =
movement
	 *=20
	 * Description:
	 * 	If hit occurs this function will fire a ProtoChart:hit event.
	 */
	hit: function(event, mouse){=09
		/**
		 * Nearest data element.
		 */
		var n =3D {
			dist:Number.MAX_VALUE,
			x:null,
			y:null,
			mouse:null
		};
	=09
	=09
		for(var i =3D 0, data, xsens, ysens; i < this.graphData.length; i++){
			if(!this.graphData[i].mouse.track) continue;
			data =3D this.graphData[i].data;			=09
			xsens =3D (this.hozScale*this.graphData[i].mouse.sensibility);
			ysens =3D (this.vertScale*this.graphData[i].mouse.sensibility);
			for(var j =3D 0, xabs, yabs; j < data.length; j++){
				xabs =3D this.hozScale*Math.abs(data[j][0] - mouse.x);
				yabs =3D this.vertScale*Math.abs(data[j][1] - mouse.y);
			=09
				if(xabs < xsens && yabs < ysens && (xabs+yabs) < n.dist){
					n.dist =3D (xabs+yabs);
					n.x =3D data[j][0];
					n.y =3D data[j][1];
					n.mouse =3D this.graphData[i].mouse;
				}
			}
		}
	=09
		if(n.mouse && n.mouse.track && !this.prevHit || (this.prevHit && n.x =
!=3D this.prevHit.x && n.y !=3D this.prevHit.y)){
			var el =3D =
this.domObj.select('.'+this.options.mouse.clsName).first();
			if(!el){
				var pos =3D '', p =3D this.options.mouse.position, m =3D =
this.options.mouse.margin;				=09
				if(p.charAt(0) =3D=3D 'n') pos +=3D 'top:' + (m + =
this.chartOffset.top) + 'px;';
				else if(p.charAt(0) =3D=3D 's') pos +=3D 'bottom:' + (m + =
this.chartOffset.bottom) + 'px;';				=09
				if(p.charAt(1) =3D=3D 'e') pos +=3D 'right:' + (m + =
this.chartOffset.right) + 'px;';
				else if(p.charAt(1) =3D=3D 'w') pos +=3D 'left:' + (m + =
this.chartOffset.bottom) + 'px;';
			=09
				this.domObj.insert('<div class=3D"'+this.options.mouse.clsName+'" =
style=3D"display:none;position:absolute;'+pos+'"></div>');
				return;
			}
			if(n.x !=3D=3D null && n.y !=3D=3D null){
				el.setStyle({display:'block'});				=09
			=09
				this.clearHit();
				if(n.mouse.lineColor !=3D null){
					this.overlayContext.save();
					this.overlayContext.translate(this.chartOffset.left, =
this.chartOffset.top);
					this.overlayContext.lineWidth =3D this.options.points.lineWidth;
					this.overlayContext.strokeStyle =3D n.mouse.lineColor;
					this.overlayContext.fillStyle =3D '#ffffff';
					this.overlayContext.beginPath();
				=09
				=09
					this.overlayContext.arc(this.translateHoz(n.x), =
this.translateVert(n.y), this.options.mouse.radius, 0, 2 * Math.PI, =
true);
					this.overlayContext.fill();
					this.overlayContext.stroke();
					this.overlayContext.restore();
				}=20
				this.prevHit =3D n;
							=09
				var decimals =3D n.mouse.trackDecimals;
				if(decimals =3D=3D null || decimals < 0) decimals =3D 0;
				if(!this.options.mouse.fixedPosition)
				{
					el.setStyle({
						left: (this.translateHoz(n.x) + this.options.mouse.radius + 10) + =
"px",
						top: (this.translateVert(n.y) + this.options.mouse.radius + 10) + =
"px"
					});
				}
				el.innerHTML =3D n.mouse.trackFormatter({x: n.x.toFixed(decimals), =
y: n.y.toFixed(decimals)});
				this.domObj.fire( 'ProtoChart:hit', [n] )				=09
			}else if(this.options.prevHit){
				el.setStyle({display:'none'});
				this.clearHit();
			}
		}
	},=09
	/**
	 * Internal function
	 */
	floorInBase: function(n, base) {
        return base * Math.floor(n / base);
    },=09
	/**
	 * Function: extractColor
	 *=20
	 * Parameters:
	 * 		element - HTML element or ID of an HTML element
	 *=20
	 * Returns:=20
	 * 		color in string format
	 */
	extractColor: function(element)
	{
		var color;
		do
		{
			color =3D $(element).getStyle('background-color').toLowerCase();
			if(color  !=3D '' && color !=3D 'transparent')
			{
				break;
			}
			element =3D element.up(0); //or else just get the parent ....
		} while(element.nodeName.toLowerCase() !=3D 'body');
	=09
		//safari fix
		if(color =3D=3D 'rgba(0, 0, 0, 0)')=20
			return 'transparent';
		return color;
	},
	/**
	 * Function: parseColor
	 *=20
	 * Parameters:=20
	 * 		str - color string in different formats
	 *=20
	 * Returns:
	 * 		a Proto.Color Object - use toString() function to retreive the =
color in rgba/rgb format
	 */
	parseColor: function(str)
	{
		var result;
=09
		/**
		 * rgb(num,num,num)
		 */
		if((result =3D =
/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(st=
r)))
			return new Proto.Color(parseInt(result[1]), parseInt(result[2]), =
parseInt(result[3]));
=09
		/**
		 * rgba(num,num,num,num)
		 */
		if((result =3D =
/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]=
+(?:\.[0-9]+)?)\s*\)/.exec(str)))
			return new Proto.Color(parseInt(result[1]), parseInt(result[2]), =
parseInt(result[3]), parseFloat(result[4]));
		=09
		/**
		 * rgb(num%,num%,num%)
		 */
		if((result =3D =
/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-=
9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str)))
			return new Proto.Color(parseFloat(result[1])*2.55, =
parseFloat(result[2])*2.55, parseFloat(result[3])*2.55);
=09
		/**
		 * rgba(num%,num%,num%,num)
		 */
		if((result =3D =
/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0=
-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str)))
			return new Proto.Color(parseFloat(result[1])*2.55, =
parseFloat(result[2])*2.55, parseFloat(result[3])*2.55, =
parseFloat(result[4]));
		=09
		/**
		 * #a0b1c2
		 */
		if((result =3D =
/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str)))
			return new Proto.Color(parseInt(result[1],16), =
parseInt(result[2],16), parseInt(result[3],16));
=09
		/**
		 * #fff
		 */
		if((result =3D /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str)))
			return new Proto.Color(parseInt(result[1]+result[1],16), =
parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16));

		/**
		 * Otherwise, check if user wants transparent .. or we just return a =
standard color;
		 */
		var name =3D str.strip().toLowerCase();
		if(name =3D=3D 'transparent'){
			return new Proto.Color(255, 255, 255, 0);
		}

		return new Proto.Color(100,100,100, 1);
				=09
	}	=09
});

if(!Proto) var Proto =3D {};

/**
 * Class: Proto.Color
 *=20
 * Helper class that manipulates colors using RGBA values.=20
 *=20
 */

Proto.Color =3D Class.create({
	initialize: function(r, g, b, a) {
		this.rgba =3D ['r', 'g', 'b', 'a'];
		var x =3D 4;
		while(-1<--x) {
			this[this.rgba[x]] =3D arguments[x] || ((x=3D=3D3) ? 1.0 : 0);
		}
	},
	toString: function()  {
		if(this.a >=3D 1.0) {
			return "rgb(" + [this.r, this.g, this.b].join(",") +")";
		}
		else {
			return "rgba("+[this.r, this.g, this.b, this.a].join(",")+")";
		}
	},
	scale: function(rf, gf, bf, af) {
		x =3D 4;
		while(-1<--x) {
			if(arguments[x] !=3D null) {
				this[this.rgba[x]] *=3D arguments[x];
			}
		}
		return this.normalize();
	},
	adjust: function(rd, gd, bd, ad) {
        x =3D 4; //rgba.length
        while (-1<--x) {
            if (arguments[x] !=3D null)
                this[this.rgba[x]] +=3D arguments[x];
        }
        return this.normalize();	=09
	},
	clone: function() {
        return new Proto.Color(this.r, this.b, this.g, this.a);
    },
	limit: function(val,minVal,maxVal) {
        return Math.max(Math.min(val, maxVal), minVal);
    },
    normalize: function() {
        this.r =3D this.limit(parseInt(this.r), 0, 255);
        this.g =3D this.limit(parseInt(this.g), 0, 255);
        this.b =3D this.limit(parseInt(this.b), 0, 255);
        this.a =3D this.limit(this.a, 0, 1);
        return this;
    }
});
------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.esrealitycheck.com/lib/ajax_lib.js

// =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
// Author: Matt Kruse <matt@ajaxtoolbox.com>
// WWW: http://www.AjaxToolbox.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download.=20
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

/**
 * The AjaxRequest class is a wrapper for the XMLHttpRequest objects =
which=20
 * are available in most modern browsers. It simplifies the interfaces =
for
 * making Ajax requests, adds commonly-used convenience methods, and =
makes=20
 * the process of handling state changes more intuitive.
 * An object may be instantiated and used, or the Class methods may be =
used=20
 * which internally create an AjaxRequest object.
 */
function AjaxRequest() {
  var req =3D new Object();
 =20
  // -------------------
  // Instance properties
  // -------------------

  /**
   * Timeout period (in ms) until an async request will be aborted, and
   * the onTimeout function will be called
   */
  req.timeout =3D null;
 =20
  /**
   *  Since some browsers cache GET requests via XMLHttpRequest, an
   * additional parameter called AjaxRequestUniqueId will be added to
   * the request URI with a unique numeric value appended so that the =
requested
   * URL will not be cached.
   */
  req.generateUniqueUrl =3D true;
 =20
  /**
   * The url that the request will be made to, which defaults to the =
current=20
   * url of the window
   */
  req.url =3D window.location.href;
 =20
  /**
   * The method of the request, either GET (default), POST, or HEAD
   */
  req.method =3D "GET";
 =20
  /**
   * Whether or not the request will be asynchronous. In general, =
synchronous=20
   * requests should not be used so this should rarely be changed from =
true
   */
  req.async =3D true;
 =20
  /**
   * The username used to access the URL
   */
  req.username =3D null;
 =20
  /**
   * The password used to access the URL
   */
  req.password =3D null;
 =20
  /**
   * The parameters is an object holding name/value pairs which will be=20
   * added to the url for a GET request or the request content for a =
POST request
   */
  req.parameters =3D new Object();
 =20
  /**
   * The sequential index number of this request, updated internally
   */
  req.requestIndex =3D AjaxRequest.numAjaxRequests++;
 =20
  /**
   * Indicates whether a response has been received yet from the server
   */
  req.responseReceived =3D false;
 =20
  /**
   * The name of the group that this request belongs to, for activity=20
   * monitoring purposes
   */
  req.groupName =3D null;
 =20
  /**
   * The query string to be added to the end of a GET request, in proper =

   * URIEncoded format
   */
  req.queryString =3D "";
 =20
  /**
   * After a response has been received, this will hold the text =
contents of=20
   * the response - even in case of error
   */
  req.responseText =3D null;
 =20
  /**
   * After a response has been received, this will hold the XML content
   */
  req.responseXML =3D null;
 =20
  /**
   * After a response has been received, this will hold the status code =
of=20
   * the response as returned by the server.
   */
  req.status =3D null;
 =20
  /**
   * After a response has been received, this will hold the text =
description=20
   * of the response code
   */
  req.statusText =3D null;

  /**
   * An internal flag to indicate whether the request has been aborted
   */
  req.aborted =3D false;
 =20
  /**
   * The XMLHttpRequest object used internally
   */
  req.xmlHttpRequest =3D null;

  // --------------
  // Event handlers
  // --------------
 =20
  /**
   * If a timeout period is set, and it is reached before a response is=20
   * received, a function reference assigned to onTimeout will be called
   */
  req.onTimeout =3D null;=20
 =20
  /**
   * A function reference assigned will be called when readyState=3D1
   */
  req.onLoading =3D null;

  /**
   * A function reference assigned will be called when readyState=3D2
   */
  req.onLoaded =3D null;

  /**
   * A function reference assigned will be called when readyState=3D3
   */
  req.onInteractive =3D null;

  /**
   * A function reference assigned will be called when readyState=3D4
   */
  req.onComplete =3D null;

  /**
   * A function reference assigned will be called after onComplete, if=20
   * the statusCode=3D200
   */
  req.onSuccess =3D null;

  /**
   * A function reference assigned will be called after onComplete, if=20
   * the statusCode !=3D 200
   */
  req.onError =3D null;
 =20
  /**
   * If this request has a group name, this function reference will be =
called=20
   * and passed the group name if this is the first request in the group =
to=20
   * become active
   */
  req.onGroupBegin =3D null;

  /**
   * If this request has a group name, and this request is the last =
request=20
   * in the group to complete, this function reference will be called
   */
  req.onGroupEnd =3D null;

  // Get the XMLHttpRequest object itself
  req.xmlHttpRequest =3D AjaxRequest.getXmlHttpRequest();
  if (req.xmlHttpRequest=3D=3Dnull) { return null; }
 =20
  // -------------------------------------------------------
  // Attach the event handlers for the XMLHttpRequest object
  // -------------------------------------------------------
  req.xmlHttpRequest.onreadystatechange =3D=20
  function() {
    if (req=3D=3Dnull || req.xmlHttpRequest=3D=3Dnull) { return; }
    if (req.xmlHttpRequest.readyState=3D=3D1) { =
req.onLoadingInternal(req); }
    if (req.xmlHttpRequest.readyState=3D=3D2) { =
req.onLoadedInternal(req); }
    if (req.xmlHttpRequest.readyState=3D=3D3) { =
req.onInteractiveInternal(req); }
    if (req.xmlHttpRequest.readyState=3D=3D4) { =
req.onCompleteInternal(req); }
  };
 =20
  // =
-------------------------------------------------------------------------=
--
  // Internal event handlers that fire, and in turn fire the user event =
handlers
  // =
-------------------------------------------------------------------------=
--
  // Flags to keep track if each event has been handled, in case of=20
  // multiple calls (some browsers may call the onreadystatechange=20
  // multiple times for the same state)
  req.onLoadingInternalHandled =3D false;
  req.onLoadedInternalHandled =3D false;
  req.onInteractiveInternalHandled =3D false;
  req.onCompleteInternalHandled =3D false;
  req.onLoadingInternal =3D=20
    function() {
      if (req.onLoadingInternalHandled) { return; }
      AjaxRequest.numActiveAjaxRequests++;
      if (AjaxRequest.numActiveAjaxRequests=3D=3D1 && =
typeof(window['AjaxRequestBegin'])=3D=3D"function") {
        AjaxRequestBegin();
      }
      if (req.groupName!=3Dnull) {
        if =
(typeof(AjaxRequest.numActiveAjaxGroupRequests[req.groupName])=3D=3D"unde=
fined") {
          AjaxRequest.numActiveAjaxGroupRequests[req.groupName] =3D 0;
        }
        AjaxRequest.numActiveAjaxGroupRequests[req.groupName]++;
        if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]=3D=3D1 =
&& typeof(req.onGroupBegin)=3D=3D"function") {
          req.onGroupBegin(req.groupName);
        }
      }
      if (typeof(req.onLoading)=3D=3D"function") {
        req.onLoading(req);
      }
      req.onLoadingInternalHandled =3D true;
    };
  req.onLoadedInternal =3D=20
    function() {
      if (req.onLoadedInternalHandled) { return; }
      if (typeof(req.onLoaded)=3D=3D"function") {
        req.onLoaded(req);
      }
      req.onLoadedInternalHandled =3D true;
    };
  req.onInteractiveInternal =3D=20
    function() {
      if (req.onInteractiveInternalHandled) { return; }
      if (typeof(req.onInteractive)=3D=3D"function") {
        req.onInteractive(req);
      }
      req.onInteractiveInternalHandled =3D true;
    };
  req.onCompleteInternal =3D=20
    function() {
      if (req.onCompleteInternalHandled || req.aborted) { return; }
      req.onCompleteInternalHandled =3D true;
      AjaxRequest.numActiveAjaxRequests--;
      if (AjaxRequest.numActiveAjaxRequests=3D=3D0 && =
typeof(window['AjaxRequestEnd'])=3D=3D"function") {
        AjaxRequestEnd(req.groupName);
      }
      if (req.groupName!=3Dnull) {
        AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--;
        if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]=3D=3D0 =
&& typeof(req.onGroupEnd)=3D=3D"function") {
          req.onGroupEnd(req.groupName);
        }
      }
      req.responseReceived =3D true;
	  try {
	      req.status =3D req.xmlHttpRequest.status;
	  } catch (E) {
		  return null;
	  }
      req.statusText =3D req.xmlHttpRequest.statusText;
      req.responseText =3D req.xmlHttpRequest.responseText;
      req.responseXML =3D req.xmlHttpRequest.responseXML;
      if (typeof(req.onComplete)=3D=3D"function") {
        req.onComplete(req);
      }
      if (req.xmlHttpRequest.status=3D=3D200 && =
typeof(req.onSuccess)=3D=3D"function") {
        req.onSuccess(req);
      }
      else if (typeof(req.onError)=3D=3D"function") {
        req.onError(req);
      }

      // Clean up so IE doesn't leak memory
      delete req.xmlHttpRequest['onreadystatechange'];
      req.xmlHttpRequest =3D null;
    };
  req.onTimeoutInternal =3D=20
    function() {
      if (req!=3Dnull && req.xmlHttpRequest!=3Dnull && =
!req.onCompleteInternalHandled) {
        req.aborted =3D true;
        req.xmlHttpRequest.abort();
        AjaxRequest.numActiveAjaxRequests--;
        if (AjaxRequest.numActiveAjaxRequests=3D=3D0 && =
typeof(window['AjaxRequestEnd'])=3D=3D"function") {
          AjaxRequestEnd(req.groupName);
        }
        if (req.groupName!=3Dnull) {
          AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--;
          if =
(AjaxRequest.numActiveAjaxGroupRequests[req.groupName]=3D=3D0 && =
typeof(req.onGroupEnd)=3D=3D"function") {
            req.onGroupEnd(req.groupName);
          }
        }
        if (typeof(req.onTimeout)=3D=3D"function") {
          req.onTimeout(req);
        }
      // Opera won't fire onreadystatechange after abort, but other =
browsers do.=20
      // So we can't rely on the onreadystate function getting called. =
Clean up here!
      delete req.xmlHttpRequest['onreadystatechange'];
      req.xmlHttpRequest =3D null;
      }
    };

  // ----------------
  // Instance methods
  // ----------------
  /**
   * The process method is called to actually make the request. It =
builds the
   * querystring for GET requests (the content for POST requests), sets =
the
   * appropriate headers if necessary, and calls the=20
   * XMLHttpRequest.send() method
  */
  req.process =3D=20
    function() {
      if (req.xmlHttpRequest!=3Dnull) {
        // Some logic to get the real request URL
        if (req.generateUniqueUrl && req.method=3D=3D"GET") {
          req.parameters["AjaxRequestUniqueId"] =3D new Date().getTime() =
+ "" + req.requestIndex;
        }
        var content =3D null; // For POST requests, to hold query string
        for (var i in req.parameters) {
          if (req.queryString.length>0) { req.queryString +=3D "&"; }
          req.queryString +=3D encodeURIComponent(i) + "=3D" + =
encodeURIComponent(req.parameters[i]);
        }
        if (req.method=3D=3D"GET") {
          if (req.queryString.length>0) {
            req.url +=3D ((req.url.indexOf("?")>-1)?"&":"?") + =
req.queryString;
          }
        }
        =
req.xmlHttpRequest.open(req.method,req.url,req.async,req.username,req.pas=
sword);
        if (req.method=3D=3D"POST") {
          if =
(typeof(req.xmlHttpRequest.setRequestHeader)!=3D"undefined") {
            req.xmlHttpRequest.setRequestHeader('Content-type', =
'application/x-www-form-urlencoded');
          }
          content =3D req.queryString;
        }
        if (req.timeout>0) {
          setTimeout(req.onTimeoutInternal,req.timeout);
        }
        req.xmlHttpRequest.send(content);
      }
    };

  /**
   * An internal function to handle an Object argument, which may =
contain
   * either AjaxRequest field values or parameter name/values
   */
  req.handleArguments =3D=20
    function(args) {
      for (var i in args) {
        // If the AjaxRequest object doesn't have a property which was =
passed, treat it as a url parameter
        if (typeof(req[i])=3D=3D"undefined") {
          req.parameters[i] =3D args[i];
        }
        else {
          req[i] =3D args[i];
        }
      }
    };

  /**
   * Returns the results of XMLHttpRequest.getAllResponseHeaders().
   * Only available after a response has been returned
   */
  req.getAllResponseHeaders =3D
    function() {
      if (req.xmlHttpRequest!=3Dnull) {
        if (req.responseReceived) {
          return req.xmlHttpRequest.getAllResponseHeaders();
        }
        alert("Cannot getAllResponseHeaders because a response has not =
yet been received");
      }
    };

  /**
   * Returns the the value of a response header as returned by=20
   * XMLHttpRequest,getResponseHeader().
   * Only available after a response has been returned
   */
  req.getResponseHeader =3D
    function(headerName) {
      if (req.xmlHttpRequest!=3Dnull) {
        if (req.responseReceived) {
          return req.xmlHttpRequest.getResponseHeader(headerName);
        }
        alert("Cannot getResponseHeader because a response has not yet =
been received");
      }
    };

  return req;
}

// ---------------------------------------
// Static methods of the AjaxRequest class
// ---------------------------------------

/**
 * Returns an XMLHttpRequest object, either as a core object or an =
ActiveX=20
 * implementation. If an object cannot be instantiated, it will return =
null;
 */
AjaxRequest.getXmlHttpRequest =3D function() {
  if (window.XMLHttpRequest) {
    return new XMLHttpRequest();
  }
  else if (window.ActiveXObject) {
    // Based on http://jibbering.com/2002/4/httprequest.html
    /*@cc_on @*/
    /*@if (@_jscript_version >=3D 5)
    try {
      return new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        return new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        return null;
      }
    }
    @end @*/
  }
  else {
    return null;
  }
};

/**
 * See if any request is active in the background
 */
AjaxRequest.isActive =3D function() {
  return (AjaxRequest.numActiveAjaxRequests>0);
};

/**
 * Make a GET request. Pass an object containing parameters and =
arguments as=20
 * the second argument.
 * These areguments may be either AjaxRequest properties to set on the =
request=20
 * object or name/values to set in the request querystring.
 */
AjaxRequest.get =3D function(args) {
  AjaxRequest.doRequest("GET",args);
};

/**
 * Make a POST request. Pass an object containing parameters and =
arguments as=20
 * the second argument.
 * These areguments may be either AjaxRequest properties to set on the =
request=20
 * object or name/values to set in the request querystring.
 */
AjaxRequest.post =3D function(args) {
  AjaxRequest.doRequest("POST",args);
};

/**
 * The internal method used by the .get() and .post() methods
 */
AjaxRequest.doRequest =3D function(method,args) {
  if (typeof(args)!=3D"undefined" && args!=3Dnull) {
    var myRequest =3D new AjaxRequest();
    myRequest.method =3D method;
    myRequest.handleArguments(args);
    myRequest.process();
  }
}  ;

/**
 * Submit a form. The requested URL will be the form's ACTION, and the =
request=20
 * method will be the form's METHOD.
 * Returns true if the submittal was handled successfully, else false so =
it=20
 * can easily be used with an onSubmit event for a form, and fallback to =

 * submitting the form normally.
 */
AjaxRequest.submit =3D function(theform, args) {
  var myRequest =3D new AjaxRequest();
  if (myRequest=3D=3Dnull) { return false; }
  var serializedForm =3D AjaxRequest.serializeForm(theform);
  myRequest.method =3D theform.method.toUpperCase();
  myRequest.url =3D theform.action;
  myRequest.handleArguments(args);
  myRequest.queryString =3D serializedForm;
  myRequest.process();
  return true;
};

/**
 * Serialize a form into a format which can be sent as a GET string or a =
POST=20
 * content.It correctly ignores disabled fields, maintains order of the =
fields=20
 * as in the elements[] array. The 'file' input type is not supported, =
as=20
 * its content is not available to javascript. This method is used =
internally
 * by the submit class method.
 */
AjaxRequest.serializeForm =3D function(theform) {
  var els =3D theform.elements;
  var len =3D els.length;
  var queryString =3D "";
  this.addField =3D=20
    function(name,value) {=20
      if (queryString.length>0) {=20
        queryString +=3D "&";
      }
      queryString +=3D encodeURIComponent(name) + "=3D" + =
encodeURIComponent(value);
    };
  for (var i=3D0; i<len; i++) {
    var el =3D els[i];
    if (!el.disabled) {
      switch(el.type) {
        case 'text': case 'password': case 'hidden': case 'textarea':=20
          this.addField(el.name,el.value);
          break;
        case 'select-one':
          if (el.selectedIndex>=3D0) {
            this.addField(el.name,el.options[el.selectedIndex].value);
          }
          break;
        case 'select-multiple':
          for (var j=3D0; j<el.options.length; j++) {
            if (el.options[j].selected) {
              this.addField(el.name,el.options[j].value);
            }
          }
          break;
        case 'checkbox': case 'radio':
          if (el.checked) {
            this.addField(el.name,el.value);
          }
          break;
      }
    }
  }
  return queryString;
};

// -----------------------
// Static Class variables
// -----------------------

/**
 * The number of total AjaxRequest objects currently active and running
 */
AjaxRequest.numActiveAjaxRequests =3D 0;

/**
 * An object holding the number of active requests for each group
 */
AjaxRequest.numActiveAjaxGroupRequests =3D new Object();

/**
 * The total number of AjaxRequest objects instantiated
 */
AjaxRequest.numAjaxRequests =3D 0;
------=_NextPart_000_0035_01CBD989.8248FF00
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.esrealitycheck.com/rc/lib_rc.js

	function showInfo(instrID) {
		window.open("instrInfo.asp?instrID=3D" + instrID,
			"InstrumentInformation",
			=
"resizable=3Dyes,toolbar=3Dno,location=3Dno,directoris=3Dno,status=3Dno,m=
enubar=3Dno,scrollbars=3Dyes,width=3D550,height=3D350," +
				"left=3D" + (window.screenLeft + 30) + ",top=3D" + (window.screenTop =
+ 30));
	}

	function compressDiv(layer_ref, compress) {
		showhide(layer_ref, compress ? 'none' : 'block');
	}
=09
	function toggleDiv(layer_ref) {	// switch between 'none' and 'block'
		var nowOn =3D false;
		if (document.all) { //IS IE 4 or 5 (or 6 beta)
			tmp =3D eval( "document.all." + layer_ref);
			if (tmp)
				tmp.style.display =3D (nowOn =3D tmp.style.display =3D=3D 'none') ? =
'block' : 'none';
		}
		if (document.layers) { //IS NETSCAPE 4 or below
			if (document.layers[layer_ref])
				document.layers[layer_ref].display =3D (nowOn =3D =
document.layers[layer_ref].display =3D=3D 'none') ? 'block' : 'none';
		}
		if (document.getElementById &&!document.all) {
			hza =3D document.getElementById(layer_ref);
			if (hza)
				hza.style.display =3D (nowOn =3D hza.style.display =3D=3D 'none') ? =
'block' : 'none';
		}
		return nowOn;
	}

	function showhide(layer_ref, state) {
		if (document.all) { //IS IE 4 or 5 (or 6 beta)
			tmp =3D eval( "document.all." + layer_ref);
			if (tmp)=20
				tmp.style.display =3D state;
		}
		if (document.layers) { //IS NETSCAPE 4 or below
			if (document.layers[layer_ref])
				document.layers[layer_ref].display =3D state;
		}
		if (document.getElementById &&!document.all) {
			hza =3D document.getElementById(layer_ref);
			if (hza)
				hza.style.display =3D state;
		}
	}

	function myGetElementById(layer_ref) {
		if (document.all) { //IS IE 4 or 5 (or 6 beta)
			return eval( "document.all." + layer_ref);
		}
		if (document.layers) { //IS NETSCAPE 4 or below
			return document.layers[layer_ref];
		}
		if (document.getElementById &&!document.all) {
			return document.getElementById(layer_ref);
		}
		return null;
	}


------=_NextPart_000_0035_01CBD989.8248FF00--

