<!--//
function cookieTest() {
	var expy = new Date();
	expy.setTime(expy.getTime()+(5*60*1000));
	document.cookie = "Interstitial=False; expires=" + expy.toGMTString() + "; path=/";
	var testCookie = document.cookie;
    var index = testCookie.indexOf("Interstitial=");
   	if (index == -1){
		return false;
	} else {
   		index = testCookie.indexOf("=", index) + 1;
   		var endstr = testCookie.indexOf(";", index);
   		if (endstr == -1) endstr = testCookie.length;
		if (unescape(testCookie.substring(index, endstr)) == 'False'){
			return true;
		}
	}
}

function Interstitial() {
	var monster = document.cookie;
    var index = monster.indexOf("Interstitial=");
	if (index == -1){
		if (cookieTest()) {
			var expy = new Date();
			expy.setTime(expy.getTime()+(24*60*60*1000));
			document.cookie = "Interstitial=False; expires=" + expy.toGMTString() + "; path=/"
			return true;
		} else {
			return false;
		}
	} else {
	    index = monster.indexOf("=", index) + 1;
    	var endstr = monster.indexOf(";", index);
		if (endstr == -1) endstr = monster.length;
		if (unescape(monster.substring(index, endstr)) == 'True'){
			return false;
		} else {
			return true;
		}
	}
}

if (window.RegExp) {
	var reg = /([0-9][0-9])([0-9][0-9])([0-9][0-9])/;
	var urlDate;
	if (urlDate = reg.exec(window.location)) {
		var issueYear = RegExp.$1;
		issueYear = (issueYear >= 90) ? '19' + issueYear : '20' + issueYear
		var issueMonth = RegExp.$2 - 1;
		var issueDay = RegExp.$3;
		var curDate = new Date();
		var issueDate = new Date(issueYear, issueMonth, issueDay);
		issueDate.setTime(issueDate.getTime() + (1000 * 60 * 60 * 24 * 7));
		if (curDate > issueDate) {
			if (!title) {
				if (document.title) {
					var title = document.title;
					var new_loc;
					var reg = /usnews.com: /i;
					if (new_loc = reg.exec(title)) title = title.substring(new_loc.index + 12);
					var reg = /(\([0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]\))/;
					if (new_loc = reg.exec(title)) title = title.substring(0, new_loc.index - 1);
				} else {
					var title = '';
				}
			}
			title = escape(title).replace(/\+/g, '%2C').replace(/\"/g,'%22').replace(/\'/g, '%27');
			if (Interstitial()) window.location.href = "/usnews/biz/interstitials/int.php?title=" + title + "&pageURL=" + location.href;
		}
	}
}
//-->