function menuInitAll()
{
    menuInitImage("gallery");
    menuInitImage("biography");
    menuInitImage("location");
    menuInitImage("chapel");
    menuInitImage("events");
    menuInitImage("education");
    menuInitImage("giftshop");
    menuInitImage("giftshop/plates");
    menuInitImage("giftshop/newitems");
    menuInitImage("giftshop/prints");
    menuInitImage("giftshop/books");
    menuInitImage("giftshop/goebels");
    menuInitImage("giftshop/notecards");
    menuInitImage("giftshop/otheritems");
    menuInitImage("showorder");
}

function AddToCart(shortItemId)
{
    var textBox = findElement("qty_" + shortItemId);
    if(textBox == null) return;
    var quantity = parseInt(textBox.value);
    if(isNaN(quantity)) quantity = 0;

    textBox.value = (quantity + 1).toString();

    ShowViewCartButtons();
}

function QuantityChange(shortItemId)
{
    var textBox = findElement("qty_" + shortItemId);
    if(textBox == null) return;
    var quantity = parseInt(textBox.value);
    if(isNaN(quantity)) quantity = 0;

    if(quantity>0)
        ShowViewCartButtons();
}

function ShowViewCartButtons()
{
    for(var i=0; i<100; i++)
    {
        var div = findElement("viewcart" + i);
        if(div!=null)
            div.style.visibility = "visible";
    }
}

function PostTo(relativeUrl)
{
	var theform;
	if(window.navigator.appName.toLowerCase().indexOf("netscape") > -1)
		theform = document.forms["myForm"];
	else
		theform = document.myForm;

	//theform.__VIEWSTATE.removeNode(true);
    theform.__VIEWSTATE.value = "";
    theform.action = relativeUrl;
    theform.submit();
}
