You are on page 1of 1

/* All portions of this software are copyright (c) 2003-2006 Right Media*/var rm _ban_flash=0;var rm_url="";var rm_pop_frequency=0;var rm_pop_id=0;var rm_pop_tim

es=0;var rm_pop_nofreqcap=0;var rm_passback=0;var rm_tag_type="";rm_tag_type = " ad"; rm_url = "http://ad.adserverplus.com/imp?Age=INSERT%5fAGE%5fVALUE%5fHERE&Ge nder=INSERT%5fGENDER%5fVALUE%5fHERE&Z=160x600&s=2332092&_salt=279790899";var RM_ POP_COOKIE_NAME='ym_pop_freq';var RM_INT_COOKIE_NAME='ym_int_freq';if(!window.rm _crex_data){rm_crex_data=new Array();}if(rm_passback==0){rm_pb_data=new Array(); if(rm_crex_data.length>0){rm_url+="&X=";for(var i=0;i<rm_crex_data.length;i++){r m_url+=rm_crex_data[i];if(i!=rm_crex_data.length-1){rm_url+=",";}}}}else{rm_pb_d ata.push(rm_crex_data.pop());rm_url+="&X=";for(var i=0;i<rm_pb_data.length;i++){ rm_url+=rm_pb_data[i];if(i!=rm_pb_data.length-1){rm_url+=",";}}rm_url+="&Y=pb";} var flash=new Object();flash=flashDetection();if(cookiesEnabled()){rm_url+=(flas h.installed?"&B=10":"&B=12");}else{rm_url+=(flash.installed?"&B=11":"&B=13");}if (!flash.installed||rm_ban_flash==1){rm_url+="&m=2";}if((rm_url.indexOf("&u=${PUB _URL}")>=0)||rm_url.indexOf("&u=")==-1){var url='';try{if(rm_tag_type=="ad"){if( top==self){url=encodeURIComponent(top.location.href);url=url.substr(0,256);rm_ur l+="&u="+url;}}else if(rm_tag_type=="iframe"){url=encodeURIComponent(document.re ferrer);url=url.substr(0,256);rm_url+="&u="+url;}}catch(e){}}if(top==self){rm_ur l+="&r=1";}else{rm_url+="&r=0";}var rm_tag_src='<SCRIPT TYPE="text/javascript" S RC="'+rm_url+'"><\/SCRIPT>';if(rm_pop_frequency){if(rmCanShowPop(rm_pop_id,rm_po p_times,rm_pop_frequency)||rm_pop_nofreqcap){document.write(rm_tag_src);}}else{d ocument.write(rm_tag_src);}function cookiesEnabled(){var cookieEnabled=(navigato r.cookieEnabled)?true:false;if(typeof navigator.cookieEnabled=="undefined"&&!coo kieEnabled){document.cookie="testcookie";cookieEnabled=(document.cookie.indexOf( "testcookie")!=-1)?true:false;}return cookieEnabled;}function rmGetCookie(Name){ var search=Name+"=";var CookieString=document.cookie;var result=null;if(CookieSt ring.length>0){offset=CookieString.indexOf(search);if(offset!=-1){offset+=search .length;end=CookieString.indexOf(";",offset);if(end==-1){end=CookieString.length ;}result=unescape(CookieString.substring(offset,end));}}return result;}function flashDetection(){var flash=new Object();flash.installed=false;flash.version='0.0 ';if(navigator.plugins&&navigator.plugins.length){for(x=0;x<navigator.plugins.le ngth;x++){if(navigator.plugins[x].name.indexOf('Shockwave Flash')!=-1){flash.ver sion=navigator.plugins[x].description.split('Shockwave Flash ')[1];flash.install ed=true;break;}}}else if(window.ActiveXObject){for(x=2;x<10;x++){try{oFlash=eval ("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+x+"');");if(oFlash){flash.i nstalled=true;flash.version=x+'.0';}}catch(e){}}}return flash;}function rmReplac e(myString,toReplace,replaceBy){return(myString.replace(new RegExp(toReplace,'gi '),replaceBy));}function writeCookie(ckName,ckVal){var numdays=14;var today=new Date();var expires=new Date();expires.setTime(today.getTime()+(1000*60*60*24*num days));var cookieText=ckName+"="+ckVal+";expires="+expires.toGMTString()+";path= /;";document.cookie=cookieText;return null;}function rmCanShowPop(rm_pop_id,pop_ times,pop_frequency){var countCookieName=RM_POP_COOKIE_NAME+rm_pop_id;var expire CookieName=RM_POP_COOKIE_NAME+"_expiration"+rm_pop_id;var shownTimes=rmGetCookie (countCookieName);if(shownTimes==null){rmWriteExpirationCookie(expireCookieName, pop_frequency);shownTimes=0;}else{shownTimes=Number(shownTimes);}if(shownTimes<p op_times){shownTimes=1+shownTimes;var expiration=rmGetCookie(expireCookieName);r mWritePopFrequencyCookie(rm_pop_id,shownTimes,expiration);return_value=true;}els e{return_value=false;}return return_value;}function rmWritePopFrequencyCookie(rm _pop_id,shownTimes,expiration){var cookieName=RM_POP_COOKIE_NAME+rm_pop_id;var c ookieText=cookieName+"="+shownTimes+";"+"expires="+expiration+";path=/;";documen t.cookie=cookieText;}function rmWriteExpirationCookie(cookieName,frequency){var today=new Date();var expires=new Date();expires.setTime(today.getTime()+(1000*fr equency));var cookieText=cookieName+"="+expires.toGMTString()+";"+"expires="+exp ires.toGMTString()+";path=/;";document.cookie=cookieText;}

You might also like