
// ?ffnet das Info-Popup, wenn ein falscher Browser verwendet wird
// Beispiel: IE5 und MultiDownloader
function wrongBrowser() {
    autoPopup('url='+wrongBrowswerVersionUrl,'name=WrongBrowser,width=500,height=324,scrollbars=no,toolbar=no,resizable=no');
}

// Zeigt die Grafiken zum Upload auf der Miniatur- und Detail-Seite
// Unterscheidet zwischen den verschiedenen Uploader-Arten
function showUploadInstructions(){
    var output = '<div style="height:5px;"><div></div></div>';
    output += '<div id="dragnDropUploadInstructionsDiv" style="display: none;">';
    output += '<div class="bt" style="padding-bottom:20px;">Derzeit sind in diesem Foto-Album keine Fotos vorhanden.</div>';
    output += '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
    output += '    <tr>';
    output += '        <td valign="top" colspan="2"><img src="'+imgbase+'/mail/fotoalbum/upload/hdl_so_funktioniert.gif" width="350" height="28" alt="" border="0" /></td>';
    output += '        <td align="right" rowspan="2"><img src="'+imgbase+'/mail/fotoalbum/upload/graf_erkl_activex.gif" width="310" height="255" alt="" border="0" /></td>';
    output += '    </tr>';
    output += '    <tr>';
    output += '        <td valign="top">';
    output += '            <table cellpadding="0" cellspacing="0" border="0">';
    output += '                <tr>';
    output += '                    <td class="bt" valign="top" width="20"><b>1.</b></td>';
    output += '                    <td  class="bt" valign="top">W&auml;hlen Sie Fotos oder ganze Ordner aus und ziehen Sie diese einfach mit der <b>Maus per Drag & Drop</b> in das Eingabefeld oben auf dieser Seite.<br /><br /></td>';
    output += '                </tr>';
    output += '                <tr>';
    output += '                    <td class="bt" valign="top"><b>2.</b></td>';
    output += '                    <td  class="bt" valign="top">Ihre Fotos werden unmittelbar hochgeladen und an Stelle dieser Anleitung angezeigt.<br /><br />';
    output += '                    Um weitere Fotos hochzuladen wiederholen Sie den Vorgang</td>';
    output += '                </tr>';
    output += '            </table>';
    output += '        </td>';
    output += '        <td width="20"><img src="'+imgbase+'/p.gif" width="20" height="1" border="0" alt="" /></td>';
    output += '    </tr>';
    output += '</table>';
    output += '</div>';
    output += '<div id="htmlUploadInstructionsDiv" style="display: none;">';
    output += '<div class="bt">Derzeit sind in diesem Foto-Album keine Fotos vorhanden.</div>';
    output += '<div style="padding:20px 0px 20px 0px;"><img src="'+imgbase+'/mail/fotoalbum/upload/hdl_so_funktioniert.gif" width="350" height="28" alt="" border="0" /></div>';
    output += '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
    output += '    <tr>';
    output += '        <td class="bt" valign="top" width="20"><b>1.</b></td>';
    output += '        <td class="bt" valign="top">Klicken Sie auf die Schaltfl&auml;che "<b>Durchsuchen</b>" oben auf dieser Seite. Es &ouml;ffnet sich ein Dialogfenster.</td>';
    output += '        <td width="20"><img src="'+imgbase+'/p.gif" width="20" height="1" border="0" alt="" /></td>';
    output += '        <td valign="top" align="right"><img src="'+imgbase+'/mail/fotoalbum/upload/graf_erkl_standard01.gif" width="355" height="103" alt="" border="0" /></td>';
    output += '    </tr>';
    output += '</table>';
    output += '<hr style="color:#ededed;margin:10px 0px 10px 0px" />';
    output += '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
    output += '    <tr>';
    output += '        <td class="bt" valign="top" width="20"><b>2.</b></td>';
    output += '        <td class="bt" valign="top">Im ge&ouml;ffneten Dialogfenster w&auml;hlen Sie das gew&uuml;nschte Foto aus. Anschlie&szlig;end klicken Sie auf die Schaltfl&auml;che "<b>&Ouml;ffnen</b>".</td>';
    output += '        <td width="20"><img src="'+imgbase+'/p.gif" width="20" height="1" border="0" alt="" /></td>';
    output += '        <td valign="top" align="right"><img src="'+imgbase+'/mail/fotoalbum/upload/graf_erkl_standard02.gif" width="193" height="125" alt="" border="0" /></td>';
    output += '    </tr>';
    output += '</table>';
    output += '<hr style="color:#ededed;margin:10px 0px 10px 0px" />';
    output += '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
    output += '    <tr>';
    output += '        <td class="bt" valign="top" width="20"><b>3.</b></td>';
    output += '        <td class="bt" valign="top">Um das Hochladen des Fotos abzuschlie&szlig;en klicken Sie auf die Schaltfl&auml;che "<b>Hochladen</b>". Das Foto wird hochgeladen und an Stelle dieser Anleitung angezeigt.</td>';
    output += '        <td width="20"><img src="'+imgbase+'/p.gif" width="20" height="1" border="0" alt="" /></td>';
    output += '        <td valign="top" align="right" rowspan="2"><img src="'+imgbase+'/mail/fotoalbum/upload/graf_erkl_standard03.gif" width="356" height="103" alt="" border="0" /></td>';
    output += '    </tr>';
    output += '    <tr>';
    output += '        <td class="bt" colspan="3">Um weitere Fotos hochzuladen wiederholen Sie den Vorgang.</td>';
    output += '    </tr>';
    output += '</table>';
    output += '</div>';
    output += '<div style="height:15px;"><div></div></div>';
    document.writeln(output);
    if(showDragnDropUploadImage == true) {
        document.getElementById('dragnDropUploadInstructionsDiv').style.display = 'block';
    }
    else {
        document.getElementById('htmlUploadInstructionsDiv').style.display = 'block';
    }
}

// Lichtschalter f?r das Flash auf der Gast-Homepage
// Achtung: wird innerhalb des Flashs aufgerufen!
function licht(lichtstatus){
    if(lichtstatus == 0){
        document.getElementById("flashleft").style.backgroundColor= "#000000";
        document.getElementById("flashright").style.backgroundColor= "#000000";
    }
    else {
        document.getElementById("flashleft").style.backgroundColor= "";
        document.getElementById("flashright").style.backgroundColor= "";
    }
}

// zeigt ein alert auf der select-Layout Seite bei Auswahl eines Flash-Layouts,
// wenn nicht ausschliesslich jpgs im Album liegen
function showJpegMsg() {
    alert(jpegMsg);
}

// aktiviert eine Checkbox
function doCheck(obj) {
    obj.checkBox.checked=true;
    changeColorObject(obj);
}

// deaktiviert eine Checkbox
function doUnCheck(obj) {
    obj.checkBox.checked='';
    changeColorObject(obj);
}

// setzt die Hintergrundfarbe (De)Selektierter HTML-Elemente
function changeColor(id){
	changeColorObject(new picElement(id));
}

function changeColorObject(obj, id) {
    if(obj.checkBox.checked == true){
        obj.select();
        images_select++;
    }else{
    	obj.deselect();
        images_select--;
    }
}

// blendet in der Albumliste die Box id zum Umbenennen ein
function showRenameBox(id) {
    if(currentdiv != 0){
        hideRenameBox(currentdiv);
    }
    currentdiv = id;
    if (ver.indexOf("MSIE") != -1 && !window.opera && ver.indexOf("Mac") == -1) {
        window.document.getElementById("d"+id).style.setAttribute('display','block','false');
        window.document.getElementById("text"+id).focus();
    } else {
        document.getElementById("d"+id).style.display = "block";
        document.getElementById("text"+id).focus();
    }
    if(currentdiv != 0){
        if (ver.indexOf("MSIE") != -1 && !window.opera && ver.indexOf("Mac") == -1) {
            window.document.getElementById("d"+(currentdiv-1)).style.setAttribute('display','none','true');
        } else {
            document.getElementById("d"+(currentdiv-1)).style.display = "none";
        }
    }
    //highlighting
    document.getElementById("row"+(id/2)).style.backgroundColor = reqServiceHighlightColor;
}

// blendet in der Albumliste die Box id zum Umbenennen aus
function hideRenameBox(id) {
    if (ver.indexOf("MSIE") != -1 && !window.opera && ver.indexOf("Mac") == -1) {
        window.document.getElementById("d"+id).style.setAttribute('display','none','true');
    } else {
        document.getElementById("d"+id).style.display = "none";
    }
    if (ver.indexOf("MSIE") != -1 && !window.opera && ver.indexOf("Mac") == -1) {
        window.document.getElementById("d"+(currentdiv-1)).style.setAttribute('display','block','false');
    } else {
        document.getElementById("d"+(currentdiv-1)).style.display = "block";
    }
    //no highlighting
    document.getElementById("row"+(id/2)).style.backgroundColor = reqServiceBgColor;
}

// blendet auf der Detailseite den Speichern-Button ein
function showSaveDetailsButton(id){
    images_speichern++;
    document.getElementById("speichern"+id).style.display = 'block';
    document.getElementById("saveimage"+id).value = 1;
}


// Speichert ein ausgew?hltes Layout
function setLayout(id, club, isclub, start) {
    if (images_speichern > 0) {
        confirmCheck = confirm(confirmImageSaveLossMsg);
        if (confirmCheck == true) {
            document.getElementById("layoutform").choosenLayout.value = id;
            document.getElementById("layoutform").startPresentation.value = start;
            document.getElementById("layoutform").submit();
        }
    } else {
        document.getElementById("layoutform").choosenLayout.value = id;
        document.getElementById("layoutform").startPresentation.value = start;
        document.getElementById("layoutform").submit();
    }
}

// Weist den User auf ?nderungen auf der Seite hin, die nicht gespeichert wurden.
function confirmJump(url) {
    if (images_speichern > 0) {
        confirmCheck = confirm(confirmImageSaveLossMsg);
        if (confirmCheck == true) {
            location.href = url;
        }
    } else {
        location.href = url;
    }
}

// Best?tigungsmeldung, wenn der User ein Album aus der Albumliste l?schen m?chte
function deleteAlbumConfirm(title) {
    var deleteAlbumConfirmTitleMsg = confirmAlbumDeleteMsg.replace(/<0>/, title);
    return confirm(deleteAlbumConfirmTitleMsg);
}

