jQuery.noConflict();
// make the updater var so we can stop it.
var updater ;

// set up the upload callback function so we have something to do when we finish
var fN = function callBack(o) {
 // set the result div to the response text ( i don't really like yui - i imagine i would if i used it more)
 $('result').innerHTML=''+o.responseText+'';
 // stop the updater on success
 updater.stop();
 // disappear the progress bar
 Toggle.display('progress');
}
var callback = { success:fN, upload:fN }

// the function that is posts the upload form. ASYNCHRONOUSLY. WTF. oh yea. iframes. whew.
function postForm(target,formName,up) {
jQuery("#uploadformdiv").hide();
  // kill the insides of the progress div, so that remenants of the previous upload are not there
  $('progress').innerHTML='';
  // kill the insides of the results div, so that remenants of the previous upload are not there
  $('result').innerHTML='';
  // show the progress div
  Toggle.display('progress');
  updater = new Ajax.PeriodicalUpdater('progress', '/progress', {asynchronous:true, frequency:2,postBody:"id="+jQuery("#uploadid").attr('value')});
  YAHOO.util.Connect.setForm(formName,up);
  YAHOO.util.Connect.asyncRequest('POST',target,callback);
}

jQuery(document).ready(function()
{
    jQuery("#passworddiv").hide();
    jQuery("#showpassword").click(function ()
    {
        jQuery("#passworddiv").show();
        jQuery("#showpassworddiv").hide();
    });
});
function getfile(hash)
{
    window.location.href='/getfile/'+jQuery("#fileid").attr('value')+'/'+hash+'/'+jQuery("#password").attr('value');
};