function fChange(sender) {

	i = 1;
	html = "";

	var color = new Array(5);
	color[0] = "grey";
	color[1] = "red";
	color[2] = "orange";
	color[3] = "yellow";
	color[4] = "lightgreen";
	color[5] = "green";



	if(sender != 0) {
		while(i <= sender) {
			fId("id_" + i).src = "images/icons/"+sIconpack+"/favorites_"+color[i]+"_16.png";
			//html += "<img id="+i+" src='images/icons/favorites_"+color[i]+"_16.png' onmouseover='setTimeout(\"fChange("+i+")\", 50)' onmouseout='setTimeout(\"fChange(12)\", 50)'>";
			i++;
		}
	}


	while(i <= 5) {
		fId("id_" + i).src = "images/icons/"+sIconpack+"/favorites_"+color[0]+"_16.png";
		//html += "<img id="+i+" src='images/icons/favorites_grey_16.png' onmouseover='setTimeout(\"fChange("+i+")\", 50)' onmouseout='setTimeout(\"fChange(12)\", 50)'>";
		i++;
	}

		//document.getElementById('rate').innerHTML = html;

	return false;
}

function fSetChecked() {
	i = 1;
	while(i <= 5) {
		fId("a_rat_" + i).href = "#";
		fId("a_rat_" + i).onclick = fDoNothing;
		i++;
	}
}

function fDoNothing() {};

function fReloadRat() {
	if(oRequest.readyState == 4) {
		if(oRequest.status == 200) {
			fId('a_rat_1').parentNode.innerHTML = oRequest.responseText;
			return true;
		} else return false;
	}
}

function fRatAjax(_sUrl, _sModule, _nId) {
	fSetChecked();
	fAjaxRequest(_sUrl, false, false);
	fAjaxRequest('ratAjax.php?sModule=' + _sModule + '&nId=' + _nId, "fReloadRat", true);
	return false;
}

