AjaxRating = new NewAjax();

function SaveRating(type, typeID, typefield, rating, uID) {
	if(rating) {
		AjaxRating.open("POST", '_system/ajax_inc/rating.php', true);
		AjaxRating.onreadystatechange = ShowRating;
		AjaxRating.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		AjaxRating.send("type=" + type + "&typeID=" + typeID + "&typefield=" + typefield + "&rating=" + rating + "&uID=" + uID);
	}
}

function ShowRating() {
	if(AjaxRating.readyState == 4) {
		document.getElementById("rating").innerHTML = AjaxRating.responseText;
	}
	else {
		document.getElementById("rating").innerHTML = 'Bewertung wird gespeichert...';
	}
}