{: NES 1.0 none :}
{: #
  -----------------------------------------------------------------------------
    
  Nes 1.03 by Skriptke
  Copyright 2009 - 2010 Enrique Castanon
  Licensed under the GNU GPL.

  Sample:
  http://nes.sourceforge.net/

  CPAN:
  http://search.cpan.org/dist/Nes/

  Repository:
  http://github.com/Skriptke/nes
   
  DOCUMENTATION:
  perldoc Nes::Obj::file_upload
 
  -----------------------------------------------------------------------------
:}
    <div id="fup_div_{: $ form_name :}" style="position: fixed; visibility: hidden; top:0px; left:0px; width:100%; height:100%;">
        <div style="position: absolute; top:0px; left:0px; width:100%; height:100%; background-color: #000; filter:alpha(opacity=60); -moz-opacity: 0.6; opacity: 0.6; -khtml-opacity: 0.6;">
        </div>
        <div style="position: absolute; top: 30%; height: auto; left: 35%; width: 28%; background-color: #b0b0b0; text-align: center; padding: 10px;" >
           {: $ p_loading,yes_html :}{: $ p_cancel,yes_html :}
        </div>
    </div>
    <script type="text/javascript">
        var first_time_{: $ form_name :} = 1;
        fup_cont_{: $ form_name :} = document.getElementById('fup_div_{: $ form_name :}').innerHTML;
        fup_{: $ form_name :} = document.getElementsByName('{: $ form_name :}')[0];
        previous_event_{: $ form_name :} = fup_{: $ form_name :}.onsubmit;
        fup_{: $ form_name :}.onsubmit = set_loadind_{: $ form_name :};
        function set_loadind_{: $ form_name :}() {
            if (previous_event_{: $ form_name :} != 'undefined' && previous_event_{: $ form_name :}) {
                if (!previous_event_{: $ form_name :}()) {return false}
            }
            fup_form_{: $ form_name :} = this;
            if ({: @ (uploads) !fup_form_{: $ form_name :}.{: @$ uploads.field_name :}.value &&:} 1) {return true;} 
            if (first_time_{: $ form_name :} == 0) { return true };
            first_time_{: $ form_name :} = 0;
            setTimeout("loading_{: $ form_name :}();fup_form_{: $ form_name :}.submit()", 500);
            return false;
        }
        function loading_{: $ form_name :}() {
            document.getElementById('fup_div_{: $ form_name :}').style.visibility = 'visible';
            document.getElementById('fup_div_{: $ form_name :}').innerHTML = fup_cont_{: $ form_name :};
        }
    </script>    