//<SCRIPT>




/***************************************************************************************************************************
					getFooterHTML
						Builds HTML for footer menu
***************************************************************************************************************************/
function getFooterHTML(sLinkPrefix)
{

	if(sLinkPrefix==null)
		sLinkPrefix="";
	
	sHTML = '<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">' +
		'<TR ID="areaTabs" HEIGHT="25" CLASS="accentLightColor footerText" ALIGN="center" VALIGN="center">' +
		'<TD WIDTH="200px"></TD>' +

		/*
		'<TD><A HREF="' + sLinkPrefix + 'FAQ.aspx" ONMOUSEOVER="this.style.cursor=\'pointer\';this.style.color=\'yellow\';" ONMOUSEOUT="this.style.cursor=\'pointer\';this.style.color=\'#330099\';" CLASS="footerText">' +
			'FAQ</A></TD>' +
		'<TD CLASS="footerText">|</TD>' +
		*/
		
		/*
		'<TD><A HREF="' + sLinkPrefix + 'UnderConstruction.aspx" ONMOUSEOVER="this.style.cursor=\'pointer\';this.style.color=\'yellow\';" ONMOUSEOUT="this.style.cursor=\'pointer\';this.style.color=\'#330099\';" CLASS="footerText">' +
			'Terms of Use</A></TD>' +
		'<TD CLASS="footerText">|</TD>' +
		*/

		'<TD><A HREF="' + sLinkPrefix + 'ContactUs.aspx" ONMOUSEOVER="this.style.cursor=\'pointer\';this.style.color=\'yellow\';" ONMOUSEOUT="this.style.cursor=\'pointer\';this.style.color=\'#330099\';" CLASS="footerText">' +
			'Contact Us</A></TD>' +
		'<TD CLASS="footerText">|</TD>' +

		'<TD><A HREF="' + sLinkPrefix + 'PrivacyAndSecurity.aspx" ONMOUSEOVER="this.style.cursor=\'pointer\';this.style.color=\'yellow\';" ONMOUSEOUT="this.style.cursor=\'pointer\';this.style.color=\'#330099\';" CLASS="footerText">' +
			'Privacy & Security</A></TD>' +
		'<TD CLASS="footerText">|</TD>' +
		
		'<TD><A HREF="' + sLinkPrefix + 'givingandsharing.aspx" ONMOUSEOVER="this.style.cursor=\'pointer\';this.style.color=\'yellow\';" ONMOUSEOUT="this.style.cursor=\'pointer\';this.style.color=\'#330099\';" CLASS="footerText">' +
			'Giving & Sharing</A></TD>' +
		'<TD CLASS="footerText">|</TD>' +

		/*
		'<TD><A HREF="' + sLinkPrefix + 'UnderConstruction.aspx" ONMOUSEOVER="this.style.cursor=\'pointer\';this.style.color=\'yellow\';" ONMOUSEOUT="this.style.cursor=\'pointer\';this.style.color=\'#330099\';" CLASS="footerText">' +
			'Site Map</A></TD>' +
		'<TD CLASS="footerText">|</TD>' +
		*/
		
		'<TD><A HREF="' + sLinkPrefix + 'Careers.aspx" ONMOUSEOVER="this.style.cursor=\'pointer\';this.style.color=\'yellow\';" ONMOUSEOUT="this.style.cursor=\'pointer\';this.style.color=\'#330099\';" CLASS="footerText">' +
			'Careers</A></TD>' +
		
		'<TD WIDTH="240px"></TD>' +
		'</TR>' +
		'</TABLE>';

	return sHTML;
}



/***************************************************************************************************************************
					getBannerHTML
						Builds HTML for banners
***************************************************************************************************************************/
function getBannerHTML(sBannerName, sLinkPrefix)
{
	var sHTML;
	//sHTML='<DIV />';

	if(sLinkPrefix==null)
		sLinkPrefix="";
	/*
	if (sBannerName=='Birthday'){
		sHTML = '<A HREF="' + sLinkPrefix + 'SpecialEvents.aspx"><IMG CLASS="bannerImage" SRC="' + sLinkPrefix + 'images/Banner_Birthday.gif" /></A>';
	}
	else if (sBannerName=='FreeClass'){
		sHTML = '<A HREF="' + sLinkPrefix + 'UnderConstruction.aspx"><IMG CLASS="bannerImage" SRC="' + sLinkPrefix + 'images/Banner_FreeClass.gif" /></A>';
	}	
	else if (sBannerName=='Products'){
		sHTML = '<A HREF="' + sLinkPrefix + 'Products.aspx"><IMG CLASS="bannerImage" SRC="' + sLinkPrefix + 'images/Banner_Products.gif" /></A>';
	}	
	else if (sBannerName=='HolidayCookies'){
		sHTML = '<A HREF="' + sLinkPrefix + 'SpecialEvents.aspx"><IMG CLASS="bannerImage" SRC="' + sLinkPrefix + 'images/Banner_HolidayCookies.gif" /></A>';
	}
	*/

	if (sBannerName=='Birthday' || sBannerName=='FreeClass')
	{
		sHTML = '<A HREF="' + sLinkPrefix + 'Schedules.aspx"><IMG CLASS="bannerImage" SRC="' + sLinkPrefix + 'images/Banner_RegisterNow.jpg" /></A>';
	}	
	else if (sBannerName=='Products' || sBannerName=='HolidayCookies')
	{
		sHTML = '<A HREF="' + sLinkPrefix + 'MailingList.aspx"><IMG CLASS="bannerImage" SRC="' + sLinkPrefix + 'images/Banner_MonthOfFreeClasses.jpg" /></A>';
	}
	
	return sHTML;
}


function switchProductImage(imageName)
{
	document.getElementById("ProductImage").src="images/products/" + imageName;
}

function updatePriceWithGiftWrap()
{
	var selected = document.getElementById("selectGiftWrap").selectedIndex;
	//alert(selected);
	
	//<SPAN ID='displayPrice'>
	//<input type='hidden' id= 'amount' name='amount' value='#value#'>
	//"Cellophane ($3.95)"
	var giftWrapPrice = document.getElementById("selectGiftWrap").options[selected].value;
	//alert(giftWrapPrice);
	var startPosition = giftWrapPrice.indexOf('$')+1;
	var endPosition = giftWrapPrice.indexOf(')');
	//alert(startPosition + ":" + endPosition);
	
	giftWrapPrice = giftWrapPrice.substring(startPosition, endPosition)
	//alert(giftWrapPrice);

	var originalPrice = document.getElementById("originalPrice").value;
	//alert(originalPrice);

	var newPrice = parseFloat(originalPrice) + parseFloat(giftWrapPrice);
	newPrice = newPrice.toFixed(2);
	//alert(newPrice);

	var includeGiftWrapPriceText = "";
	
	if(giftWrapPrice>0)
	{
		includeGiftWrapPriceText = "<BR />(includes gift wrap price)";

		var msg = "If you want all items in this order to be wrapped together. " + 
			"You should not select the gift wrap option here. " + 
			"Please add this <A HREF='ProductDetails.aspx?productId=44'>gift wrap item</A> to your order instead"
		document.getElementById("specialInfo").innerHTML = msg;
	}
	else
	{
		includeGiftWrapPriceText = "";
		document.getElementById("specialInfo").innerHTML = "";
	}
	
	document.getElementById("displayPrice").innerHTML = "$" + newPrice + includeGiftWrapPriceText;
	document.getElementById("amount").value = newPrice;
}

function showPrintMessage()
{
	alert('Please use your browser to print this page.');
}
