changeProductPic = function(pic1){
	var currentPic = pic1;
	
	this.changeVisibilitiy = function(pic){
		document.getElementById("productPic" + currentPic).style.display = "none";
		document.getElementById("productPic" + pic).style.display = "inline";
		currentPic = pic;
	}
}

changeProductDetail = function(){
	var currentTab = 0;
	
	this.changeTab = function(tabid){
		document.getElementById("Productdetail" + currentTab).style.display = "none";
		document.getElementById("Productdetail" + tabid).style.display = "inline";
		currentTab = tabid;
	}
}

showBewertungForm = function(){
	if(document.getElementById("BewertungForm").style.display == "none"){
		document.getElementById("BewertungForm").style.display = "inline";
		document.getElementById("showBewertung").style.display = "none";
		document.getElementById("unshowBewertung").style.display = "inline";
	}else{
		document.getElementById("BewertungForm").style.display = "none";
		document.getElementById("unshowBewertung").style.display = "none";
		document.getElementById("showBewertung").style.display = "inline";
	}
}

bewertungsSterne = function(imagePath){
	var stars = new Array();
	stars = document.getElementsByName("bewertungStar");
	
	this.hoverStar = function(id){
		if(stars.length > 0){
			for(i=0; i<stars.length; i++){
				if(id > i)
					stars[i].src = imagePath + "/icons/star_color.gif";
				else
					stars[i].src = imagePath + "/icons/star_grey.gif";
			}
		}else
			alert("Keine Sterne am Himmel!");
	}
	
	this.clearStars = function(){
		if(stars.length > 0){
			for(i=0; i<stars.length; i++){
				if(document.forms["frmBewertung"].elements["bewertungSterne"].value > i)
					stars[i].src = imagePath + "/icons/star_color.gif";
				else
					stars[i].src = imagePath + "/icons/star_grey.gif";
			}
		}else
			alert("Keine Sterne am Himmel!");
	}
	
	this.clickStar = function(id){
		if(stars.length > 0){
			document.forms["frmBewertung"].elements["bewertungSterne"].value = id;
		}else
			alert("Keine Sterne am Himmel!");
	}
}
