var UID,NF=0,cx=0;

function generateVSID() {
    return Math.round(10000*Math.random())+'0'+Math.round(10000*Math.random());
}

function StartUploadFile() {
    NF=0;
    for (var i=0;i<$('file_upload_form').length;i++)
      {
        current = $('file_upload_form').elements[i];
        if (current.type=='file' && current.value!='') NF++;
      }
    if(NF==0){alert('Выберите файл!');return false;};
    $('file_upload_id').value = generateVSID();
    $('file_upload_form').action = "http://upload.webfile.ru/perl?upload_id=" + $('file_upload_id').value;
    $('meter').src = 'http://upload.webfile.ru/perls?upload_id='+$('file_upload_id').value;
}


