function showDellCoupon(day,month,year,code,discount,desc,linkname,couptype,red) {
	expire = new Date(year,month - 1,day);
	today = new Date();
	if (today.valueOf() > expire.valueOf() + 86400 * 1000) { return 0; }
	total = "<li><p>";
	total = total + "<a ";
	if (linkname) { total = total + "name=\"" + linkname + "\" "; }
	total = total + "href=\"Dell-Discount.php?discount=" + discount + "\" ";
	total = total + "target=\"_blank\" onClick=\"javascript: pageTracker._trackPageview('/outside/CJElectronics');javascript:copyCode('" + code + "');\">";
	total = total + "<strong>" + code + "</strong></a> - ";
	if (couptype) { total = total + "<strong>" + couptype + " coupon</strong> - "; }
	total = total + desc;
	before = "";
	after = "";
	if ((expire.valueOf() - today.valueOf()) < 5 * 86400 * 1000) {
	before = "<span class=\"expdiscount\">";
	after = "</span>";
	}
	if ((expire.valueOf() - today.valueOf()) < 0) {
		month = 13;	
		day = "today";
	}
	if ((expire.valueOf() - today.valueOf()) > 0 && (expire.valueOf() - today.valueOf()) < 86400 * 1000) {
		month = 13;	
		day = "tomorrow";
	}
	total = total + " " + before + "(expires " + monthName(month - 1) + " " + day;
	if (red) { total = total + " or after " + red + " redemptions"; }
	total = total + ")" + after + "</p></li>";
	document.write(total);
}
function showDellDiscount(day,month,year,discount,title,desc,linkname) {
	expire = new Date(year,month - 1,day);
	today = new Date();
	if (today.valueOf() > expire.valueOf() + 86400 * 1000) { return 0; }
	total = "<li><p>";
	total = total + "<a ";
	if (linkname) { total = total + "name=\"" + linkname + "\" "; }
	total = total + "href=\"Dell-Discount.php?discount=" + discount + "\" ";
	total = total + "target=\"_blank\" onClick=\"javascript: pageTracker._trackPageview('/outside/CJElectronics');\">";
	total = total + "<strong>" + title + "</strong></a> - ";
	total = total + desc;
	before = "";
	after = "";
	if ((expire.valueOf() - today.valueOf()) < 5 * 86400 * 1000) {
	before = "<span class=\"expdiscount\">";
	after = "</span>";
	}
	if ((expire.valueOf() - today.valueOf()) < 0) {
		month = 13;	
		day = "today";
	}
	if ((expire.valueOf() - today.valueOf()) > 0 && (expire.valueOf() - today.valueOf()) < 86400 * 1000) {
		month = 13;	
		day = "tomorrow";
	}
	total = total + " " + before + "(expires " + monthName(month - 1) + " " + day + ")" + after + "</p></li>";
	document.write(total);
}

function monthName(monthnum) {
	var monthy;
	switch (monthnum) {
	case 12:
		return " ";
		break;
	case 0:
		monthy = "January";
		break;
	case 1:
		monthy = "February";
		break;
	case 2:
		monthy = "March";
		break;
	case 3:
		monthy = "April";
		break;
	case 4:
		monthy = "May";
		break;
	case 5:
		monthy = "June";
		break;
	case 6:
		monthy = "July";
		break;
	case 7:
		monthy = "August";
		break;
	case 8:
		monthy = "September";
		break;
	case 9:
		monthy = "October";
		break;
	case 10:
		monthy = "November";
		break;
	case 11:
		monthy = "December";
		break;
	default:
		monthy = "never";
		break;
	}
	return monthy;
}

function showHPCoupon(day,month,year,code,discount,desc,linkname,couptype,red) {
	expire = new Date(year,month - 1,day);
	today = new Date();
	if (today.valueOf() > expire.valueOf() + 86400 * 1000) { return 0; }
	total = "<li><p>";
	total = total + "<a ";
	if (linkname) { total = total + "name=\"" + linkname + "\" "; }
	total = total + "href=\"HP-Discount.php?discount=" + discount + "\" ";
	total = total + "target=\"_blank\" onClick=\"javascript: pageTracker._trackPageview('/outside/CJElectronics');javascript:copyCode('" + code + "');\">";
	total = total + "<strong>" + code + "</strong></a> - ";
	if (couptype) { total = total + "<strong>" + couptype + " coupon</strong> - "; }
	total = total + desc;
	before = "";
	after = "";
	if ((expire.valueOf() - today.valueOf()) < 5 * 86400 * 1000) {
	before = "<span class=\"expdiscount\">";
	after = "</span>";
	}
	if ((expire.valueOf() - today.valueOf()) < 0) {
		month = 13;	
		day = "today";
	}
	if ((expire.valueOf() - today.valueOf()) > 0 && (expire.valueOf() - today.valueOf()) < 86400 * 1000) {
		month = 13;	
		day = "tomorrow";
	}
	total = total + " " + before + "(expires " + monthName(month - 1) + " " + day;
	if (red) { total = total + " or after " + red + " redemptions"; }
	total = total + ")" + after + "</p></li>";
	document.write(total);
}
function showHPDiscount(day,month,year,discount,title,desc,linkname) {
	expire = new Date(year,month - 1,day);
	today = new Date();
	if (today.valueOf() > expire.valueOf() + 86400 * 1000) { return 0; }
	total = "<li><p>";
	total = total + "<a ";
	if (linkname) { total = total + "name=\"" + linkname + "\" "; }
	total = total + "href=\"HP-Discount.php?discount=" + discount + "\" ";
	total = total + "target=\"_blank\" onClick=\"javascript: pageTracker._trackPageview('/outside/CJElectronics');\">";
	total = total + "<strong>" + title + "</strong></a> - ";
	total = total + desc;
	before = "";
	after = "";
	if ((expire.valueOf() - today.valueOf()) < 5 * 86400 * 1000) {
	before = "<span class=\"expdiscount\">";
	after = "</span>";
	}
	if ((expire.valueOf() - today.valueOf()) < 0) {
		month = 13;	
		day = "today";
	}
	if ((expire.valueOf() - today.valueOf()) > 0 && (expire.valueOf() - today.valueOf()) < 86400 * 1000) {
		month = 13;	
		day = "tomorrow";
	}
	total = total + " " + before + "(expires " + monthName(month - 1) + " " + day + ")" + after + "</p></li>";
	document.write(total);
}

function showDelayHPCoupon(sday,smonth,syear,day,month,year,code,discount,desc,linkname,couptype,red) {
	expire = new Date(year,month - 1,day);
	start = new Date(syear,smonth - 1,sday);
	today = new Date();
	if ((today.valueOf() > expire.valueOf() + 86400 * 1000) || today.valueOf() < start.valueOf()) { return 0; }
	total = "<li><p>";
	total = total + "<a ";
	if (linkname) { total = total + "name=\"" + linkname + "\" "; }
	total = total + "href=\"HP-Discount.php?discount=" + discount + "\" ";
	total = total + "target=\"_blank\" onClick=\"javascript: pageTracker._trackPageview('/outside/CJElectronics');javascript:copyCode('" + code + "');\">";
	total = total + "<strong>" + code + "</strong></a> - ";
	if (couptype) { total = total + "<strong>" + couptype + " coupon</strong> - "; }
	total = total + desc;
	before = "";
	after = "";
	if ((expire.valueOf() - today.valueOf()) < 5 * 86400 * 1000) {
	before = "<span class=\"expdiscount\">";
	after = "</span>";
	}
	if ((expire.valueOf() - today.valueOf()) < 0) {
		month = 13;	
		day = "today";
	}
	if ((expire.valueOf() - today.valueOf()) > 0 && (expire.valueOf() - today.valueOf()) < 86400 * 1000) {
		month = 13;	
		day = "tomorrow";
	}
	total = total + " " + before + "(expires " + monthName(month - 1) + " " + day;
	if (red) { total = total + " or after " + red + " redemptions"; }
	total = total + ")" + after + "</p></li>";
	document.write(total);
}
function showDelayHPDiscount(sday,smonth,syear,day,month,year,discount,title,desc,linkname) {
	expire = new Date(year,month - 1,day);
	start = new Date(syear,smonth - 1,sday);
	today = new Date();
	if ((today.valueOf() > expire.valueOf() + 86400 * 1000) || today.valueOf() < start.valueOf()) { return 0; }
	total = "<li><p>";
	total = total + "<a ";
	if (linkname) { total = total + "name=\"" + linkname + "\" "; }
	total = total + "href=\"HP-Discount.php?discount=" + discount + "\" ";
	total = total + "target=\"_blank\" onClick=\"javascript: pageTracker._trackPageview('/outside/CJElectronics');\">";
	total = total + "<strong>" + title + "</strong></a> - ";
	total = total + desc;
	before = "";
	after = "";
	if ((expire.valueOf() - today.valueOf()) < 5 * 86400 * 1000) {
	before = "<span class=\"expdiscount\">";
	after = "</span>";
	}
	if ((expire.valueOf() - today.valueOf()) < 0) {
		month = 13;	
		day = "today";
	}
	if ((expire.valueOf() - today.valueOf()) > 0 && (expire.valueOf() - today.valueOf()) < 86400 * 1000) {
		month = 13;	
		day = "tomorrow";
	}
	total = total + " " + before + "(expires " + monthName(month - 1) + " " + day + ")" + after + "</p></li>";
	document.write(total);
}

function showToshibaCoupon(day,month,year,code,discount,desc,linkname,couptype,red) {
	expire = new Date(year,month - 1,day);
	today = new Date();
	if (today.valueOf() > expire.valueOf() + 86400 * 1000) { return 0; }
	total = "<li><p>";
	total = total + "<a ";
	if (linkname) { total = total + "name=\"" + linkname + "\" "; }
	total = total + "href=\"Toshiba-Discount.php?discount=" + discount + "\" ";
	total = total + "target=\"_blank\" onClick=\"javascript: pageTracker._trackPageview('/outside/CJElectronics');javascript:copyCode('" + code + "');\">";
	total = total + "<strong>" + code + "</strong></a> - ";
	if (couptype) { total = total + "<strong>" + couptype + " coupon</strong> - "; }
	total = total + desc;
	before = "";
	after = "";
	if ((expire.valueOf() - today.valueOf()) < 5 * 86400 * 1000) {
	before = "<span class=\"expdiscount\">";
	after = "</span>";
	}
	if ((expire.valueOf() - today.valueOf()) < 0) {
		month = 13;	
		day = "today";
	}
	if ((expire.valueOf() - today.valueOf()) > 0 && (expire.valueOf() - today.valueOf()) < 86400 * 1000) {
		month = 13;	
		day = "tomorrow";
	}
	total = total + " " + before + "(expires " + monthName(month - 1) + " " + day;
	if (red) { total = total + " or after " + red + " redemptions"; }
	total = total + ")" + after + "</p></li>";
	document.write(total);
}
function showToshibaDiscount(day,month,year,discount,title,desc,linkname) {
	expire = new Date(year,month - 1,day);
	today = new Date();
	if (today.valueOf() > expire.valueOf() + 86400 * 1000) { return 0; }
	total = "<li><p>";
	total = total + "<a ";
	if (linkname) { total = total + "name=\"" + linkname + "\" "; }
	total = total + "href=\"Toshiba-Discount.php?discount=" + discount + "\" ";
	total = total + "target=\"_blank\" onClick=\"javascript: pageTracker._trackPageview('/outside/CJElectronics');\">";
	total = total + "<strong>" + title + "</strong></a> - ";
	total = total + desc;
	before = "";
	after = "";
	if ((expire.valueOf() - today.valueOf()) < 5 * 86400 * 1000) {
	before = "<span class=\"expdiscount\">";
	after = "</span>";
	}
	if ((expire.valueOf() - today.valueOf()) < 0) {
		month = 13;	
		day = "today";
	}
	if ((expire.valueOf() - today.valueOf()) > 0 && (expire.valueOf() - today.valueOf()) < 86400 * 1000) {
		month = 13;	
		day = "tomorrow";
	}
	total = total + " " + before + "(expires " + monthName(month - 1) + " " + day + ")" + after + "</p></li>";
	document.write(total);
}