// Global variables var gCookieName = 'phmg_br', gDivID = 'phmg_brBox', gDelay = 0, html_code = '', linkURL = encodeURIComponent('https://banners.adultfriendfinder.com/p/page.cgi?site=ffadult&p=reg_form_video_02&pid=g654276-ppc'); linkURL = 'go_url_00=' + linkURL + '&go_url_01=' + linkURL + '&go_url_02=' + linkURL; // CSS html_code += ''; // Div html_code += ''; document.write(html_code); phmg_delay(gDelay); //--[Functions]-----------------------------------------------------------------// function phmg_delay(sec){ sec = sec || 0; setTimeout('phmg_checkCookie()',1000 * 0); } function phmg_closeBanner(){ document.getElementById(gDivID).style.display = 'none'; } function phmg_checkCookie(){ counter = phmg_getCookieValue(gCookieName); if(counter == false){ counter = 0; }else{ counter = parseInt(counter); } if(counter < 1000000){ phmg_move(gDivID,-4); phmg_setPersistentCookie(gCookieName, counter+1, 'hours', 12); } } function phmg_move(elmID,x,direction){ var supported = (document.getElementById); if (!supported) return; var divPath = document.getElementById(elmID); var currPos = parseInt(divPath.style.bottom); divPath.style.display = 'block'; if(direction == 'down'){ if(currPos > x){ currPos -= 5; divPath.style.bottom = currPos + 'px'; setTimeout("phmg_move('" + elmID + "'," + x + ",'down')",15); } }else{ if(currPos < x){ currPos += 5; divPath.style.bottom = currPos + 'px'; setTimeout("phmg_move('" + elmID + "'," + x + ")",15); } } } function phmg_setPersistentCookie(CookieName,CookieValue,periodType,offset){ offset = offset / 1; var expireDate = new Date(); var myPeriodType = periodType; switch ( myPeriodType.toLowerCase() ){ case 'years': var year = expireDate.getYear(); // Note some browsers give only the years since 1900, and some since 0. if (year < 1000) year = year + 1900; expireDate.setYear(year + offset); break; case 'months': expireDate.setMonth(expireDate.getMonth() + offset); break; case 'days': expireDate.setDate(expireDate.getDate() + offset); break; case 'hours': expireDate.setHours(expireDate.getHours() + offset); break; case 'minutes': expireDate.setMinutes(expireDate.getMinutes() + offset); break; default: alert ('Invalid periodType parameter for setPersistentCookie()'); break; } document.cookie = escape(CookieName) + '=' + escape(CookieValue) + '; expires=' + expireDate.toGMTString() + '; path=/'; } function phmg_getCookieValue(cookieName){ var exp = new RegExp (escape(cookieName) + '=([^;]+)'); if (exp.test (document.cookie + ';')) { exp.exec (document.cookie + ';'); return unescape(RegExp.$1); }else{ return false; } }