var DL_noiframe = (self == top); var DL_params = '&type=d_layer&survey_num=178518&site=2&code=184831&survey_server=survey.questionmarket.com&dl_logo=&dl_invite=&dl_autoskip=&img=http://amch.questionmarket.com/static/wsj-240x264-1l-eng-nul-v2.gif&delay=0&go_delay=20000&hide_selects=1&hide_objects=1&use_brand=0&content_width=0&side=top&space=near&spacecoord=50&endpos=coord&end=near&endcoord=50&speed=5'; if (!DL_noiframe) { // for testing purposes: send another request if we're in two or more nested iframes if (parent != top) { var DL_element = document.createElement('iframe'); DL_element.width=0; DL_element.height=0; DL_element.src="http://amch.questionmarket.com/adscgen/log_error.php?errcode=1&details="+ (escape("d178518/2/184831")); document.getElementsByTagName('body').item(0).appendChild(DL_element); } var strIframeLocation = "public/slider/GateFile.html"; // Is public/slider/GateFile.html a directory or a complete filename? if (strIframeLocation.substr(-1) == '/' || strIframeLocation.indexOf(".") == -1) strIframeLocation += "/GateFile.html"; strIframeLocation += "?sub=amch"; function ebGetHostName(a) { var i; var host = ''; if ((a.length >= 7) && (a.substr(0,7) == "http://")) { host = a.substr(7); } else { if ((a.length >= 8) && (a.substr(0,8) == "https://")) { host = a.substr(8); } else { host=a; } } i=host.indexOf("/"); if (i>0) { host = host.substr(0,i); } return(host); } if (strIframeLocation.substr(0,4) != "http") { host = document.referrer != '' ? document.referrer : document.location.href; var siteHost = ebGetHostName(host); strIframeLocation = "http://" + siteHost + "/" + strIframeLocation; } // Make sure it's not on Yahoo. They never use the Gatefile, and do not want // erroneous requests to it in their logs, as can happen if the campaign is // configured incorrectly. if (strIframeLocation.toLowerCase().indexOf('yahoo.com') == -1) { var DL_element = document.createElement('iframe'); DL_element.frameborder=0; DL_element.width=0; DL_element.height=0; DL_element.src=strIframeLocation+DL_params; DL_element.setAttribute('style', 'display:none'); document.getElementsByTagName('body').item(0).appendChild(DL_element); } } else { var DL_element = document.createElement('script'); DL_element.language="javascript"; DL_element.src="http://amch.questionmarket.com/adscgen/dynamiclink.js.php?sub=amch"+DL_params+"&noiframe=true&onload=1"; document.getElementsByTagName('head').item(0).appendChild(DL_element); }