						
var previousImage;							
function rollOn(name) {
		var imagename = eval("document." + name)
		
		previousImage = imagename.src   
         if (document.images) 
		 {
                imagename.src = eval('button_' + name + '_on.src');
        }
}
			
function rollOff(name) 
		{
			var imagename = eval("document." + name)
            imagename.src = previousImage;
         }

function showdate()
	{

		m = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
		today = new Date();
		day = today.getDate();
		year = today.getYear();
			if (year < 2000)year = year + 1900;
		end = "th";
			if (day==1 || day==21 || day==31) end="st";
			if (day==2 || day==22) end="nd";
			if (day==3 || day==23) end="rd";
		document.write(m[today.getMonth()]+" ");
		document.write(day+", " + year);
	}
	
// Opens window;
function openWindow(URL,Width,Height,WindowName,scrollbars)
	{
		var winLeft = (screen.width - Width) / 2;
		var winTop = (screen.height - Height) / 6;
		winprops = 'width='+Width+',height='+Height+',top='+winTop+',left='+winLeft+',scrollbars='+scrollbars+',resizable';
		win = window.open(URL, WindowName, winprops);
		win.focus();
	}


//Adds item to shopping cart
function AddToShoppingCart(ItemID,RedirectURL)
	{
	
		var quantity = eval("document.PurchaseForm.Quantity"+ItemID+".value");
		
		if (quantity == 0 || quantity == "") 
			{
				alert("Please provide the quantity that you would like to purchase");
			}
		else
			{
				top.location = "/processScripts/processAddShoppingCart.asp?ItemID="+ItemID+"&quantity="+quantity+"&RedirectURL="+RedirectURL	
			}
		
	}

//Removes items from shopping cart
function removeShoppingCart(DOMID,ItemID,RedirectURL)
	{
		top.location = "/processScripts/processRemoveShoppingCart.asp?ItemID="+ItemID+"&RedirectURL="+RedirectURL
	}