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_to_vote';
			}
			for (;i<as.length;++i) {
				as[i].lastClass = as[i].className;
//				as[i].className = 'PSR_no_star';
			}
		}
		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;
				}
			}
		}
		function PSR_getHTTPObject() {
		  var xmlhttp;
		  /*@cc_on
		  @if (@_jscript_version >= 5)
		    try {
		      xmlhttp = new ActiveXObject('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, in_post_id, points, in_text) {
		  	PSR_current_post=post;
		  	PSR_current_in_post_id=in_post_id;		  	
		  	PSR_current_in_text_id=in_text;		 

		  if (!PSR_isWorking) { 	
				PSR_http.open('GET', 'http://www.toubeauty.com/wp-content/plugins/post-star-rating/psr-ajax-stars.php?p=' + PSR_current_post + '&psr_stars=' + points + '&in_post_id=' + in_post_id+ '&in_text=' + in_text, 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 + '_' + PSR_current_in_post_id).parentNode;
	    	cont.innerHTML=PSR_http.responseText;	    		    		
	    	
	    	if (!PSR_isWorking_overall) {				
					PSR_http_overall.open('GET', 'http://www.toubeauty.com/wp-content/plugins/post-star-rating/psr-ajax-global.php?p=' + PSR_current_post, true); 
					PSR_http_overall.onreadystatechange = PSR_update_overall; 
			 		PSR_isWorking_overall = true;
					PSR_http_overall.send(null);	    	
		  	}		
		  }
		}
		
		function PSR_update_overall() {
		  if (PSR_http_overall.readyState == 4) {		 
		  	PSR_isWorking_overall = false;
	    	document.getElementById('PSR_Overall').innerHTML = PSR_http_overall.responseText;
		  }
		}
		
		PSR_current_post = null;
		PSR_current_in_post_id = null;
		PSR_http=PSR_getHTTPObject();
		PSR_http_overall=PSR_getHTTPObject();
	  PSR_isWorking=false;
	  PSR_isWorking_overall=false;