  function openWin(url, width, height, win_name) {
    bName = navigator.appName;
    var new_url="";
    if(bName=="Microsoft Internet Explorer") {
      for(var i=0; i<url.length; i++) {
        var c=url.charAt(i);
        if(c=='%') {
          i += 1;
          var d = url.charAt(i);
          new_url += "%25" + d;
        } else {
          new_url += c;
        }
      }
    } else {
      new_url=url;
    }
    if(win_name==null)
    {
       win_name = "newPopupWindow";
    }
    varn = open(new_url, win_name, "resizable=yes,toolbar=0,scrollbars=yes,directories=0,status=0,menubar=0,width=" + width + ",height=" + height);
  }

  function strtrim(str) {
    if (str !=  null) {
      return str.replace(/^\s+/,'').replace(/\s+$/,'');
    }
  }

  function isEmptyString(s) {
    return (s == null || /^ *$/.test(s));
  }

  function decodeHtml(str)
  {
    str = str + "";
    str = str.replace(/&quot;/g,'"');
    return str;
  }