
	function fShowHideMenuBlock(id) {
		$('ShopSubMenu'+id).style.display = ($('ShopSubMenu'+id).style.display == '') ? 'none' : '';
	}

	function fCheckInt(strVal) {
		var Success = false;
		var ParsedInt = parseInt(strVal);
		if(ParsedInt != NaN) if(ParsedInt == strVal) Success = true;
		return Success;
	}

	function fAddItemToCart(shvw, prid, vrid, errMsg) {
		var Frm = $('frm'+vrid);
		var Amt = $('amnt'+vrid).value;
		if(fCheckInt(Amt)) {
			Frm.action = 'shop.cfm?shvw=' + shvw + '&prid=' + prid;
			Frm.submit();
		} else {
			alert(errMsg);
			Amt.focus();
		}
	}

	function fExecuteOrder(shvw, scmd, orpg) {
		Frm = $('AddForm');
		Frm.action = 'shop.cfm?shvw=' + shvw + '&scmd=' + scmd + '&orpg=' + orpg;
		Frm.submit();
	}

	function fLoadAddress(shvw, orpg) {
		Frm = $('AddForm');
		Frm.action = 'shop.cfm?shvw=' + shvw + '&orpg=' + orpg;
		Frm.submit();
	}

	function fConfirm(message, destination) {
		var Cnf = confirm(message);
		if(Cnf) {
			if(document.location.replace) {
				document.location.replace(destination)
			} else {
				document.location.href = destination;
			}
		}
	}
