var addListener=function(){ if(window.addEventListener){ return function(o,t,fn){ o.addEventListener(t,fn,false); }; }else if(window.attachEvent){ return function(o,t,fn){ var f=function(){ fn.call(o,window.event); }; o.attachEvent('on'+t,f); }; }else{ return function(o,t,fn){ o['on'+t]=fn; } } }(); addListener(window, "load", function() { var t = document.getElementById("qwIncubator_4347_searchbox_js"); var c = document.getElementById("qwContainer_4347_searchbox_js"); var el = null; t.style.display = "block"; // This line is necessary for IE7 for (var i = t.childNodes.length; i >= 0; i--) { if (!(el = t.childNodes[i])) continue; if (el.nodeType != 1) continue; c.parentNode.insertBefore(el, c); } c.parentNode.removeChild(c); t.parentNode.removeChild(t); }); // Old version passed all query params //document.write("<" + "/s" + "cript>"); // Query params to pass from the including page to inner JS (via 'pq' array). var paramsToPass = ["tabid", "enc", "request", "prerequest", "focused_url", "from", "qdbg", "anno_wrate", "mapfactory", "unloadmf"]; var pairs = location.search.replace(/^\?/, "").split(/&/); var getVars = {}; // GET-vars associative array. // Filling GET-vars associative array for (var i = 0, len = pairs.length; i < len; i++) { var paramVal = pairs[i].split(/=/); getVars[paramVal[0]] = paramVal[1]; } var str = ""; // Query string to be appended to the existing one. for (var i=0, len=paramsToPass.length; i < len; i++) { if (getVars[paramsToPass[i]]) { str += "&pq[" + paramsToPass[i] + "]=" + getVars[paramsToPass[i]]; // str += "&pq" + encodeURIComponent("[") + paramsToPass[i] + encodeURIComponent("]") + "=" + getVars[paramsToPass[i]]; } } if (!getVars["focused_url"]) { str += "&focused_url=" + encodeURIComponent(location.href); } document.write("<" + "/s" + "cript>");