      function CenterIf()
      {
        var col = Form.getInputs("uploadForm", "file", "file[]" );
        var yesCenter = false;
        for ( var i=0;i<col.length;i++ )
            if ( col[i].value.trim() != "" )
            {
                col[i].style.display='block';
                yesCenter = true;
                break;
            }
        if ( yesCenter )
            Center();
      }
      
      function Init2()
      {
      var f = Form.getInputs("uploadForm", "file", "file[]")[0];
      f.onchange = Fmn.FileSet.bind( Fmn, f );
      f.onmousedown = Fmn.MouseUpDown.bind( Fmn, "inset" );
      f.onmouseup = Fmn.MouseUpDown.bind( Fmn, "outset" );
      var login = $("LoginLink");
      if ( login )
      login.onclick = Fmn.Login.bind( Fmn, "Login", CenterIf );
      $("Sub").onclick = Fmn.Login.bind( Fmn, "SelectPrinter", CenterIf );
      window.onresize = function()
      {
        ResizeContainer();
      var grd = $("grid");
      var grd2 = $("GridBox");
      var GridBox = grd2;
      var bottom = $("Bottom");
      var gbw = GridBox.clientWidth ? GridBox.clientWidth-8 : GridBox.offsetWidth-8;
      if ( document.body.offsetWidth > document.documentElement.offsetWidth )
        gbw = document.documentElement.offsetWidth-8;
      grd.style.width = gbw+'px';
      gbw = (bottom.offsetTop-grd2.offsetTop-33);
      if (gbw < 0 )
        gbw = 10; 
      grd.style.height = gbw+'px';
      return true;
      }
        /*
		if ( navigator.userAgent.indexOf("Safari") != -1 )
		{
		  window.resizeBy( -5, -5 ) ;
		  window.resizeBy( 5, 5 ) ;
		}
		else
		*/
	      window.onresize();
      }
