PSR_current_post = null;
		PSR_http=PSR_getHTTPObject();
	  PSR_isWorking=false;
		
		function PSR_star_over(obj, star_number) {
			var psr=obj.parentNode;
			var as=psr.getElementsByTagName('label');
			for (i=0;i<star_number;++i) {
				as[i].lastClass = as[i].className;
				as[i].className = 'PSR_full_star';
			}
			for (;i<as.length;++i) {
				as[i].lastClass = as[i].className;
				as[i].className = 'PSR_no_star';
			}
if(star_number==1){
$("div.rating").html("Shockingly bad!");
}
if(star_number==2){
$("div.rating").html("Heard it all before!");
}
if(star_number==3){
$("div.rating").html("Vaguely interesting!");
}
if(star_number==4){
$("div.rating").html("I like it!");
}
if(star_number==5){
$("div.rating").html("High five!");
}
		}
		function PSR_star_out(obj) {
			var as=obj.getElementsByTagName('label');
			for (i=0;i<as.length;++i) {
				if (as[i].lastClass) {
					as[i].className = as[i].lastClass;
				}
			}
$("div.rating").html("&nbsp;");
		}
		function PSR_getHTTPObject() {
		  var xmlhttp;
		  /*@cc_on
		  @if (@_jscript_version >= 5)
		    try {
		      xmlhttp = new XMLHttpRequest()('Msxml2.XMLHTTP');
		    } catch (e) {
		      try {
		        xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
		      } catch (e) {
		        xmlhttp = false;
		      }
		    }
		  @else
		  xmlhttp = false;
		  @end @*/
		  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		    try {
		      xmlhttp = new XMLHttpRequest();
		    } catch (e) {
		      xmlhttp = false;
		    }
		  }
		  return xmlhttp;
		}
		function PSR_save_vote(post, points) {
		  if (!PSR_isWorking) {
		  	PSR_current_post=post;

				PSR_http.open('GET', 'http:\/\/www.footballfancast.com\/wp-content\/plugins\/post-star-rating\/psr-ajax-stars.php?p=' + PSR_current_post + '&psr_stars=' + points, true); 
				PSR_http.onreadystatechange = PSR_update_vote; 
			 	PSR_isWorking = true;
				PSR_http.send(null);
		  }
		}
		function PSR_update_vote() {

		  if (PSR_http.readyState == 4) {
		  	PSR_isWorking = false;
		  	var cont = document.getElementById('PSR_form_' + PSR_current_post).parentNode;
	    	cont.innerHTML=PSR_http.responseText;
		  }
		}