function getCookie(name){
var cookie,list,i,equals,match;
cookie=document.cookie;
if(cookie.length==0){
return '';
}

else{
list=cookie.split(';');
for(i=0;i<list.length;i=i+1){
equals=list[i].indexOf('=');
match=list[i].substring(0,equals);
if(match.substr(0,1)==' '){
match=match.substr(1);
}
if(match==name){
return list[i].substring(equals+1,list[i].length);
}
}
return '';
}
}

var eyC=getCookie("count");
var eyST=getCookie("subtotal");
var EYtfs;

EYtfs = 100 - (eyST.split('$').join(''));

EYtfs = Math.round(EYtfs * 100) / 100;

if (eyC.length==0)
{
document.write("<div class='cookClass'>0 &nbsp;|&nbsp; $0.00</div>");
document.write("<div class=\"cookNotification\">Your Cart Is Empty</div>");
}
else{

document.write("<div class='cookClass'>"+eyC+" &nbsp;|&nbsp; "+eyST+"</div>");

if (EYtfs > 0)
{
document.write("<div class=\"cookNotification\">Spend $"+EYtfs+" to Receive FREE SHIPPING!</div>");
}
else
{
document.write("<div class=\"cookNotification\">You are eligible for FREE SHIPPING!</div>");
}

}
