// cp shop coupons for teesed.com and family

// leave this be
	var coupons = new Array();
	var details = new Array();
	var today = new Date();
	var month = today.getMonth();
	var day = today.getDate();
	var year = today.getFullYear();
	var thisDate = new Date(year,month,day);
	thisDate = thisDate.getTime();
	var couponStartDate=new Date();
	var couponEndDate=new Date();
	today = today.toDateString();
	var i = 0;
	var showallcoupons;
	var x;
// leave this be



// first coupon - soonest to expire
var startmonth = "1";
var startday = "24";
var startyear = "2011";

var endmonth = "1";
var endday = "27";
var endyear = "2011";

var thediscount = "$3 off $30 or more* - Ends 1/27! Coupon Code TJAN1130";
var thedetails = '*Save $3 off cafepress.com shop orders of $30 or more, excluding shipping charges, gift wrap charges and applicable sales tax. All orders must be added to cart from cafepress.com shops only. Excludes CafePress marketplace purchases (e.g. all products added to cart from URLs beginning with the following (i) http://shop.cafepress.com, (ii) http://t-shirts.cafepress.com and/or (iii) http://www.cafepress.com/sk/), Gift Certificates, Flip products, SIGG bottles, Thermos products, yoga mats and CafePress Make, Groups, and bulk orders. Coupon code TJAN1130 must be entered at check out. Promotion starts on January 25, 2011 at 12:00 a.m. (PST) and ends on January 27, 2011 at 11:59 p.m. (PST). Offer valid online at cafepress.com only, cannot be combined with any other coupons or promotions and may change, be modified or cancelled at anytime without notice. This promotion cannot be applied to past orders.';
var couponStartDate=new Date(startyear,startmonth,startday);
couponStartDate.setMonth(couponStartDate.getMonth()-1);
couponStartDate= couponStartDate.getTime();

var couponEndDate=new Date(endyear,endmonth,endday);
couponEndDate.setMonth(couponEndDate.getMonth()-1);
couponEndDate= couponEndDate.getTime();

if (couponStartDate<=thisDate && couponEndDate>=thisDate) {
	coupons[i] = thediscount;
	details[i] = thedetails;
	i++;
}


//next coupon

var startmonth = "11";
var startday = "29";
var startyear = "2010";

var endmonth = "11";
var endday = "29";
var endyear = "2010";

var thediscount = "$Cyber Monday 1 Day Sale! Today only, $10 off* orders of $45+ (code: CYBERM45)";
var thedetails = '*$10 USD off for orders of $50 USD or more from CafePress shops, excluding shipping charges, gift wrap charges, applicable taxes and custom duties. Coupon code THANKSTEN must be entered at check out. Promotion starts on November 25, 2010 at 12:00 a.m. (PST) and ends on November 25, 2010 at 11:59 p.m. (PST). All orders must be added to cart from CafePress shops only. Excludes CafePress marketplace purchases (e.g. all products added to cart from URLs beginning with the following (i) http://shop.cafepress, (ii) http://t-shirts.cafepress and/or (iii) http://www.cafepress.com/sk/),  Gift Certificates, Flip products, SIGG bottles, Thermos products, yoga mats, CafePress Make, Groups, and bulk orders. Offer valid online only, cannot be combined with any other coupons or promotions and may change, be modified or cancelled at anytime without notice.';
thedetails += '<i>Products in the shopping cart must begin with an 030- prefix to qualify for shop discounts and offers.';
var couponStartDate=new Date(startyear,startmonth,startday);
couponStartDate.setMonth(couponStartDate.getMonth()-1);
couponStartDate= couponStartDate.getTime();

var couponEndDate=new Date(endyear,endmonth,endday);
couponEndDate.setMonth(couponEndDate.getMonth()-1);
couponEndDate= couponEndDate.getTime();

if (couponStartDate<=thisDate && couponEndDate>=thisDate) {
	coupons[i] = thediscount;
	details[i] = thedetails;
	i++;
}



if (showallcoupons == "true") {
	
	for (x in coupons)
	{
	document.write ('<h3>' + coupons[x] + '</h3>');
	document.write ('<p class="details">' + details[x] + '</p>');
	}

} else {
	if (i>0) {
		document.write ('<div class="globalpromo"><div id="ribbonbanner"><span>');
		document.write(coupons[0]);
		document.write ('</span><div class="ribbondetails"><a href="javascript:launchHelp(\'http://www.teesed.com/shopcoupons.php\',\'height=400,width=410,scrollbars=1\')">*Details</a></div></div></div>');
	}
}




