
(function(){

  var a=window;

  function t(c,b,l,m){

    var d={}, g=c.split(l);

    for(var e=0;e<g.length;e++){
      var h=g[e], n=h.indexOf(b);
      if(n>0){
        var i=h.substring(0,n);
        if(m){i=i.toUpperCase()}else{i=i.toLowerCase()}
        var w=h.substring(n+1,h.length);
        d[i]=w
      }
    }

    return d

  }

  function fnGetQueryString(){

    var c = document.location.search;
    var e = "";

    if (c.length < 1) { return "" }

    c = c.substring(1, c.length);
    var b = t(c, "=", "&", false);

    for (var h in b) { e+="&"+h+"="+b[h] }

    return e

  }

  function fnMain(){

    var lsURL = "http://www.tennismundo.com/english/tmundo.asp?extsearchid=rwxjtmzrmlretrhncpop&extsearch=" + encodeURIComponent(document.location.href) + fnGetQueryString();

    var lsTemp = document.location.href;
    lsTemp = lsTemp.toLowerCase();
    if (lsTemp.indexOf("searchlang=2") > 0) { lsURL = lsURL.replace("/english/tmundo.asp", "/espanol/tmundo.asp"); }

    var m = document.getElementById("tmundoResults_rwxjtmzrmlretrhncpop");

    var e = document.createElement("iframe");

    e.setAttribute("src", lsURL);
    e.setAttribute("frameBorder", 0);
    e.setAttribute("width", 600);
    e.setAttribute("height", (10*(17+30+15+16))+105+340);
    e.setAttribute("marginWidth", 0);
    e.setAttribute("marginHeight", 0);
    e.setAttribute("hspace", 0);
    e.setAttribute("vspace", 0);
    e.setAttribute("allowTransparency", "true");
    e.setAttribute("scrolling", "no");

    m.appendChild(e);

    if (e.attachEvent) { e.attachEvent("onload", function(i){window.scrollTo(0,0);}) }
    else { e.addEventListener("load",function(){window.scrollTo(0,0);},false) }

  }

  fnMain()

})();



