// cp coupons for teesed.com and family

// leave this be
	var coupons = 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 couponDate=new Date();
	today = today.toDateString();
	var i = 0;
	var showallcoupons;
	var x;
// leave this be






// first coupon - soonest to expire
var themonth = "2";
var theday = "28";
var theyear = "2010";
var thediscount = "$5 off";
var theminorder = "$75";
var thecode = "FCPMAR1";
var couponDate=new Date(theyear,themonth,theday);
couponDate.setMonth(couponDate.getMonth()-1);
couponDate= couponDate.getTime();

if (couponDate>=thisDate) {
	coupons[i] = '<div class=coupontoptext>' + thediscount + '</div>on ' + theminorder + ' TODAY ONLY (Nov 30)<br />At checkout, use coupon code:<div class=coupontoptext>' + thecode + '</div>';
	i++;
}



//next coupon

var themonth = "2";
var theday = "28";
var theyear = "2010";
var thediscount = "$10 off";
var theminorder = "$100";
var thecode = "FCPMAR2";
var couponDate=new Date(theyear,themonth,theday);
couponDate.setMonth(couponDate.getMonth()-1);
couponDate= couponDate.getTime();

if (couponDate>=thisDate) {
	coupons[i] = '<div class=coupontoptext>' + thediscount + '</div>on orders of ' + theminorder + ' or more through ' + themonth + "/" + theday + '<br />At checkout, use coupon code:<div class=coupontoptext>' + thecode + '</div>';
	i++;
}




//next coupon

var themonth = "6";
var theday = "30";
var theyear = "2009";
var thediscount = "$10 off";
var theminorder = "$100";
var thecode = "FCPMAR2";
var couponDate=new Date(theyear,themonth,theday);
couponDate.setMonth(couponDate.getMonth()-1);
couponDate= couponDate.getTime();

if (couponDate>=thisDate) {
	coupons[i] = '<div class=coupontoptext>' + thediscount + '</div>on orders of ' + theminorder + ' or more through ' + themonth + "/" + theday + '<br />At checkout, use coupon code:<div class=coupontoptext>' + thecode + '</div>';
	i++;
}









if (showallcoupons) {
	
	for (x in coupons)
	{
	document.write ('<div class="couponcodebox"><div class="coupontop"></div><div class="couponmiddle">FREE COUPONS!<br />');
	document.write(coupons[x] + "<br />");
	document.write ('</div><div class="couponbottom"></div></div><hr>');
	}

} else {
	document.write ('<div class="couponcodebox"><div class="coupontop"></div><div class="couponmiddle">FREE COUPONS!<br />');
	document.write(coupons[0]);
	if (i>0) {
		document.write ('<br /><small><a href="javascript: void(0)" onclick="window.open(\'http://www.teesed.com/coupon.html\', \'couponwin\', \'width=300, height=400 scrollbars=1\'); return false;">View all coupons!</a></small>');
	}
	document.write ('</div><div class="couponbottom"></div></div>');
}

if (coupons.length == 0) {
	document.write ('<div class="couponcodebox"><div class="coupontop">COUPON CODES!</div><div class="couponmiddle">');
	document.write("Sorry, there are no current coupons.<br />");
	document.write ('</div><div class="couponbottom"></div></div>');
}


