function eatFCCookie(cookieName) {
	var the_info = new Array();
  	var the_cookie = document.cookie;
	var the_cookie = unescape(the_cookie);     
	for (i=0;i<the_cookie.split(';').length;i++) {          /*divides into individual item cookies */
		if (the_cookie.split(';')[i].indexOf(cookieName) != -1) {
			the_cookie = the_cookie.split(';')[i]; }
	}
	var broken_cookie = the_cookie.split("=");
        broken_cookie[1] = broken_cookie[1].replace(/\|@@\|/g,'=').replace(/\|@\|/g,'+');
	var the_values = broken_cookie[1];
                                document.write('<div class="hidden">' + broken_cookie[0] + '<\/div>');
                                document.write('<div class="hidden">' + the_values + '<\/div>');
	var separated_values = the_values.split("|");
	var property_value = "";
	for (var loop = 0; loop < separated_values.length; loop++)	
	{
		property_value = separated_values[loop];
		var broken_info = property_value.split("@");
		var the_property = broken_info[0];
		var the_value = broken_info[1];
		the_info[the_property] = the_value;
	}
	return the_info;
}

// change 0 to anything else to turn display off
var onOff = 0;

if (onOff == 0) {
if (document.cookie.indexOf('howMany') != -1) {
	var sepLine = '<tr><td colspan="2" class="left-nav-seperator-red"><img src="http://us.st1.yimg.com/store1.yimg.com/Img/trans_1x1.gif" height=1 width=1 border=0 alt="pad"></td></tr>';
	var catalog = 'leather-lingerie';
	var freeShipThreshold = 100;
	var totalPrice = 0;
	var cookieInfo = new Array();
	var cookieData = '<form method=post action=http://order.store.yahoo.net/ymix/MetaController.html><input type="hidden" name="ysco_key_store_id" value="' + catalog + '" /><input type="hidden" name="sectionId" value="ysco.cart" /><input type="hidden" name="mode" value="coMode" />';
	cookieData += '<table border="0" cellspacing=0 cellpadding=0 width="100%" style="background-color:white;">';
	cookieData += '<tr align=center valign=middle><td colspan="2" class="right-nav-header"><a class="right-nav-header" href="http://order.store.yahoo.com/cgi-bin/wg-order?' + catalog + '">Cart</a>&nbsp;|&nbsp;<a class=right-nav-header href="https://order.store.yahoo.net/ymix/MetaController.html?ysco_key_event_id=1&ysco_key_store_id=leather-lingerie&sectionId=ysco.shipping">Checkout</a> ';
	cookieInfo = eatFCCookie('floatingCartCookie');
	if (cookieInfo['ysco_hfkeys'])
	{
	cookieData += '<input type="hidden" name="ysco_hfkeys" value="' + cookieInfo['ysco_hfkeys'] + '" />';
	}
	if (cookieInfo['ysco_hfshash'])
	{
	cookieData += '<input type="hidden" name="ysco_hfshash" value="' + cookieInfo['ysco_hfshash'] + '" />';
	}
	cookieData += '</td></tr>';

		for (var bit in cookieInfo) {
			if (bit != 'howMany' && bit != 'ysco_hfkeys' && bit != 'ysco_hfshash' && cookieInfo[bit].length > 10) {
				totalPrice = totalPrice + parseFloat(cookieInfo[bit].split('^')[0]) * parseFloat(cookieInfo[bit].split('^')[3]);
			}
		}

		freeShipToGo = freeShipThreshold - totalPrice;


	if (cookieInfo['howMany'] != 0) {
		for (var bit in cookieInfo) {
			if (bit != 'howMany' && bit != 'ysco_hfkeys' && bit != 'ysco_hfshash' && cookieInfo[bit].length > 10) {
  				cookieData += '<tr valign=top class=fc_item_list><td colspan=2 align=left class=fc_item_list_name><input class=fc_item_qty type=text size=1 value=' + cookieInfo[bit].split('^')[3] + ' name=' + cookieInfo[bit].split('^')[4] + '><span style="color:white;">x</span> <a class=fc_item_list_name href=http://' + cookieInfo[bit].split('^')[1] + '>' + bit.split('!-!')[0] + '</a></td></tr>';
	  				cookieData += '<tr valign=top class=fc_item_list><td align=left class=fc_item_list_remove><a class=fc_item_list_remove href=http://order.store.yahoo.net/ymix/MetaController.html?eventName.removeEvent&sectionId=ysco.cart&ysco_key_store_id=' + catalog + '&' + 'cartDS.shoppingcart_ROW0_m_orderItemVector_ROW0_m_identity' + '=' + cookieInfo[bit].split('^')[6].replace('+','%2B') + '>[remove]</a>';
                                        cookieData += '<input type="hidden" name="' + cookieInfo[bit].split('^')[5] + '" value=' + cookieInfo[bit].split('^')[6] + ' />';
	  				cookieData += '</td><td align=right class=fc_item_list_price>$' + cookieInfo[bit].split('^')[0] + '</td></tr>';
  			}
		}

		cookieData += sepLine;
		cookieData += '<tr class=fc_item_list_total><td align=left class=fc_item_list_total_text>Product Total</td><td align=right class=fc_item_list_total_price>$' + parseMoney(totalPrice,'.') + '</td></tr>';
		cookieData += sepLine;

		cookieData += sepLine;
		cookieData += '<tr class=fc_update_button><td colspan=2 class=fc_update_button><input type=submit name="eventName.updateEvent" value="Update" class=fc_update_button></td></tr>';
		cookieData += '</table></form>';

		document.getElementById("floatingCartContents").innerHTML = cookieData;
	}
	else if (document.location.href.indexOf('order.store.yahoo') != -1) {
		document.getElementById("floatingCartContents").innerHTML = " ";
	}
	else {
		document.getElementById("floatingCartContents").innerHTML = " ";
	}
}
}
else if (document.location.href.indexOf('order.store.yahoo') != -1) {
	document.getElementById("floatingCartContents").innerHTML = " ";
}
else {
	document.getElementById("floatingCartContents").innerHTML = " ";
}

