var consoleLog = function (obj) { if (popup.verbose && typeof console != 'undefined') { //console.log(obj) console.info(obj) } } // BANNER CLASS DEFINING function MooterBanner(id) { // BANNER PARAMETERS this.terms = window.mooter_terms? window.mooter_terms: '' this.affiliate = encodeURIComponent(window.mooter_affiliate) this.sub = encodeURIComponent(window.mooter_sub) this.uid = window.mooter_uid this.IP = window.mooter_IP this.w = window.mooter_ad_format == 1? 728: window.mooter_width this.h = window.mooter_ad_format == 1? 90: window.mooter_height this.banner = window.mooter_banner this.num_to_show = window.mooter_ad_format == 1? 4: window.mooter_num_to_show this.page = window.mooter_page? window.mooter_page: 1 this.background = window.mooter_background this.border = window.mooter_border this.title = window.mooter_title this.desc = window.mooter_desc this.dispurl = window.mooter_display_url this.google_format = window.mooter_ad_format this.mooter_url = encodeURIComponent(window.mooter_wrapper_url) this.target = window.mooter_target this.graph = window.mooter_graph this.id = 'mooter-iframe-' + Math.round(Math.random() * 1000000) this.IP = (matches = document.location.toString().match(/[?&]IP=([0-9.]*)/))? matches.pop(): '' this.verbose = (matches = document.location.toString().match(/[?&]verbose=([0-9]*)/))? matches.pop(): 0 // BANNER PARAMETERS try { this.params = { terms: this.terms, affiliate: this.affiliate, sub: this.sub, uid: this.uid, IP: this.IP, w: this.w, h: this.h, banner: this.banner, num_to_show: this.num_to_show, page: this.page, background: this.background, border: this.border, title: this.title, desc: this.desc, dispurl: this.dispurl, google_format: this.google_format, mooter_url: this.mooter_url, target: this.target, url: encodeURIComponent(parent.location), graph: this.graph } } catch (exeption) { this.params = { terms: this.terms, affiliate: this.affiliate, sub: this.sub, uid: this.uid, IP: this.IP, w: this.w, h: this.h, banner: this.banner, num_to_show: this.num_to_show, page: this.page, background: this.background, border: this.border, title: this.title, desc: this.desc, dispurl: this.dispurl, google_format: this.google_format, mooter_url: this.mooter_url, target: this.target, url: encodeURIComponent(document.location), graph: this.graph } } document.write('') //document.write('') //document.write('') this.onDOMReady = function (fn, ctx) { var ready, timer var onChange = function (e) { if (e && e.type == "DOMContentLoaded"){ fireDOMReady() } else if (e && e.type == "load"){ fireDOMReady() } else if (document.readyState){ if ((/loaded|complete/).test(document.readyState)){ fireDOMReady() } else if (!!document.documentElement.doScroll){ try { ready || document.documentElement.doScroll('left') } catch(e) { return } fireDOMReady() } } } var fireDOMReady = function () { if (!ready) { ready = true fn.call(ctx || window) if (document.removeEventListener) { document.removeEventListener("DOMContentLoaded", onChange, false) } document.onreadystatechange = null window.onload = null clearInterval(timer) timer = null } } if (document.addEventListener) { document.addEventListener("DOMContentLoaded", onChange, false) } document.onreadystatechange = onChange timer = setInterval(onChange, 5) window.onload = onChange } this.load = function () { var params = '' for (var key in this.params) { if (this.params[key]) { params += '&' + key + "=" + this.params[key] } } var container = document.getElementById(this.id) var src = 'http://38.101.43.2/fiqads.php?id=' + this.id + '&tstamp=' + (new Date()).getTime() + '&' + params this.verbose? consoleLog(src): 0 this.verbose? consoleLog(container): 0 this.verbose? consoleLog(container.src): 0 container.src = src } } var mooterBanner = new MooterBanner() if (typeof run_method != 'undefined' && run_method == 'preload') { mooterBanner.load() } else { if (typeof mooterBanners == 'undefined') { var mooterBanners = new Array() mooterBanner.onDOMReady(function() { while (mooterBanners.length > 0) { var mooterBanner = mooterBanners.pop() mooterBanner.load() } }) } mooterBanners.push(mooterBanner) }