 function remoteJson(listener) {
       if (listener && listener.uri) { // create dynamic script element. 
          script = document.getElementById("remotejson");
          if (script) // script element may exist from previous call, so ..
             script.parentNode.removeChild(script);  // .. delete it.
          script = document.createElement("script"); // new script element.
          script.setAttribute("type", "text/javascript");
          script.setAttribute("id", "remotejson");
          script.setAttribute("src", listener.uri);
          document.getElementsByTagName("head")[0].appendChild(script);
       }
       if (listener && listener.condition && listener.callback)
          var timer = setInterval(function(){
                                     if (eval(listener.condition)) {
                                         clearInterval(timer);
                                         listener.callback(listener.target);
                                     }
                                  }, 500);
    }
    
    function replace(string,text,by) {
        var strLength = string.length, txtLength = text.length;
        if ((strLength == 0) || (txtLength == 0)) return string;
        var i = string.indexOf(text);
        if ((!i) && (text != string.substring(0,txtLength))) return string;
        if (i == -1) return string;
        var newstr = string.substring(0,i) + by;
        if (i+txtLength < strLength)
        newstr += replace(string.substring(i+txtLength,strLength),text,by);
        return newstr;
    }
    
    function rpl(strRpl)
    {
        var output = "";
        
        output = replace(strRpl,"\n","")
        return replace(output,"\r","")
               
    }
    
    function setHtml(htmlbuon)
    {         
        htmlbuon = rpl(htmlbuon); 
                           
        document.getElementById('vcm_tagsNews').innerHTML = htmlbuon;
        //$('#boy').html(htmlbuon); 
    }
    
    function getDataWrapper(keyword) {     
        remoteJson({"uri": "http://k14.8x01.vn/Default.aspx?callback=f&param=" + encodeURIComponent(keyword)})     
    }
