  // Mosaic JavaScript Library Container.

  var MosaicLib = function() {
    
    this.Confirm = function(cnf) {
      if (cnf == null) cnf = "Czy kontynuować?";
      return window.confirm(cnf);
    }
    
    this.DisplayWindow = function(url, w, h) {
      l = parseInt(screen.width / 2);
      t = parseInt(screen.height / 2);
        
      w = w + 20;
      h = h + 20;
        
      l = l - parseInt(w / 2);
      t = t - parseInt(h / 2);
      
      var number = Math.random();
      number = 1000 * number;
      var winID = Math.round(number);
      attr = "width=" + w + ",height=" + h + ",left=" + l + ",top=" + t;
      
      var win = window.open(url, winID, attr);
      win.focus();
    }
    
    
    this.Trim = function(strNapis) {
      var n = strNapis.length;
      var i = 0;
      var bufor = "";
      if (strNapis != "") {
        while (strNapis.charAt(i) == " ") i++;
        while (strNapis.charAt(i) != " " && (i < n)) {
          bufor += strNapis.charAt(i);
          i++;
        }
        return bufor;
      }
      else {
        return strNapis;
      }
    }
    
    
  };
  
