function removeProduct(prodid) {
	var enable = window.confirm ("Remove product from the cart?");
	if (enable) {
		window.location.replace('menu.php?act=show&remove=' + prodid);
	}
}

function dropJump(target) {
	window.location.replace(target);
}

function changeView(section) {
	if (document.getElementById(section).style.display == "block") {
		document.getElementById(section).style.display = "none";
	}
	else {
		document.getElementById(section).style.display = "block";
	}
}

function popOpen(url, vsize, hsize, more) {
	window.open(url, 'PopOpen', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=' + hsize + ',height=' + vsize + ',screenY=10,screenX=10,left=10,top=10');
}

function flipIm(image, pfix, sfix) {
	document[image].src = "images/" + pfix + image + sfix;
}

function cartPut(image, num) {
	imtarg = "os" + image;
	inptarg = "ct" + image;
	formtarg = "fo" + image;
	
	document[imtarg].src = "images/tocart_" + num + ".png";

}

function confirmDel (location) {
	var x = window.confirm("Remove the product from the cart?")
	if (!x) {
		return false;
	}
	else {
		window.location.replace (location);
	}
}
function confirmEmp (location) {
	var x = window.confirm("Empty cart?")
	if (!x) {
		return false;
	}
	else {
		top.document.location.replace (location);
	}
}

function cartChk (image) {

	imtarg = "os" + image;
	inptarg = "ct" + image;
	
	document[imtarg].src = "images/tocart_1.png";

}

function checkSub (area) {
	if (area == "kauppa") {
		document.getElementById('kauppatd').style.zIndex == "2";
	}
	if (area == "jalleenmyynti") {
		document.getElementById('jalleentd').style.zIndex == "2";
	}
}