// JavaScript Document

expireDate = new Date();
theMonth = expireDate.getMonth();
expireDate.setMonth(theMonth+1);
expireDate = expireDate.toUTCString();
warnStatus = false;


var cj = document.cookie.split('; ');

function showWarning() {
	document.write("<div style='text-align:center;'><div style='width:780px; margin: 20% auto; color: #cc0000; text-align: center;'>***THE AWANA STORE WILL BE UNAVAILABLE FROM 10:30 PM CST ON FEBRUARY 13TH TO 1:30 AM CST ON FEBRUARY 14TH FOR SCHEDULED MAINTENANCE.***<br /> <input type='button' value='Continue' onclick='window.location.href=window.location.href' /></div></div>");
//	document.write("<div style='text-align:center;'><div style='width:780px; margin: 20% auto; color: #cc0000; text-align: center;'>***SO THAT EMPLOYEES MAY CELEBRATE CHRISTMAS, AWANA OFFICES WILL BE CLOSED FROM DECEMBER 24TH TO JANUARY 3RD. ORDERS PLACED DURING THIS TIME WILL BE FULFILLED THE WEEK OF JANUARY 4TH. MERRY CHRISTMAS!***<br /> <input type='button' value='Continue' onclick='window.location.href=window.location.href' /></div></div>");
	document.cookie = "warningView=1; "+expireDate+"path=/";
}

function vc()
{
	for(i=0;i<cj.length;i++)
	{
		var tCk = cj[i].indexOf("warningView");
		if(tCk == 0)
		{
			var vNE = cj[i].indexOf("=")+1;
			var vVl = cj[i].substr(vNE, cj[i].length);
			if(vVl == 1)
			{
				warnStatus = true;
			}
		}
	}
	if(warnStatus == false) {
		showWarning()
	}
}

window.onload = vc;