//advertising.com functions

function setCookie24(NameOfCookie, value, expirehours) {
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expirehours * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) + ((expirehours == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; path=/;" ;
}
 
function getCookie24(name) {
 var beg = document.cookie.indexOf(name+"=");
 var len = beg+name.length+1;
 var end = document.cookie.indexOf(";",len);
 if (end == -1){
  end = document.cookie.length;
 }
 return unescape(document.cookie.substring(len,end));
}
 
function openWin468(site){
 ACE_AR = {Site: site, Size: '468060'};
/*
 document.write('<SCR'+'IPT LANGUAGE="JavaScript" ');
 document.write('SRC="http://uac.advertising.com/wrapper/aceUAC.js">');
 document.write('</SCR'+'IPT>');
*/
}
function openWin160(site){
 ACE_AR = {Site: site, Size: '160600'};
/*
 document.write('<SCR'+'IPT LANGUAGE="JavaScript" ');
 document.write('SRC="http://uac.advertising.com/wrapper/aceUAC.js">');
 document.write('</SCR'+'IPT>');
*/
}
function openWin728(site){
 ACE_AR = {Site: site, Size: '728090'};
/*
 document.write('<SCR'+'IPT LANGUAGE="JavaScript" ');
 document.write('SRC="http://uac.advertising.com/wrapper/aceUAC.js">');
 document.write('</SCR'+'IPT>');
*/
}
 
//end advertising.com functions

//geo tenm
var cnnDEadDEonCookie=false;var alreadySwappedDETargetImage=false;var gdynDocDomain=gdyn_getTld(location.hostname);function gdyn_getTld(hostname){var data=hostname.split(".");if(data.length>=2){return(data[data.length-2]+"."+data[data.length-1]);}return(null);}function gdyn_readCookie(name){if(document.cookie==''){return false;}else{var firstChar,lastChar;var theBigCookie=document.cookie;firstChar=theBigCookie.indexOf(name);var NN2Hack=firstChar+name.length;if((firstChar!=-1)&&(theBigCookie.charAt(NN2Hack)=='=')){firstChar+=name.length+1;lastChar=theBigCookie.indexOf(';',firstChar);if(lastChar==-1)lastChar=theBigCookie.length;return unescape(theBigCookie.substring(firstChar,lastChar));}else{return false;}}}function gdyn_getDEAdHeadCookie(imageRef){if(typeof(gdyn_readCookie)!="undefined"){cnnDEadDEonCookie=gdyn_readCookie('adDEon');}var newSrc="http://gdyn."+gdyn_getTld(location.hostname)+"/1.1/1.gif?"+new Date().getTime();if(!alreadySwappedDETargetImage&&!cnnDEadDEonCookie){imageRef.src=newSrc;alreadySwappedDETargetImage=true;}}