function getFiles(){
  new Ajax.Updater('files', 'client_files_list.tpl.php', {
    method: 'get', frequency: 1, decay: 2
 });

}

function newUpload(){
/*  new Ajax.Updater('ajax_form', 'client_files_form.tpl.php?id_form=<?php echo FileUploader::ID_KEY ?>', {
    method: 'get', frequency: 1, decay: 2,
     onSuccess: function (){alert('avant');new FileUploader('theForm', 'status');alert('ok')}
 });*/
}


function initPage(e)
{
  if ($('errorFlash'))
  {
    new Effect.Pulsate($('errorFlash'));
  }

  if ($('input'))
  {
    init();
  }


   if($('error')){
      new Effect.Pulsate('error');
   }
   if($('warning')){
      new Effect.Highlight('warning');
   }
   if($('message')){
      new Effect.Highlight('message');
   }
   if($('error-msg')){
      new Effect.Pulsate('error-msg');
   }
   if($('success-msg')){
      new Effect.Pulsate('success-msg');
   }

}

  Event.observe(window, 'load', function() {
      initPage();
      if($('theForm')){
        //new FileUploader('theForm', 'status');
        new getFiles();
      }

      
     //new newUpload();

//      new FileUploader('theForm', 'status');
//      new getFiles();
  });


 

