
function del_this(db, id, ps, ciraliID) {
    if (ciraliID == undefined) {
        ciraliID = 0;
    }
    br = confirm('Wollen Sie den Eintrag wirklich löschen?\n\nUm den Vorgang fortzusetzen, drücken Sie OK!');
    if (br == true) {
        parent.re.location.href = '_includes/dlg_delete.asp?db=' + db + '&id=' + id + '&ps=' + ps + '&formid=' + ciraliID;
        //new_window('_includes/dlg_delete.asp?db='+ db +'&id='+ id +'&ps='+ ps +'','Mail',300,300,200,200);
    } else {
        hide_lZ();
    }
}

function Formulare_NEU(v_id) {
    br = confirm('Wollen Sie wirklich alle bereits vorhandenen Formulare dieser Verwaltung neu überschreiben?\nACHTUNG: Es müssen zuvor alle Kategorien für diese Verwaltung angelegt sein.\n\nUm den Vorgang fortzusetzen, drücken Sie OK!');
    if (br == true) {
        window.location.href = "idx.asp?op=Formulare_NEU&id=" + v_id;
        //parent.re.location.href = '_includes/dlg_delete.asp?db='+ db +'&id='+ id +'&ps='+ ps
        //new_window('_includes/dlg_delete.asp?db='+ db +'&id='+ id +'&ps='+ ps +'','Mail',300,300,200,200);
    } else {
        hide_lZ();
    }
}

function new_window(link, target, breite, hoehe, x, y) {
    if (x == undefined) { x = 0; }
    if (y == undefined) { y = 0; }
    win = window.open(link, target, 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,Width=' + breite + ',Height=' + hoehe + ',left=' + x + ',top=' + y + '');
    win.focus();
}

//Standard-Skript für Datei-Upload
// z_name   = Feldname im Formular
// path     = Wohin soll gespeichert werden
// t        = dat = alle Dateien
//          = img = jgp Bilder
//          = gif = jpg & gif Bilder
// size
function upload(z_name, path) {

    if (eval("document.editformular." + z_name + ".value.length") > 1) {
        datei = eval("document.editformular." + z_name + ".value");
        br = confirm('Wollen Sie "' + datei + '" vom Eintrag löschen und/oder eine neue Datei hochspielen?\nVorsicht: Dabei wird diese Datei autom. vom Server gelöscht!\nUm den Vorgang fortzusetzen, drücken Sie OK!');
        if (br == true) {
            new_window('_includes/upload.php?action=neu&edit=true&v_id=' + path + '&d=' + z_name + '&templateupdate=false&fupdate=&file=' + datei, 'index', 550, 600, 0, 0);
        }
    } else {
        new_window('_includes/upload.php?action=neu&edit=false&v_id=' + path + '&d=' + z_name + '&templateupdate=false&fupdate=', 'index', 550, 600, 0, 0);
    }
    return
}

function upload_asp(f_name, path) {
    if (eval("document.editformular." + f_name + ".value.length") > 1) {
        file = eval("document.editformular." + f_name + ".value");
        conf = confirm('Wollen Sie die Datei\n' + file + '\nlöschen und/oder eine neue Datei hochladen?\nVorsicht: Die Datei wird dabei automatisch vom Server gelöscht!\n\nUm den Vorgang fortzusetzen, drücken Sie OK!');
        if (conf == true) {
            new_window('_includes/upload.asp?f_name=' + f_name + '&path=' + path + '&file=' + file, 'upload_asp', 550, 600, 0, 0);
        }
    } else {
        new_window('_includes/upload.asp?f_name=' + f_name + '&path=' + path + '&file=', 'upload_asp', 550, 600, 0, 0);
    }
}

function file_back_asp(f_name, file) {
    if (file.toString.length < 2) {
        eval('document.editformular.' + f_name + '.value = file');
    } else {
        eval('document.editformular.' + f_name + '.value = ""');
    }
    return
}

function file_back(filename, z_name) {
    if (filename.length < 2) {
        img = "_images/gif/auswahl.gif";
        ausschrift = "(keine Datei vorhanden)";
        eval("document.editformular." + z_name + ".value = ''");
        eval("document.all.sp_" + z_name + ".innerHTML = ''");
        //eval("document.all.sp1_"+ z_name +".innerHTML = ausschrift");
        eval("document.images('img_" + z_name + "').src= img");
    } else {
        img = "_images/gif/edit.gif";
        ausschrift = "";
        eval("document.editformular." + z_name + ".value = filename");
        eval("document.all.sp_" + z_name + ".innerHTML = filename");
        //eval("document.all.sp_"+ z_name +".innerHTML = ausschrift");
        eval("document.images('img_" + z_name + "').src= img");
    }
    document.editformular.__zwischenspeichern.value = "1";
    //document.editformular.submit();
    return
}

function lZ(strTxt) {
    if (strTxt == '' || !strTxt) strTxt = 'Einen kleinen Moment bitte...'
    if (document.all) {
        with (document.all.ladeLayer.style) {
            left = (document.body.clientWidth - 200) / 2;
            top = (document.body.clientHeight - 100) / 2 + document.body.scrollTop;
            visibility = "visible";
        }
        document.all.lT.innerHTML = strTxt;
    }
    return true

}

function hide_lZ() {
    if (document.all) {
        with (document.all.ladeLayer.style) {
            visibility = "hidden";
        }
    }
    return
}

function ohide_lZ() {
    if (opener.document.all) {
        with (opener.document.all.ladeLayer.style) {
            visibility = "hidden";
        }
    }
    return
}
