		
		var nav4 = window.Event ? true : false;
		//JavaScript Graph-it! (Absolute)- by javascriptkit.com
		//Visit JavaScript Kit (http://javascriptkit.com) for script
		//Credit must stay intact for use
		
		// Modified by Tienna Kim (Company 39) on April 19, 2006
		// for AASHTO CEE TERI database
		var graphimage="/images/icon_results_temp.gif"

		function graphit(g,gwidth){
			var total=0;
			// Skip the first entry which contains the Research ID
			for (i=1;i<g.length;i++) {
				total += parseInt(g[i]);
			}
			
			if (total > 0) {

				var output= "<span class=\"small\"><b>Rating Results</b> " +
					"(Research ID " + g[0] + ")</span><br/><br/>\n" +
					"<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
					
				// Skip the first entry which contains the Research ID
				for (i=1;i<g.length;i++){
					var ratingValue = g[i];
					if (ratingValue > 0) {
						calpercentage = Math.round(g[i]*100/total)
						calwidth = Math.round(gwidth*(calpercentage/120))
						output += "<tr><td nowrap class=\"small\" height=\"15\" valign=\"middle\">" + (i-1) + "&nbsp;</td>" +
						"<td class=\"small\" nowrap><img src=\"" + graphimage+"\" width=\"" + calwidth + "\" height=\"10\">&nbsp;" + g[i] + " (" + calpercentage + "%)</td></tr>\n"
					}
					else {
						output+="<tr><td nowrap class=\"small\" height=\"15\" valign=\"middle\">"+ (i-1) + "</td></tr>\n"
					}
				}
				
				output += "</table>\n";
				
				return (output + "<br><span class=\"small\">Total: <b>"+total+"</b></span>");
			}
			return "";
		}
		// End graphit
		
		function showRatingDetail(item) {
			try {
				var itemData = dataArray[item];	
				var popUpWindowString = graphit(itemData, 220)
				var tt = document.getElementById("rating");
								
				if (popUpWindowString != "") {
					var yCoord = getYPosition();	
					var xCoord = getXPosition();
					
					document.getElementById("ratingdata").innerHTML = 
						"<span>" + graphit(itemData, 220) + "</span>";
			
					tt.style.top = parseInt(yCoord - 10) + 'px';
					
					var windowWidth;
					
					if (window.innerWidth != undefined) {
						windowWidth = window.innerWidth;
					} else {
						windowWidth = window.document.body.clientWidth;
					}
					
					tt.style.left = parseInt(xCoord - 350) + 'px';
					
					if (window.innerWidth == undefined)
						tt.style.left = (parseInt(tt.style.left) + 7) + 'px';
					
					tt.style.display = "block";
				}
				else {
					tt.style.top = '0px';
					tt.style.left = '0px';
					tt.style.display = "none";
				}
			}
			catch(e) {}
		}
		
		function hideRatingDetail() {
			document.getElementById("ratingdata").innerHTML = "";
			document.getElementById("rating").style.display = "none";
		}
		
				
		function getXPosition() {
			if (nav4) { // Netscape
				return document.getElementById("xPosition").value;
				
			} 
			else { // Internet Explorer			
				// IE6 +4.01 but no scrolling going on
				if (document.documentElement && !document.documentElement.scrollLeft) {
					return (document.getElementById("xPosition").value);
				}
				
				// IE6 +4.01 and user has scrolled
				else if (document.documentElement && document.documentElement.scrollLeft) {
					return (parseInt(document.getElementById("xPosition").value) + parseInt(document.documentElement.scrollLeft));
				}
			
				// IE5 or DTD 3.2
				return (parseInt(document.getElementById("xPosition").value) + parseInt(document.body.scrollLeft));
			}
		}
		
		function getYPosition() {
			if (nav4) { // Netscape
				return document.getElementById("yPosition").value;
				
			} 
			else { // Internet Explorer			
				// IE6 +4.01 but no scrolling going on
				if (document.documentElement && !document.documentElement.scrollTop) {
						return (document.getElementById("yPosition").value);
				}
				
				// IE6 +4.01 and user has scrolled
				else if (document.documentElement && document.documentElement.scrollTop) {
					return (parseInt(document.getElementById("yPosition").value) + parseInt(document.documentElement.scrollTop));
				}
			
				// IE5 or DTD 3.2
				return (parseInt(document.getElementById("yPosition").value) + parseInt(document.body.scrollTop));
			}
		}				
					
		function trackMove(e) {
			try {
				if (arguments.length == 0)  e = event;

				if (nav4) {
					document.getElementById("xPosition").value = e.pageX;
					document.getElementById("yPosition").value = e.pageY;
				}
				else  {
					document.getElementById("xPosition").value = e.clientX;
					document.getElementById("yPosition").value = e.clientY;
				}
			}
			catch (e){}
		} 	
		
		
		// JScript source code
