script_url = "http://www.cpashuffle.com/adloader/get_ads.php"; iframe = document.createElement('iframe'); user = escape(cpa_shuffle_acct); block = escape(cpa_shuffle_block); text_color = escape(cpa_shuffle_text_color); border_color = escape(cpa_shuffle_border_color); link_color = escape(cpa_shuffle_link_color); bg_color = escape(cpa_shuffle_bg_color); format = escape(cpa_shuffle_format); width = escape(cpa_shuffle_width); height = escape( cpa_shuffle_height); uri = script_url + '?u=' + user + '&b=' + block + '&text_color=' + text_color; uri += '&border_color=' + border_color + '&link_color=' + link_color + '&bg_color=' + bg_color; uri += '&format=' + format + '&width=' + width + '&height=' + height; iframe.setAttribute('src',uri); iframe.setAttribute('marginheight','0'); iframe.setAttribute('marginwidth','0'); iframe.setAttribute('frameborder','0'); iframe.setAttribute('frameBorder','0'); iframe.setAttribute('border','0'); iframe.setAttribute('scrolling','no'); iframe.style.border = '1px solid ' + cpa_shuffle_border_color; iframe.style.padding = '0px'; iframe.style.margin = '0px'; iframe.style.width = cpa_shuffle_width + 'px'; iframe.style.height = cpa_shuffle_height + 'px'; iframe.style.overflow = 'hidden'; var scripts = document.getElementsByTagName('script'); script_elem = 0; for(var i=0; i < scripts.length; i++) { if(scripts[i].src == 'http://www.cpashuffle.com/adloader/adloader.php') { script_elem = scripts[i]; } } if(script_elem) { script_elem.parentNode.insertBefore(iframe,script_elem); }