function rateProduct(value){
	var i = 0;
	var j = 0;
	for(i = 1; i <= value; i++){
		document.getElementById("rating_img_" + i).src = 'images/rating_1.jpg';
		j = i;
	}
	j++;
	for(i = j; j <= 5; j++){
		document.getElementById("rating_img_" + j).src = 'images/rating_0.jpg';
	}
	if(value == 5) document.getElementById("userRatingText").innerHTML = "sehr gut";
	if(value == 4) document.getElementById("userRatingText").innerHTML = "gut";
	if(value == 3) document.getElementById("userRatingText").innerHTML = "befriedigend";
	if(value == 2) document.getElementById("userRatingText").innerHTML = "ausreichend";
	if(value == 1) document.getElementById("userRatingText").innerHTML = "mangelhaft";
	
	document.getElementById("userRating").value = value;
	
}

function popup(source, title, width, height){
  popUpWindow = window.open(source, title, "width=" + width + ",height=" + height + ", scrollbars=yes");
  popUpWindow.focus();
}