var Blocked = new Array(); Blocked[1234] = true; Blocked[1252] = true; var AID=0, CID=0, hash = window.location.hash; if (hash.charAt(0) == "#") { var hashInfo = hash.substr(1).split(":"); var aidStr = hashInfo.length > 0 ? hashInfo[0]:"0"; var cidStr = hashInfo.length > 1 ? hashInfo[1]:"0"; var regStr = /[A-Z][A-Z]+-[0-9]+/; if (regStr.test(aidStr)) AID = parseInt(aidStr.substr(3), 10) + 10000000; else AID = parseInt(aidStr, 10); if (isNaN(AID)) AID = 0; CID = parseInt(cidStr, 10); if (isNaN(CID)) CID = 0; } if (AID > 0) { if (typeof(Blocked[AID]) != "undefined") window.location.href = "//www.NewEraMediaworks.com/site/blocked.asp?AID="+AID; var nem_exp = new Date(); //set new date object nem_exp.setTime(nem_exp.getTime() + (1000 * 60 * 60 * 24 * 30)); //set it 30 days ahead function nem_setCookie(name, value, expires) { document.cookie = name + "=" + String(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString()); } var CookieVal = String(AID) + ":" + String(CID); CookieVal += '|' + escape(""); nem_setCookie("NEMAID",CookieVal,nem_exp); }