
   function rescale_the_window(width, height) { // when calling, try to use this.width, this.height
      var wc, hc;
      var iw, ih;
      wc = 0;
      hc = 0;
      iw = width;
      ih = height;
      if (this.innerWidth) {
         wc = this.outerWidth - this.innerWidth;
	 hc = this.outerHeight - this.innerHeight;
      } else {
	 if (document.body.clientWidth != null) {
            this.resizeTo(iw, ih);
	    wc = iw - document.body.clientWidth;
	    hc = ih - document.body.clientHeight;
	 } else {
            wc = 12;
            hc = 30;
	 }
	 
      }
      this.resizeTo(iw + wc, ih + hc);
   }
   
   function open_popup(link, name, width, height, top) {
      if (name == undefined) {
         name = '';
      }
      if (width == undefined) {
         width = 800;
      }
      if (height == undefined) {
         height = 600;
      }
      if (top == undefined) {
         top = 100;
      }
      window.open(link, name, 'width='+width+',height='+height+',resizable=yes,scrollbars=no,status=no,top='+top);
   }



