function storeEDID() {
                var thirtyDays = (60*60*1000*24)*30
                var vals = document.location.search
                start = vals.indexOf("EDID=")
                if (start != -1) {
                   var end = vals.indexOf("&", start)
                   if (end == -1){ end = vals.length }
    var date = new Date();date.setTime(date.getTime()+ thirtyDays)
                document.cookie= vals.substring(start,end) + "; expires=" + date.toGMTString() + "; path=/"
                }
}
function getEDID(){
   var n = "EDID="
   var cookies = document.cookie
   var start = cookies.indexOf(n)
   if (start == -1){ return null; }
   start += n.length 
   var end = cookies.indexOf(";", start)
   if (end == -1){ end = cookies.length }
   return cookies.substring(start, end)
   }
function trackEDID(i){f=getEDID();if (f != null) {document.write('<img src="https://pd.ed10.net/p/0G/40FX2YN/IY?EDID='+f+'&'+i+'" height=1 width=1>');}}
//-->


redirectURL();

function redirectURL(){
	var url = getURLParameter('promoURL');
	if(!isUndefined(url)){
		showSearchWaitPage();
		window.location = unescape(url);
	}
}


function getURLParameter(varName){
  varName = varName.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+varName+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  
  if( results == null ){
  	return null;
  }else{
 	 return results[1];
  }
}

function isUndefined(elem){
	if(typeof(elem) !== 'undefined' && elem != null) {
		return false;
	} else {
		return true;
	}
}