// Rate Over
function rate_over(id, directory) {
	for (i=1; i<=5; i++)
		document.getElementById("rate"+i).src=directory+(i<=id?"/rating.gif":"/rating-q0.gif");
}
// Rete Out
function rate_out(rate, directory) {
	for (i=1; i<=5; i++) {
		if (rate < i-0.75) no = 0;
		else if (rate < i-0.5) no = 1;
		else if (rate < i-0.25) no = 2;
		else if (rate < i) no = 3;
		else no = 4;
		document.getElementById("rate"+i).src=directory+"/rating-q"+no+".gif";
	}
}
// Ajax
function setdata(url, target) {
	var http;
	if (window.ActiveXObject) {
		http = new ActiveXObject("Microsoft.XMLHTTP");
	} else if (window.XMLHttpRequest) {
		http = new XMLHttpRequest();
	} else {
		alert("Your browser don't support Ajax.");
	}
	http.onreadystatechange = statechange;
	http.open("GET", url, true);
	http.send(null);
	function statechange() {
		if (http.readyState == 1) {
			//document.getElementById(target).innerHTML = '<span class="loading">Loading...</span>';
		} else if (http.readyState == 4) {
			if (http.status == 200) {
				document.getElementById(target).innerHTML = http.responseText;
			} else {
				alert("There was a problem retrieving the XML data:\n" + http.statusText);
			}
		}
	}
}