
var webApplication = "";
<!--
function ShowBackorderNotification(firstLineNumber, sourcePage)
{
	ShowPopUp(webApplication + "/Notification.aspx?lineNo=" + firstLineNumber + "&srcPg=" + sourcePage, "600", "300", true);
}

function CloseBackorderNotification(sourcePage)
{
	window.opener.location = sourcePage;
	window.close();
}

function ShowShipAfterCalendar(sourcePage)
{
	ShowPopUp("http://www.mygrandma.com/Checkout/Calendar.aspx?srcPg=" + sourcePage, "300", "200", true);
}

function CloseShipAfterCalendar(sourcePage)
{
	window.opener.location = sourcePage;
	window.close();
}

function UpdateQuantitiesTotal(currentBox, totalQuantityId)
{
	if(isNaN(parseInt(currentBox.value)))
		currentBox.value = 0;
		
	var totalQuantity = 0;
	var textBoxes = document.body.getElementsByTagName("INPUT");
	for(i=0; i<textBoxes.length; i++)
	{
		if(textBoxes[i].type == "text" && (!isNaN(parseInt(textBoxes[i].value))))
			totalQuantity = totalQuantity + parseInt(textBoxes[i].value);
	}
	
	document.getElementById(totalQuantityId).innerHTML = totalQuantity;
}

function UpdateQuantityTotal(totalQuantityId)
{
	var totalQuantity = 0;
	var textBoxes = document.body.getElementsByTagName("INPUT");
	for(i=0; i<textBoxes.length; i++)
	{
		if(textBoxes[i].type == "text" && (!isNaN(parseInt(textBoxes[i].value))))
			totalQuantity = totalQuantity + parseInt(textBoxes[i].value);
	}
	
	document.getElementById(totalQuantityId).innerHTML = totalQuantity;
}

function ShowPopUp(url, width, height, scroll)
{
	if(scroll == true)
		scroll = "yes";
	if(scroll == false)
		scroll = "no";
		
	window.open(url, null, "status=no," +
							"toolbar=no," +
							"menubar=no," +
							"resizable=yes," +
							"directories=no," +
							"location=no," +
							"scrollbars=" + scroll + "," +
							"width=" + width +
							",height=" + height);
	
}

function ChangeImage(image, picture)
{
	if(typeof(image) == "string")
		image = document.getElementById(image);

	image.src = picture;
}

function PreloadImages()
{
	var d = document;
	
	if(d.images){
		if(!d.pageImages) d.pageImages = new Array();
		
		var i, j = d.pageImages.length, a = PreloadImages.arguments; 
		
		for(i = 0; i < a.length; i++)
			if (a[i].indexOf("#")!=0){ 
				d.pageImages[j]=new Image; 
				d.pageImages[j++].src = a[i];
			}
	}
}

function GetScreenResolution()
{
	var res = "&res=" + screen.width;
	location = "banner.aspx?action=set" + res;
}

function ResetOrder()
{
	var textBoxes = document.body.getElementsByTagName("INPUT");
	for(i=0; i<textBoxes.length; i++)
	{
		if(textBoxes[i].type == "text" && parseInt(textBoxes[i].value) > 0)
		{
			textBoxes[i].value = "0";
		}
	}
}

/*
***********************************
Menu Functions
***********************************
Modified 06/2005 by MDG
	The overriding of javascript event handlers is not supported by Mozilla-based browsers.
	This code will be added dynamically to the page when an http request is made by an IE browser by the WriteDynamicMenu() method (scripts.aspx.cs)
*/


//-->
