function chShop(productid, vat, curr, variant)
{
	if (variant != '') {
		if (variant != 'defaultimg') {
			variant = document.forms["incart_"+productid].elements[variant].value;
			variant = variant.split("|");
			variant = variant[0];
		}
		imagevariants = document.forms["incart_"+productid].elements["imagevariants"].value;
		imagevariants = imagevariants.split("|");
		for(i=0; i < imagevariants.length; i++)
		{
			document.getElementById('chshop_variant_'+productid+'_'+imagevariants[i]).style.display = 'none';
		}
		document.getElementById('chshop_variant_'+productid+'_defaultimg').style.display = 'none';
		document.getElementById('chshop_variant_'+productid+'_'+variant).style.display = 'block';
		document.forms["incart_"+productid].elements["image"].value = document.forms["incart_"+productid].elements["image_"+variant].value;
	}
	if (variant != 'defaultimg') {
		foo = document.forms["incart_"+productid].variantkeys.value;
		price = document.forms["incart_"+productid].price.value;
		variantkeys = foo.split(",");
		for(i=0; i < variantkeys.length; i++)
		{
			foo = document.forms["incart_"+productid].elements[variantkeys[i]].value.split("|");
			priceopt = foo[2];
			if(priceopt) {
				operator = priceopt.slice(0, 1);
				if(operator == "+" || operator == "-") {
					price = eval(price)+eval(priceopt);
				} else {
					price = "" + priceopt;
				}
			}
		}
		price = ""+Math.round(price * vat * 100);
		price = price.substr(0,price.length-2)+"."+price.substr(price.length-2,2)+" "+curr;
		if(price.substr(0,1) == '.') {
			price = "0" + price;
		}
		document.getElementById("priceview_"+productid).firstChild.nodeValue=price;
	}
}