/* microCart scripts */
/* Code written by Brian Nez <thedude at bri1.com>, copyright (c) 2009 */

function modify(item, quantity) {
	var answer = prompt("Please enter the new quantity you would like to have in your cart.", quantity);
	if(answer > 0) {
		document.location = "/cart.php?quantity=" + answer + "&item=" + item;
	}
}

function remove(item) {
	var answer = confirm("Are you sure you wish to remove all of this item from your cart?");
	if(answer) {
		document.location = "/cart.php?remove&item=" + item;
	}
}

function toggleVisibility(object) {
	if(document.getElementById(object).style.display == 'none') {
		document.getElementById(object).style.display = 'inline';
	} else {
		document.getElementById(object).style.display = 'none';
	}
}
