function updateImage(side, em) {
	var em = em.options[em.selectedIndex];
	if(em.attributes["img"]) {
		var iid = em.attributes["img"].value;
		if(iid) {
			var ipath = "<img src=\"" + imgurl + "/" + iid + "/MINITHUMB.JPG\" style=\"width: 100px;\" />";
			$("displayinfo_"+side).innerHTML = ipath;
			$("displayinfo_pre").innerHTML = "";
		} else {
			$("displayinfo_"+side).innerHTML = "";
		};
	}
}

function tipFriend(ArticleId) {
	var wind = window.open("../article/tipafriend.asp?ArticleId="+ArticleId,"__friend","width=700,height=300,scrollbars=no,status=no,resizable=no");
	if(!wind) alert("Tipsa en Vän fönstret kunde inte öppnas! Kontrollera dina popup inställningar och försök igen.");
}

function renewPriceDisplay() {
	var display = document.getElementById("showSum");
	var amount = 0;
    var ems = document.getElementById("countset").getElementsByTagName("select");
	
	for(var items=0;items<ems.length;++items){
		var elem = ems[items];
		amount+=elem.value?parseInt(elem.value):0;
	}	

	var total = price[amount>=price.length?price.length-1:amount]*amount;
	discount=(price[1]*amount)-total;
	display.value = total + " kr";
}

function ol() {
	renewPriceDisplay();
}