// JavaScript Document

var AffIncludes = new Array()
AffIncludes[0] = "tintest_a";
AffIncludes[1] = "tintest_b";
AffIncludes[2] = "nwsd";

var AffMsg = new Array()
AffMsg[0] = "To place your order, simply complete the form below. Andersons Spirit will accumulate the orders and then make one shipment to the school shortly after the order cut-off day. The Graduation Coordinator will notifiy you when the items are ready for pickup. You will pay for your items at that time.<p />Thank you for supporting your school and congratulations to your graduate !!";
AffMsg[1] = "To place your order, simply complete the form below. Andersons Spirit will accumulate the orders and then make one shipment to the school shortly after the order cut-off day. The Graduation Coordinator will notifiy you when the items are ready for pickup. You will pay for your items at that time.<p />Thank you for supporting your school and congratulations to your graduate !!";
AffMsg[2] = "To place your order, simply complete the form below. Andersons will accumulate the orders and then make one shipment to the school shortly after the order cut-off day. The Graduation Coordinator will notifiy you when the items are ready for pickup. You will pay for your items at that time.<p />Thank you for supporting your school and congratulations to your graduate !!";

var ProdColorsA = new Array()
ProdColorsA[0] = "RealRed";
ProdColorsA[1] = "RoyalBlue";
ProdColorsA[2] = "RealRed";

var ProdColorsB = new Array()
ProdColorsB[0] = "Black";
ProdColorsB[1] = "HunterGreen";
ProdColorsB[2] = "Black";

var lastDay = new Array()
lastDay[0] = "May 9th";
lastDay[1] = "May 1st";
lastDay[2] = "May 16th";

curDomain = document.domain;
extractSubD = curDomain.split(".giantpartystore", 2);
curSubDomain = extractSubD[0];

if (curSubDomain != "www") {
     for (var x = 0; x <=  AffIncludes.length; x++)
         {
          if (AffIncludes[x] == curSubDomain)
            {
               thisAffiliate = curSubDomain;
               thisAffLogo = "<img src='/Uploads/15/AffiliateLanding/"+thisAffiliate+".gif'>";
               thisAffProdImgA = "<img src='/Uploads/15/AffiliateLanding/colors/plate_"+ProdColorsA[x]+".gif' alt='"+ProdColorsA[x] +"'>";
                thisAffProdImgB = "<img src='/Uploads/15/AffiliateLanding/colors/plate_"+ProdColorsB[x]+".gif' alt='"+ProdColorsB[x] +"'>";
				thisAffProdImgC = "<img src='/Uploads/15/AffiliateLanding/colors/napkin_"+ProdColorsB[x]+".gif' alt='"+ProdColorsB[x] +"'>";
                thisAffProdImgD = "<img src='/Uploads/15/AffiliateLanding/colors/cup_"+ProdColorsA[x]+".gif' alt='"+ProdColorsA[x] +"'>";
               thisAffMsg = AffMsg[x];
			   thisAffColors = ProdColorsA[x]+", "+ProdColorsB[x];
			   thisLastDay = lastDay[x];
            }
         }
}

function popUpImg(URL) {
	day = new Date();
	id = day.getTime();
	thisWin = eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=600,left = 100,top = 10');");
	var tmp = thisWin.document;
	tmp.write('<html><body><center><a href="javascript: this.close();" style="border:0px;"><img src="'+URL+'" border="0" /></a></center></body></html>');
	tmp.close();
}