/*
Name:  forbi_js.js
Typ:   Javascript
URL:   www.forbi.net
Datum: 27.11.2009
*/

// Suchfeld beim reinklicken leeren:
var click = 0;
function emptyField () {
     if (click==0) document.getElementById("suchformf3b462d93b24cb0538f5d864546bc3e0").value = "";
     click++;
}

// Bilder vorladen
var path = 'fileadmin/templates/forbi/layout_musik/';
var pics = new Array();
pics[0] = 'knob.gif';
pics[1] = 'knob_over.gif';
pics[2] = 'knob_full.gif';

for(z=0; z<pics.length; z++) {
     var bild = new Image();
     bild.src = path+pics[z];
}

/* ### Upload functions ### */

// show load message
function showLoad() {
     var msg = 'Datei wird hochgeladen, bitte warten...';
     var obj = document.getElementById('msg');
     obj.innerHTML = msg;
     obj.className = 'upload_info';
     return true;
}

function delete_confirm(file) {
     answer = window.confirm("Wollen Sie die Datei entfernen?");
     if(answer) {
          document.filedown.act.value = 'del';
          document.filedown.fil.value = file;
          document.filedown.submit();
     }
     return answer;
}

function do_download(file) {
     window.open('','dwn','width=1,height=1');
     document.filedown.act.value = 'dnl';
     document.filedown.fil.value = file;
     document.filedown.target = 'dwn';
     document.filedown.action = 'fileadmin/templates/forbi/scripts/file_upload.php';
     document.filedown.submit();
     return true;
}

