var strUserAgent = new String(navigator.userAgent);
var arrUA = strUserAgent.split("MSIE ");
var browserValue = parseFloat(arrUA[1]);
if (navigator.userAgent.indexOf('MSIE') != -1 && browserValue >= 6  && browserValue < 7){
	var cssPropertyElections = "<style type='text/css'>";
	cssPropertyElections += "#usat-results-chart table.result.dem tr.sfHoverElections, #usat-results-chart table.result.dem tr:hover {background-color: #99b9d8;}";
	cssPropertyElections += "#usat-results-chart table.result.rep tr.sfHoverElections, #usat-results-chart table.result.rep tr:hover {background-color: #e7a6a9;}";
	cssPropertyElections += "</style>";		
	document.write(cssPropertyElections);
	
	sfHoverElections = function() {
		try {
			var sfEls = document.getElementById("usat-results-chart").getElementsByTagName("tr");
			//alert("got attribute");
			for (var i=0; i<sfEls.length; i++) {
				if (sfEls[i].getAttribute("title")!="reportinginfo"){			
					sfEls[i].onmouseover=function() {
						this.className+=" sfHoverElections";
					}
					sfEls[i].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" sfHoverElections\\b"), "");
					}
				}
			}
		}
		catch(err) {}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHoverElections);
}