
/* FRONTEND MODE */


/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/navigation/navigation.js' */


// HTTP / HTTPS Prefix Check
var httpHttpsPrefixReal = '';
if (window.location.href.indexOf('http://') == 0) {
    httpHttpsPrefixReal = 'http://';
} else if (window.location.href.indexOf('https://') == 0) {
    httpHttpsPrefixReal = 'https://';
}
if (httpHttpsPrefixReal != 'http://') {
    //alert("WARNING: You are accessing a site configured for 'http://' via '" + httpHttpsPrefixReal + "'.");
    var newHref = window.location.href.replace(httpHttpsPrefixReal, 'http://');
    window.location.href = newHref;
} 

var currentAufklappElem = new Array();
var currentAufklappTimer = new Array();

window.autoDropdownSelectedLevel = null;
window.autoDropdownSelectedElemId = null;

// Layer fuer ausgewaehlten Eintrag automatisch einblenden
window.showAufklappLayerAutoDropdownSelected = function(level, elemId) {
    window.autoDropdownSelectedLevel = level;
    window.autoDropdownSelectedElemId = elemId;
    window.showAufklappLayer(level, elemId);
};

// Layoer fuer ausgewaehlten Eintrag automatisch wiedereinblenden, nachdem ein anderer Layer eingeblendet war
window.restoreAufklappLayerAutoDropdownSelected = function() {
    if (currentAufklappElem[window.autoDropdownSelectedLevel] == null) { // nur, wenn kein layer mehr eingeblendet ist
        window.showAufklappLayer(window.autoDropdownSelectedLevel, window.autoDropdownSelectedElemId);
    }
};

// Layer einblenden
window.showAufklappLayer = function(level, elemId) {
    // Momentan angezeigten Layer ausblenden
    if (currentAufklappElem[level] != null){
        hideCurrentAufklappLayerNow(level);
    }
    // Neuen Layer einblenden
    var elem = document.getElementById(elemId);
    elem.style.display = 'block';
    currentAufklappElem[level] = elem;
    // Dem passenden Link eine Hover-Klasse zuweisen
    if (window.dojo) {
        var aElements = dojo.query('a', elem.parentNode);
        if (aElements) {
            dojo.forEach(aElements, function(e){
                dojo.addClass(e, "dropdownHover");
                if (dojo.hasClass(e, "ebene0-1")) {
                    dojo.addClass(e, "ebene0-1_dropdownHover");
                }
                if (dojo.hasClass(e, "ebene0-1_angewaehlt")) {
                    dojo.addClass(e, "ebene0-1_angewaehlt_dropdownHover");
                }
            });
        }
    }
    // Den uebergeordneten DIVs fuer "Runde Ecken" eine Hover-Klasse zuordnen
    if (window.dojo) {
        if (dojo.hasClass(elem.parentNode, "navEntryRoundCorner")) {
            // query all divs
            var corners = ['mitte', 'om', 'um', 'lm', 'rm', 'lo', 'ro', 'lu', 'ru'];
            var topNode =  elem.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
            dojo.forEach(corners, function(cr){
                var divElements = dojo.query('div.ecke0-1_' + cr, topNode);
                if (divElements) {
                    dojo.forEach(divElements, function(e){
                        dojo.addClass(e, 'cornerDropdownHover');
                        dojo.addClass(e, 'ecke0-1_' + cr + '_cornerDropdownHover');
                    });
                }
            });
        }
    }
};

// Layer ausblenden (verzoegert!)
window.hideAufklappLayer = function(level, elemId) {
    if (currentAufklappTimer[level] != null) {
        window.clearTimeout(currentAufklappTimer[level]);
        currentAufklappTimer[level] = null;
    }
    currentAufklappTimer[level] = window.setTimeout('hideCurrentAufklappLayerNow('+level+');', 500);
};

// Layer jetzt ausblenden
window.hideCurrentAufklappLayerNow = function(level) {
    if (currentAufklappTimer[level] != null) {
        window.clearTimeout(currentAufklappTimer[level]);
        currentAufklappTimer[level] = null;
    }
    if (currentAufklappElem[level] != null) {
        var elem = currentAufklappElem[level];
        elem.style.display = 'none';
        currentAufklappElem[level] = null;
        // Dem passenden Link die Hover-Klasse wieder wegnehmen
        if (window.dojo) {
            var aElements = dojo.query('a', elem.parentNode);
            if (aElements) {
                dojo.forEach(aElements, function(e){
                    dojo.removeClass(e, "dropdownHover");
                    if (dojo.hasClass(e, "ebene0-1")) {
                        dojo.removeClass(e, "ebene0-1_dropdownHover");
                    }
                    if (dojo.hasClass(e, "ebene0-1_angewaehlt")) {
                        dojo.removeClass(e, "ebene0-1_angewaehlt_dropdownHover");
                    }
                });
            }
        }
        // Den uebergeordneten DIVs fuer "Runde Ecken" eine Hover-Klasse zuordnen
        if (window.dojo) {
            if (dojo.hasClass(elem.parentNode, "navEntryRoundCorner")) {
                // query all divs
                var corners = ['mitte', 'om', 'um', 'lm', 'rm', 'lo', 'ro', 'lu', 'ru'];
                var topNode =  elem.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
                dojo.forEach(corners, function(cr){
                    var divElements = dojo.query('div.ecke0-1_' + cr, topNode);
                    if (divElements) {
                        dojo.forEach(divElements, function(e){
                            dojo.removeClass(e, 'cornerDropdownHover');
                            dojo.removeClass(e, 'ecke0-1_' + cr + '_cornerDropdownHover');
                        });
                    }
                });
            }
        }
        // Layer fuer ausgewaehlten Eintrag wieder einblenden, falls autoDropdownSelected aktiv
        if (window.autoDropdownSelectedLevel != null && window.autoDropdownSelectedElemId != null && window.autoDropdownSelectedLevel == level) {
            window.setTimeout("restoreAufklappLayerAutoDropdownSelected();", 50);
        }
    }
};



/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/navigation/navigation.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/backend/js/backend.js' */

/*
 * 
 * These backend functions may be used from frontend modules.
 * 
 */


/*
 * Popup Windows
 */

function backend_findElemPos(obj) {
    var curleft = curtop = 0;
    if (obj.offsetParent) {
        curleft = obj.offsetLeft
        curtop = obj.offsetTop
        while (obj = obj.offsetParent) {
            curleft += obj.offsetLeft
            curtop += obj.offsetTop
        }
    }
    return [curleft,curtop];
}

function backend_showPopup(clickedElem, elem) {
    elem = dojo.byId(elem);
    if(dojo.style(elem, 'display') == 'block') {
        dojo.style(elem, 'display', 'none');
    } else { 
        dojo.place(elem, dojo.body(), 'last');
        dojo.style(elem, 'display', 'block');
    }
    
    if (clickedElem && clickedElem.offsetLeft) {
        var clickedElemPos = backend_findElemPos(clickedElem);
        dojo.style(elem, 'left', (clickedElemPos[0] - elem.offsetWidth - 10) + 'px');
        dojo.style(elem, 'top', clickedElemPos[1] + 'px');
    }
}
/*
 * Ajax Refresh and Form Submit
 */

function backend_destroyWidgets(parentNode) {
    new dijit.layout.ContentPane({}, parentNode).destroyRecursive(true);
}

function backend_ajaxSetRefreshUrl(url) {
    window.backend_ajaxRefreshUrl = url;
}

function backend_ajaxRefreshTabContent(tabname) {
    if (tabname == null) {
        tabname = window.backend_currentTab;
    }
    var divElem = dojo.byId('backend_tab_'+tabname);
    window.scrollTo(0,0);
    backend_showLoadingIcon(divElem);
    // destroy old htmleditors
    htmlcontent_destroyEditors(divElem);
    // refresh tab content by ajax
    var ajaxUrl = window.backend_ajaxRefreshUrl;
    if (ajaxUrl.indexOf('#') != -1) {
        ajaxUrl = ajaxUrl.substr(0,ajaxUrl.indexOf('#'));
    }
    if (ajaxUrl.indexOf('?') == -1) {
        ajaxUrl = ajaxUrl + '?';
    } else {
        ajaxUrl = ajaxUrl + '&';
    }
    ajaxUrl = ajaxUrl + 'backaned_ajaxRefreshTabContent=' + escape(tabname);
    console.log('Refreshing tab content by ajax: tabname=', tabname);
    dojo.xhrGet({
        url: ajaxUrl,
        load: function(response, ioArgs){
            console.log('Refreshing tab content by ajax get, ajax request successful:', tabname);
            // destroy old widgets (after sending post data!)
            console.log('Refreshing tab content by ajax get, destroying old widgets:', tabname);
            backend_destroyWidgets(divElem);
            // set new content
            console.log('Refreshing tab content by ajax get, setting new content:', tabname);
            divElem.innerHTML = response;
            // apply dojo parser
            console.log('Refreshing tab content by ajax get, parsing:', tabname);
            dojo.parser.parse(divElem);
            // initialize editors for this tab
            console.log('Refreshing tab content by ajax get, activating html editors:', tabname);
            htmlcontent_activateEditors(divElem);
            // hide loading icon
            console.log('Refreshing tab content by ajax get, done:', tabname);
            backend_hideLoadingIcon(divElem);
            // always return response object
            return response;
        },
        handleAs: "text"
    });
}

function backend_ajaxSubmitForm(formElem) {
    var tabname = window.backend_currentTab;
    var divElem = dojo.byId('backend_tab_'+tabname);
    window.scrollTo(0,0);
    backend_showLoadingIcon(divElem);
    // destroy old htmleditors (before sending post data!)
    htmlcontent_destroyEditors(divElem);
    // refresh tab content by ajax
    var form = dojo.byId(formElem);
    var ajaxUrl = dojo.attr(form, 'action');
    if (!ajaxUrl || ajaxUrl == '') {
        ajaxUrl = window.backend_ajaxRefreshUrl;
    }
    if (ajaxUrl.indexOf('#') != -1) {
        ajaxUrl = ajaxUrl.substr(0,ajaxUrl.indexOf('#'));
    }
    if (ajaxUrl.indexOf('?') == -1) {
        ajaxUrl = ajaxUrl + '?';
    } else {
        ajaxUrl = ajaxUrl + '&';
    }
    ajaxUrl = ajaxUrl + 'backaned_ajaxRefreshTabContent=' + escape(tabname);
    console.log('Refreshing tab content by ajax post: tabname=', tabname);
    dojo.xhrPost({
        url: ajaxUrl,
        form: form,
        load: function(response, ioArgs){
            console.log('Refreshing tab content by ajax post, ajax request successful:', tabname);
            // destroy old widgets (after sending post data!)
            console.log('Refreshing tab content by ajax post, destroying old widgets:', tabname);
            backend_destroyWidgets(divElem);
            // set new content
            console.log('Refreshing tab content by ajax post, setting new content:', tabname);
            divElem.innerHTML = response;
            // apply dojo parser
            console.log('Refreshing tab content by ajax post, parsing:', tabname);
            /*
            dijit.byId("blockcontentMenu").destroyRecursive();
            dijit.byId("blockcontentGroupModeForm").destroyRecursive();
            dijit.byId("blockcontentGroupId").destroyRecursive();
            dijit.byId("blockcontentEditForm").destroyRecursive();
            dijit.byId("createBlockTopTemplate").destroyRecursive();
            
            dijit.byId("blockcontent_1_template").destroyRecursive();
            dijit.byId("blockcontent_1_navigation").destroyRecursive();
            dijit.byId("blockcontent_1_title").destroyRecursive();
            dijit.byId("blockcontent_1_image").destroyRecursive();
            dijit.byId("blockcontent_1_externallink").destroyRecursive();
            dijit.byId("blockcontent_84_template").destroyRecursive();
            dijit.byId("blockcontent_84_navigation").destroyRecursive();
            dijit.byId("blockcontent_84_title").destroyRecursive();
            dijit.byId("blockcontent_84_image").destroyRecursive();
            dijit.byId("blockcontent_84_externallink").destroyRecursive();
            dijit.byId("blockcontent_76_template").destroyRecursive();
            dijit.byId("blockcontent_76_navigation").destroyRecursive();
            dijit.byId("blockcontent_76_title").destroyRecursive();
            dijit.byId("blockcontent_76_image").destroyRecursive();
            dijit.byId("blockcontent_76_externallink").destroyRecursive();
            dijit.byId("blockcontent_2_template").destroyRecursive();
            dijit.byId("blockcontent_2_navigation").destroyRecursive();
            dijit.byId("blockcontent_2_title").destroyRecursive();
            dijit.byId("blockcontent_2_image").destroyRecursive();
            dijit.byId("blockcontent_2_externallink").destroyRecursive();
            dijit.byId("blockcontent_49_template").destroyRecursive();
            dijit.byId("blockcontent_49_navigation").destroyRecursive();
            dijit.byId("blockcontent_49_title").destroyRecursive();
            dijit.byId("blockcontent_49_image").destroyRecursive();
            dijit.byId("blockcontent_49_externallink").destroyRecursive();
            dijit.byId("blockcontent_50_template").destroyRecursive();
            dijit.byId("blockcontent_50_navigation").destroyRecursive();
            dijit.byId("blockcontent_50_title").destroyRecursive();
            dijit.byId("blockcontent_50_image").destroyRecursive();
            dijit.byId("blockcontent_50_externallink").destroyRecursive();
            
            dijit.byId("createBlockTemplate").destroyRecursive();
            */
            dojo.parser.parse(divElem);
            // initialize editors for this tab
            console.log('Refreshing tab content by ajax post, activating html editors:', tabname);
            htmlcontent_activateEditors(divElem);
            // hide loading icon
            console.log('Refreshing tab content by ajax post, done:', tabname);
            backend_hideLoadingIcon(divElem);
            // always return response object
            return response;
        },
        handleAs: "text"
    });
}


/*
 * Helpers
 */

function backend_reloadPage() {
    if (dojo.isFF || dojo.isIE) {
        window.location.href = new String(window.location.href);
    } else {
        window.location.reload(false);
    }
}

function backend_showLoadingIcon(targetElem) {
    // remove existing loading icon
    backend_hideLoadingIcon(targetElem);
    // show loading icon
    console.log("backend_showLoadingIcon()");
    targetElem = dojo.byId(targetElem);
    if (!targetElem) {
        return;
    }
    if (!targetElem.id || targetElem.id == '') {
        alert("Cannot create loading icon for an element without id.");
    }
    var div = dojo.doc.createElement("div");
    var w = targetElem.offsetWidth + 2;
    var h = targetElem.offsetHeight + 2;
    var bgX = (Math.floor(w/2)-16);
    var bgY = (Math.floor(h/2)-16);
    if (bgY > 250) {
        bgY = 250;
    }
    dojo.style(div, "position", "absolute");
    dojo.style(div, "zIndex", "999999");
    dojo.style(div, "opacity", 0.85);
    dojo.style(div, "backgroundColor", "#777777");
    // Causes HTTPS warning in IE 8 when using IE 7 compatibility view 
    //dojo.style(div, "backgroundImage", "url(/media/images/backend/loading.gif)");
    // --> done in loadingIcon CSS class now
    dojo.addClass(div, "loadingIcon");
    dojo.style(div, "backgroundRepeat", "no-repeat");
    dojo.style(div, "backgroundPosition", bgX+"px "+bgY+"px");
    dojo.style(div, "width", w+"px");
    dojo.style(div, "height", h+"px");
    dojo.place(div, targetElem, "before");
    // show waiting cursor
    dojo.style(dojo.body(), "cursor", "wait");
    // register loading icon
    if (!window.backend_activeLoadingIcons) {
       window.backend_activeLoadingIcons = new Object();
    }
    window.backend_activeLoadingIcons[targetElem.id] = div;
}

function backend_hideLoadingIcon(targetElem) {
    // hide loading icon
    console.log("backend_hideLoadingIcon()");
    targetElem = dojo.byId(targetElem);
    if (!targetElem) {
        return;
    }
    if (window.backend_activeLoadingIcons && window.backend_activeLoadingIcons[targetElem.id]) {
        var div = window.backend_activeLoadingIcons[targetElem.id];
        div.parentNode.removeChild(div);
        delete window.backend_activeLoadingIcons[targetElem.id];
    }
    // unset waiting cursor
    dojo.style(dojo.body(), "cursor", "");
}



/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/backend/js/backend.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/datagrid.js' */


window.datagridHtmlFormatter = function(value) {
    if (!value || value == null) {
        return value;
    }
    value = value.replace(/&gt;/g, '>');
    value = value.replace(/&lt;/g, '<');
    value = value.replace(/&amp;nbsp;/g, '&nbsp;');
    if (value.indexOf("nbsp") != -1) {
        console.log("val", value);
    }
    return value;
};


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/datagrid.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/imageviewer.js' */


window.imageviewer_fadeInDuration = 500; // set to 0 in imageviewer_custom.js to disable fade effect
window.imageviewer_fadeOutDuration = 500; // set to 0 in imageviewer_custom.js to disable fade effect
window.imageviewer_connectedListeners = new Array();

window.imageviewer_init = function(elemId) {
    var iv = eval('window.' + elemId + '_object');
    iv.currentIi = -1;
    // preload first image
    imageviewer_preloadImage(elemId, 0);
    // call for a second time (don't ask why)
    window.setTimeout(function() {
        imageviewer_gotoImage(elemId, 0);
    }, 1500);
    // disable marking of text
    imageviewer_disableSelection(dojo.byId(elemId));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerScreen'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerImageContainer1'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerImageContainer2'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerImage1'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerImage2'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerImage2'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerPrevNextContainer'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerPrev'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerNext'));
    imageviewer_disableSelection(dojo.byId(elemId + '_imageviewerImageNr'));
    // connect listeners
    (function(elemIdConnect){
        // add onmouseover
        dojo.connect(dojo.byId(elemIdConnect), 'onmouseover', function(event){
            imageviewer_createKeyboardListeners(elemIdConnect);
        });
        // add onclick to prev next buttons
        dojo.connect(dojo.byId(elemIdConnect + '_imageviewerPrev'), 'onclick', function(event){
            imageviewer_gotoPrevImage(elemIdConnect);
            dojo.stopEvent(event);
        });
        dojo.connect(dojo.byId(elemIdConnect + '_imageviewerNext'), 'onclick', function(event){
            imageviewer_gotoNextImage(elemIdConnect);
            dojo.stopEvent(event);
        });
        // add onclick for skipping to next image
        dojo.connect(dojo.byId(elemIdConnect + '_imageviewerScreen'), 'onclick', function(event){
            imageviewer_gotoNextImage(elemIdConnect);
            dojo.stopEvent(event);
        });
    })(elemId);
};

window.imageviewer_disableSelection = function(target) {
    if (typeof target.onselectstart != "undefined") { // IE
        target.onselectstart = function() {return false};
    } else if (typeof target.style.MozUserSelect != "undefined") { // Firefox
        target.style.MozUserSelect = "none";
    } else { // Others (ie: Opera)
        target.onmousedown = function() {return false};
        target.style.cursor = "default";
    }
};

window.imageviewer_createKeyboardListeners = function(elemIdConnect) {
    var listener;
    // remove existing listeners
    imageviewer_removeKeyboardListeners();
    // add onclick listeners to elem
    listener = dojo.connect(dojo.byId(elemIdConnect), 'onclick', function(event){
        dojo.stopEvent(event);
    });
    window.imageviewer_connectedListeners.push(listener);
    // add onclick listener (required to kill keyboard listener when clicking outside of imageviewer)
    listener = dojo.connect(window.document, 'onclick', function(event){
        imageviewer_removeKeyboardListeners();
        dojo.stopEvent(event);
    });
    window.imageviewer_connectedListeners.push(listener);
    // add keyboard listener
    listener = dojo.connect(window.document, 'onkeypress', function(event){
        imageviewer_onKeyPress(event, elemIdConnect);
    });
    window.imageviewer_connectedListeners.push(listener);
};

window.imageviewer_removeKeyboardListeners = function() {
    while(window.imageviewer_connectedListeners.length > 0) {
        dojo.disconnect(window.imageviewer_connectedListeners.pop());
    }
};

window.imageviewer_onKeyPress = function(event, elemId) {
    var iv = eval('window.' + elemId + '_object');
    if (event.keyCode == dojo.keys.LEFT_ARROW) {
        imageviewer_gotoPrevImage(elemId);
        dojo.stopEvent(event);
        return;
    }
    if (event.keyCode == dojo.keys.RIGHT_ARROW || event.keyCode == dojo.keys.SPACE || event.keyCode == 0) {
        imageviewer_gotoNextImage(elemId);
        dojo.stopEvent(event);
        return;
    }
    if (iv.fullscreen && event.keyCode == dojo.keys.ESCAPE) {
        imageviewer_toggleFullscreen(elemId);
        dojo.stopEvent(event);
        return;
    }
};

window.imageviewer_gotoPrevImage = function(elemId) {
    var iv = eval('window.' + elemId + '_object');
    imageviewer_gotoImage(elemId, iv.currentIi - 1);
};

window.imageviewer_gotoNextImage = function(elemId) {
    var iv = eval('window.' + elemId + '_object');
    imageviewer_gotoImage(elemId, iv.currentIi + 1);
};

window.imageviewer_gotoImage = function(elemId, ii) {
    imageviewer_createKeyboardListeners(elemId);
    var iv = eval('window.' + elemId + '_object');
    if (ii > iv.images.length - 1) {
        ii = 0;
    }
    if (ii < 0) {
        ii = iv.images.length - 1;
    }
    if (!iv.useSecondContainer) {
        iv.useSecondContainer = true;
        dojo.style(elemId + '_imageviewerImageContainer1', 'opacity', 0.0);
        dojo.style(elemId + '_imageviewerImageContainer1', 'zIndex', 1198);
        dojo.style(elemId + '_imageviewerImageContainer2', 'zIndex', 1197);
        dojo.byId(elemId + '_imageviewerImage1').src = iv.images[ii];
        imageviewer_fitImage(elemId, elemId + '_imageviewerImageContainer1', elemId + '_imageviewerImage1', ii);
        var fadeOut = dojo.animateProperty(
            {
                node: elemId + '_imageviewerImageContainer2',
                duration: (window.imageviewer_fadeOutDuration == 0 ? 1 : window.imageviewer_fadeOutDuration),
                properties: {
                    opacity: 0.0
                }
            }
        );
        fadeOut.play();
        var fadeIn = dojo.animateProperty(
            {
                node: elemId + '_imageviewerImageContainer1',
                duration: (window.imageviewer_fadeInDuration == 0 ? 1 : window.imageviewer_fadeInDuration),
                properties: {
                    opacity: 1.0
                }
            }
        );
        fadeIn.play();
    } else {
        iv.useSecondContainer = false;
        dojo.style(elemId + '_imageviewerImageContainer2', 'opacity', 0.0);
        dojo.style(elemId + '_imageviewerImageContainer2', 'zIndex', 1198);
        dojo.style(elemId + '_imageviewerImageContainer1', 'zIndex', 1197);
        dojo.byId(elemId + '_imageviewerImage2').src = iv.images[ii];
        imageviewer_fitImage(elemId, elemId + '_imageviewerImageContainer2', elemId + '_imageviewerImage2', ii);
        var fadeOut = dojo.animateProperty(
            {
                node: elemId + '_imageviewerImageContainer1',
                duration: (window.imageviewer_fadeOutDuration == 0 ? 1 : window.imageviewer_fadeOutDuration),
                properties: {
                    opacity: 0.0
                }
            }
        );
        fadeOut.play();
        var fadeIn = dojo.animateProperty(
            {
                node: elemId + '_imageviewerImageContainer2',
                duration: (window.imageviewer_fadeInDuration == 0 ? 1 : window.imageviewer_fadeInDuration),
                properties: {
                    opacity: 1.0
                }
            }
        );
        fadeIn.play();
    }
    dojo.byId(elemId + '_imageviewerTitle').innerHTML = (iv.imageinfos[ii].title == null || iv.imageinfos[ii].title == '' ? '&nbsp;' : iv.imageinfos[ii].title);
    dojo.byId(elemId + '_imageviewerDescription').innerHTML = (iv.imageinfos[ii].description == null || iv.imageinfos[ii].description == '' ? '&nbsp;' : iv.imageinfos[ii].description);
    dojo.byId(elemId + '_imageviewerImageNr').innerHTML = (parseInt(ii) + 1) + ' / ' + iv.images.length;
    imageviewer_preloadImage(elemId, ii - 1);
    imageviewer_preloadImage(elemId, ii + 1);
    iv.currentIi = ii;
};

window.imageviewer_fitImage = function(elemId, containerId, imageId, ii) {
    var iv = eval('window.' + elemId + '_object');
    var imageWidth = null;
    var imageHeight = null;
    if (iv.fullscreen) {
        imageWidth = dojo.byId(elemId + '_imageviewerScreen').offsetWidth;
        imageHeight = dojo.byId(elemId + '_imageviewerScreen').offsetHeight;
    } else {
        imageWidth = iv.imagewidth;
        imageHeight = iv.imageheight;
    }
    var container = dojo.byId(containerId);
    var img = dojo.byId(imageId);
    var preloadedImage = iv.preloadedImages[ii];
    if (!preloadedImage) {
        return;
    }
    var origWidth = preloadedImage.width;
    var origHeight = preloadedImage.height;
    var xFactor = origWidth / imageWidth;
    var yFactor = origHeight / imageHeight;
    if (xFactor >= yFactor) {
        img.width = imageWidth;
        img.height = Math.floor(origHeight / xFactor);
    } else {
        img.height = imageHeight;
        img.width = Math.floor(origWidth / yFactor);
    }
    dojo.style(img, 'marginLeft', Math.floor((imageWidth - img.width) / 2) + 'px');
    dojo.style(img, 'marginTop', Math.floor((imageHeight - img.height) / 2) + 'px');
};

window.imageviewer_preloadImage = function(elemId, ii) {
    var iv = eval('window.' + elemId + '_object');
    if (ii > iv.images.length - 1) {
        ii = 0;
    }
    if (ii < 0) {
        ii = iv.images.length - 1;
    }
    if (!iv.preloadedImages) {
        iv.preloadedImages = new Object();
    }
    if (!iv.preloadedImages[ii]) {
        iv.preloadedImages[ii] = new Image();
        iv.preloadedImages[ii].src = iv.images[ii];
    }
};

window.imageviewer_toggleFullscreen = function(elemId) {
    var iv = eval('window.' + elemId + '_object');
    iv.fullscreen = !iv.fullscreen;
    if (iv.fullscreen) {
        // switch to fullscreen mode
        dojo.removeClass(dojo.byId(elemId), 'imageviewerNonFullscreen');
        dojo.addClass(dojo.byId(elemId), 'imageviewerFullscreen');
        dojo.style(dojo.body(), 'overflow', 'hidden');
        window.scrollTo(0, 0);
        var viewportWidth = dijit.getViewport().w;
        var viewportHeight = dijit.getViewport().h;
        var imageWidth = viewportWidth - iv.imagewidthOffset;
        var imageHeight = viewportHeight - iv.imageheightOffset;
        iv.nonFullscreenWidth = dojo.style(elemId, 'width');
        iv.nonFullscreenHeigh = dojo.style(elemId, 'height');
        iv.nonFullscreenParentNode = dojo.byId(elemId).parentNode;
        dojo.place(elemId, dojo.body(), 'first');
        dojo.style(elemId, 'position', 'absolute');
        dojo.style(elemId, 'zIndex', '1195');
        dojo.style(elemId, 'left', '0px');
        dojo.style(elemId, 'top', '0px');
        dojo.style(elemId, 'width', viewportWidth + 'px');
        dojo.style(elemId, 'height', viewportHeight + 'px');
        dojo.style(elemId + '_imageviewerScreen', 'width', imageWidth + 'px');
        dojo.style(elemId + '_imageviewerScreen', 'height', imageHeight + 'px');
        dojo.style(elemId + '_imageviewerImageContainer1', 'width', imageWidth + 'px');
        dojo.style(elemId + '_imageviewerImageContainer1', 'height', imageHeight + 'px');
        dojo.style(elemId + '_imageviewerImageContainer2', 'width', imageWidth + 'px');
        dojo.style(elemId + '_imageviewerImageContainer2', 'height', imageHeight + 'px');
        dojo.style(elemId + '_imageviewerPrevNextContainer', 'width', imageWidth + 'px')
    } else {
        // switch to non-fullscreen mode
        dojo.removeClass(dojo.byId(elemId), 'imageviewerFullscreen');
        dojo.addClass(dojo.byId(elemId), 'imageviewerNonFullscreen');
        dojo.style(dojo.body(), 'overflow', '');
        window.scrollTo(0, 0);
        var imageWidth = iv.imagewidth;
        var imageHeight = iv.imageheight;
        dojo.place(elemId, iv.nonFullscreenParentNode, 'first');
        dojo.style(elemId, 'position', '');
        dojo.style(elemId, 'zIndex', '');
        dojo.style(elemId, 'left', '');
        dojo.style(elemId, 'top', '');
        dojo.style(elemId, 'width', iv.nonFullscreenWidth + 'px');
        dojo.style(elemId, 'height', iv.nonFullscreenHeigh + 'px');
        dojo.style(elemId + '_imageviewerScreen', 'width', imageWidth + 'px');
        dojo.style(elemId + '_imageviewerScreen', 'height', imageHeight + 'px');
        dojo.style(elemId + '_imageviewerImageContainer1', 'width', imageWidth + 'px');
        dojo.style(elemId + '_imageviewerImageContainer1', 'height', imageHeight + 'px');
        dojo.style(elemId + '_imageviewerImageContainer2', 'width', imageWidth + 'px');
        dojo.style(elemId + '_imageviewerImageContainer2', 'height', imageHeight + 'px');
        dojo.style(elemId + '_imageviewerPrevNextContainer', 'width', imageWidth + 'px')
    }
    imageviewer_gotoImage(elemId, iv.currentIi);
    imageviewer_gotoImage(elemId, iv.currentIi);
};



/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/imageviewer.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_Dialog.js' */

////
//// Modified Dialog dijit which can display alert and confirm like dialogs.
////
if (window.dojo) {
    
    dojo.provide("seitbox.dijit.Dialog");
    
    dojo.require("dijit.Dialog");
    
    dojo.declare(
    	"seitbox.dijit.Dialog",
    	[dijit.Dialog, dijit._Container],
    	{
    		message: "",
    		
    		promptValue: "",
    		
    		isModal: true,
    		
    		type: "",
    		
    		destroyOnClose: false,
    		
    		hasTitleBar: true,
    		
    		postCreate: function(){
    			if (this.message){
    				this.attr("content", this.message + "<br/>");
    			}
    			if (this.type == "alert"){
    				this.addChild(new dijit.form.Button({id: this.id + "ButtonOk", type: "submit", label: this.buttonOk}), "last");
    			}
    			if (this.type == "confirm"){
    				this.addChild(new dijit.form.Button({id: this.id + "ButtonOk", type: "submit", label: this.buttonOk}), "last");
    				this.addChild(new dijit.form.Button({id: this.id + "ButtonCancel", type: "reset", label: this.buttonCancel}), "last");
    				this.connect(dijit.byId(this.id + "ButtonCancel"), "onClick", "_abort");
    			}
                if (this.type == "prompt"){
                    this.addChild(new dijit.form.ValidationTextBox({id: this.id + "TextBox", value: this.promptValue}), "last");
                    this.addChild(new dijit.form.Button({id: this.id + "ButtonOk", type: "submit", label: this.buttonOk}), "last");
                    this.addChild(new dijit.form.Button({id: this.id + "ButtonCancel", type: "reset", label: this.buttonCancel}), "last");
                    this.connect(dijit.byId(this.id + "ButtonCancel"), "onClick", "_abort");
                }
    			if (!this.hasTitleBar){
    				dojo.style(this.titleBar, "display", "none");
    			}
    			if (this.destroyOnClose){
    				this.connect(this, "hide", function(){
    					this.destroyRecursive();
    				});
    			}
    			this.inherited(arguments);
    		},
    		
    		layout: function(){
    			if(this.domNode.style.visibility != "hidden"){
    				this._position();
    				if (this.isModal){
    					dijit._underlay.layout();
    				}
    			}
    		},
    		
    		onShow: function(){
    			dojo.style(this.domNode, {"opacity": 1});
    		},
    		
    		abort: function(){
    		},
    		
    		_abort: function(){
    			this.hide();
    			this.abort();
    		},
    		
    		_setIsModalAttr: function(isModal){
    			this.isModal = isModal;
    		},
    		
    		_setHasTitleBarAttr: function(hasTitleBar){
    			this.hasTitleBar = hasTitleBar;
    			if (hasTitleBar){
    				dojo.style(this.titleBar, "display", "block");
    			}else{
    				dojo.style(this.titleBar, "display", "none");
    			}
    		}
    	}
    );
    
}

/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_Dialog.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_InfoIcon.js' */

////
//// Info icon dijit
////
if (window.dojo) {

    dojo.provide("seitbox.dijit.InfoIcon");
    
    dojo.require("seitbox.dijit.Dialog");
    dojo.require("dijit.Tooltip");
    dojo.require("dijit._Templated");
    
    dojo.declare(
    	"seitbox.dijit.InfoIcon",
    	[dijit._Widget, dijit._Templated],
    	{
    		templateString: '<div class="seitboxDijitInfoIcon dijitInline"></div>',
    		
    		dialogTitle: "INFO",
    		
    		messageTooltip: "",
    		
    		messageDialog: "",
    		
    		href: "",
    		
    		showDelay: 600,
    		
    		_tooltip: null,
    		
    		_dialog: null,
    		
    		_dialogHeight: 0,
    		
    		postCreate: function(){
    			if (this.messageTooltip != ""){
    				this._tooltip = new dijit.Tooltip({
    					connectId: [this.domNode],
    					label: this.messageTooltip,
    					showDelay: this.showDelay
    				});
    			}
    			if (this.messageDialog != ""){
    			    this.connect(this, "onClick", "_showDialog");
    			}
    			this.inherited(arguments);
    		},
    		
    		_createDialog: function(){
    		    if (this._dialog != null) {
    		        return; // already created
    		    }
                //this._dialog = new seitbox.dijit.Dialog({
    		    this._dialog = new dijit.Dialog({
                    title: this.dialogTitle
                });
                if (this.messageDialog){
                    this._dialog.attr("content", this.messageDialog);
                }
                if (this.href){
                    this._dialog.attr("href", this.href);
                }
            },
    		
    		_showDialog: function(){
                this._createDialog();
    			this._dialog.show();
    		}
    	}
    );
    
}


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_InfoIcon.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_Paging.js' */


////
//// Paging dijit, used by PagingViewElement
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.Paging");
    /*dojo.require("dijit.Declaration");*/
    dojo.require("dojo.parser");
    dojo.require("dijit._Widget");
    dojo.require("dijit._Templated");
    dojo.declare(
        "seitbox.dijit.Paging",
        [dijit._Widget, dijit._Templated],
        {       
            // summary: A paging dijit
            //
            // description: A simple paging dijit for navigating between
            //       pages from 1 to n. 
            //
            text: '',
            rowsPerPage: 10,
            numPages: 0,
            numRows: 0,
            currentPageI: 0,
            onChangePage: '',
            templateString: '<div class="seitboxDijitPaging">${text}<div class="seitboxDijitPagingSummary">SUM</div><div class="seitboxDijitPagingLinks">LINKS</div></div>',
            templatePath: null,
            postCreate: function(){
                this.inherited(arguments);
                this.refreshPagingLinks();
            },
            setRowsPerPage: function(rowsPerPage) {
                this.rowsPerPage = rowsPerPage;
                this.refreshPagingLinks();
            },
            setNumRows: function(numRows) {
                this.numRows = numRows;
                var autoPageI = this.currentPageI; 
                while ((autoPageI * this.rowsPerPage) + 1 > numRows && autoPageI > 0) {
                    autoPageI--;
                }
                if (autoPageI != this.currentPageI) {
                    this.setCurrentPageI(autoPageI);
                } else {
                    this.refreshPagingLinks();
                }
            },
            setCurrentPageI: function(currentPageI) {
                this.currentPageI = currentPageI;
                this.refreshPagingLinks();
                var offset = this.currentPageI * this.rowsPerPage;
                var currentPage = currentPageI + 1;
                if (this.onChangePage != null && this.onChangePage != '') {
                    var js = this.onChangePage;
                    js = js.replace(/\${offset}/, offset);
                    js = js.replace(/\${pageI}/, currentPageI);
                    js = js.replace(/\${page}/, currentPage);
                    eval(js);
                } 
            },
            setCurrentPage: function(currentPage) {
                var currentPageI = currentPage - 1;
                this.setCurrentPageI(currentPageI);
            },
            refreshPagingLinks: function() {
                var currentPageN = this.currentPageI + 1;
                var numPages = Math.ceil(this.numRows / this.rowsPerPage);
                this.numPages = numPages;
                // generate paging links
                var pagingLinks = '';
                for(var pageI=0; pageI<numPages; pageI++) {
                    // insert '...' before current page
                    if (pageI >= 3 && pageI < this.currentPageI - 3) {
                        pagingLinks += ' ... ';
                        pageI = this.currentPageI - 3 - 1;
                        continue;
                    }
                    // insert '...' after current page
                    if (pageI < numPages - 3 && pageI > this.currentPageI + 3) {
                        pagingLinks += ' ... ';
                        pageI = numPages - 3 - 1;
                        continue;
                    } 
                    // render paging links
                    var pageN = pageI + 1;
                    pagingLinks += '<a class="seitboxDijitPagingLink'+(this.currentPageI==pageI ? ' seitboxDijitPagingLinkSelected' : '')+'" href="#page'+pageN+'" onclick="'+this.id+'.setCurrentPageI('+pageI+'); return false;">'+pageN+'</a> ';
                }
                // update paging links
                var pagingLinksContainers = dojo.query('div.seitboxDijitPagingLinks', this.domNode);
                dojo.forEach(pagingLinksContainers, function(elem){
                    elem.innerHTML = pagingLinks;
                });
                // update summary
                var summaryContainers = dojo.query('div.seitboxDijitPagingSummary', this.domNode);
                dojo.forEach(summaryContainers, function(elem){
                    elem.innerHTML = 'Seite ' + currentPageN + '/' + numPages;
                });
            }
        }  
    );
}

/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_Paging.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_PersistTitlePane.js' */


////
//// PersistTitlePane dijit
////
//// A title pane which supports the parameter 'persist' and stores the current
//// open state in a cookie if persist is set to true.
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.PersistTitlePane");
    dojo.require("dijit.TitlePane");
    dojo.declare(
        "seitbox.dijit.PersistTitlePane",
        [dijit.TitlePane],
        {
            persist: 'true',
            postCreate: function(){
                // restore open state
                if (this.persist == "true") {
                    var cValue = dojo.cookie("seitbox.dijit.PersistTitlePane." + this.id);
                    if (cValue) {
                        console.log("RESTORE", this.open, cValue);
                        if (cValue == 'closed') {
                            this.open = false;
                        }
                        if (cValue == 'opened') {
                            this.open = true;
                        }
                    }
                }
                // call inherited
                this.inherited(arguments);
            },
            toggle: function(){
                this.inherited(arguments);
                // save open state
                if (this.persist == "true") {
                    var state = "closed";
                    if (this.open) {
                        state = "opened";
                    }
                    dojo.cookie("seitbox.dijit.PersistTitlePane." + this.id, state, {path:'/'});
                }
            }
        }  
    );
}


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_PersistTitlePane.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_SwTooltip.js' */

////
//// SwTooltip dijit, providing a tooltip which can contain links, which will not hide itself when moving the mouse over it
////
if (window.dojo) {
    
    dojo.provide("seitbox.dijit.SwTooltip");
    dojo.require("dijit.Tooltip");
    
    dojo.declare(
    	"seitbox.dijit.SwTooltip",
    	dijit.Tooltip,
    	{
    		hideDelay: 1000,
    		
            postCreate: function(){
                // call parent method
                this.inherited(arguments);
            },
    		
    		
            _onHover: function(/*Event*/ e){
                // summary:
                //      Despite the name of this method, it actually handles both hover and focus
                //      events on the target node, setting a timer to show the tooltip.
                // tags:
                //      private
                // handle masterTT connects
                if(!dijit._masterTT){
                    dijit._masterTT = new dijit._MasterTooltip();
                }
                // - remove old masterTT connects (created by another SwTooltip dijit)
                if (dijit._masterTT._swTooltipOnMouseEnterConnect) {
                    dojo.disconnect(dijit._masterTT._swTooltipOnMouseEnterConnect);
                    delete dijit._masterTT._swTooltipOnMouseEnterConnect;
                }
                if (dijit._masterTT._swTooltipOnMouseLeaveConnect) {
                    dojo.disconnect(dijit._masterTT._swTooltipOnMouseLeaveConnect);
                    delete dijit._masterTT._swTooltipOnMouseLeaveConnect;
                }
                // - create masterTT connects
                dijit._masterTT._swTooltipOnMouseEnterConnect = dojo.connect(dijit._masterTT, "onMouseEnter", this, function(){
                    if (this._hideTimer){
                        window.clearTimeout(this._hideTimer);
                        delete this._hideTimer;
                    }
                });
                dijit._masterTT._swTooltipOnMouseLeaveConnect = dojo.connect(dijit._masterTT, "onMouseLeave", this, function(){
                    this._onUnHover(null);
                });
                // - show tooltip
                if (this._hideTimer){
                    window.clearTimeout(this._hideTimer);
                    delete this._hideTimer;
                }
                if(!this._showTimer){
                    var target = e.target;
                    this._showTimer = setTimeout(dojo.hitch(this, function(){this.open(target)}), this.showDelay);
                }
            },

            _onUnHover: function(/*Event*/ e){
                // summary:
                //      Despite the name of this method, it actually handles both mouseleave and blur
                //      events on the target node, hiding the tooltip.
                // tags:
                //      private

                // keep a tooltip open if the associated element still has focus (even though the
                // mouse moved away)
                if(this._focus){ return; }

                if (this._hideTimer){
                    window.clearTimeout(this._hideTimer);
                    delete this._hideTimer;
                }

                this._hideTimer = window.setTimeout(dojo.hitch(this, function() {
                    this._onUnHoverReal();
                }), this.hideDelay);
            },

            _onUnHoverReal: function(/*Event*/ e){
                // summary:
                //      Despite the name of this method, it actually handles both mouseleave and blur
                //      events on the target node, hiding the tooltip.
                // tags:
                //      private

                // keep a tooltip open if the associated element still has focus (even though the
                // mouse moved away)
                if(this._focus){ return; }

                if(this._showTimer){
                    clearTimeout(this._showTimer);
                    delete this._showTimer;
                }
                this.close();
            }
    		
    	}
    );
    
}

/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_SwTooltip.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_DndFile.js' */


////
//// DndFile dijit
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.form.DndFile");
    /*dojo.require("dijit.Declaration");*/
    dojo.require("dojo.parser");
    dojo.require("dijit._Widget");
    dojo.require("dijit._Templated");
    dojo.declare(
	    "seitbox.dijit.form.DndFile",
	    [dijit._Widget, dijit._Templated],
	    {	    
            // summary: A dnd file drop area
            //
            // description: A dnd file drop area which can be used like a standard form field.
            //
	    	name: '',
			value: '',
            templateString: '<div class="seitboxDijitDndFile dijitInlineTable"><input type="hidden" id="${id}_input" name="${name}" value="${value}" /><div dojoType="dojo.dnd.Source" accept="dndfile" id="${id}_dnd" jsId="${id}_dnd" class="dndContainer backenddndtarget"></div><div dojoType="dojo.dnd.Source" accept="dndfile" id="${id}_trash" jsId="${id}_trash" class="dndContainer backenddndtrash"></div></div>',
            templatePath: null,
            _content: null,
            postCreate: function(){
	    		dojo.parser.parse(this.id);
	    		this._initCreator();
	    		this._setValue(this.value);
	    		dojo.connect(eval(this.id + '_dnd'), 'onDropExternal', dojo.hitch(this, function(evt){
	    			var newValue = '';
	    			if (evt.getSelectedNodes) {
		    			var selectedNodes = evt.getSelectedNodes();
		    			if (selectedNodes && selectedNodes.length) {
			                if (selectedNodes.length > 0) {
			                	selectedNode = selectedNodes[0];
			                    if (selectedNode.href && selectedNode.href != ''){
			                    	newValue = selectedNode.href;
			                    } else {
			                        selectedNodeLinks = dojo.query('a', selectedNode);
			                        if (selectedNodeLinks[0] && selectedNodeLinks[0].href && selectedNodeLinks[0].href != '') {
			                            newValue = selectedNodeLinks[0].href;
			                        }
			                    }
			                }
		    			}
	    			}
	                this._setValue(newValue);
	    		}));
	    		dojo.connect(eval(this.id + '_trash'), 'onDropExternal', dojo.hitch(this, function(evt){
	    			var newValue = '';
	    			this._setValue(newValue);
	    		}));	
	    	},
	    	_initCreator: function() {
	    		var dndSource = eval(this.id + '_dnd');
	    		dndSource.creator = this._creator;
	    		var dndTrash = eval(this.id + '_trash');
	    		dndTrash.creator = this._creator;
	    	},
	    	_creator: function(item, hint) {
				var type = ["dndfile"];
				var val = item.href;
				var node = dojo.doc.createElement("a");
				//node.id = dojo.dnd.getUniqueId(); // DON'T SET AN ID, THIS WILL NOT WORK WHEN LATER DRAGGING THE DROPPED ITEM TO TRASH
				node.href = val;
				node.alt = val;
				node.title = val;
				node.innerHTML = val;
				dojo.addClass(node, "dojoDndItem");
				dojo.addClass(node, "dndfile");
				return {node: node, data: item, type: type};
	    	},
	    	_setValue: function(val) {
	    		var dndSource = eval(this.id + '_dnd');
	    		val = this._filterValue(val);
	    		// remove all nodes
	    		dndSource.selectAll();
	    		dndSource.deleteSelectedNodes();
	    		// insert new node
	    		if (val != '') {
		    		var newItem = {href:val};
		    		dndSource.insertNodes(false, [newItem]);
	    		}
	    		// set input value
	    		dojo.byId(this.id + '_input').value = val;
	    		this.value = val;
	    	},
	    	_filterValue: function(val) {
	    		val = new String(val);
	    		var beginIndex = val.indexOf('/media/');
	    		if (beginIndex != -1){
	    			val = val.substr(beginIndex);
	    		}
	    		return val;
	    	}
	    }  
    );
}

/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_DndFile.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_DndFileMulti.js' */


////
//// DndFile dijit
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.form.DndFileMulti");
    /*dojo.require("dijit.Declaration");*/
    dojo.require("dojo.parser");
    dojo.require("dijit._Widget");
    dojo.require("dijit._Templated");
    dojo.declare(
	    "seitbox.dijit.form.DndFileMulti",
	    [dijit._Widget, dijit._Templated],
	    {	    
            // summary: A dnd file drop area
            //
            // description: A dnd file drop area which can be used like a standard form field.
            //
	    	name: '',
			value: '',
            templateString: '<div class="seitboxDijitDndFileMulti dijitInlineTable"><input type="hidden" id="${id}_input" name="${name}" value="${value}" /><div dojoType="dojo.dnd.Source" accept="dndfile" id="${id}_dnd" jsId="${id}_dnd" class="dndContainer backenddndtarget"></div><div dojoType="dojo.dnd.Source" accept="dndfile" id="${id}_trash" jsId="${id}_trash" class="dndContainer backenddndtrash"></div></div>',
            templatePath: null,
            _content: null,
            postCreate: function(){
                this._initContent();
                dojo.parser.parse(this.id);
                dojo.connect(eval(this.id + '_dnd'), 'onDropInternal', dojo.hitch(this, function(evt){
                    this._updateValue();
                }));
                dojo.connect(eval(this.id + '_dnd'), 'onDropExternal', dojo.hitch(this, function(evt){
                    this._updateValue();
                }));
                dojo.connect(eval(this.id + '_trash'), 'onDropExternal', dojo.hitch(this, function(evt){
                    this._updateValue();
                }));
	    	},
            _initContent: function(){
                var newContent = '';
                var value = this.value;
                var files = value.split(",");
                for(var i=0; i<files.length; i++) {
                    var fileHref = files[i];
                    if (fileHref && fileHref != '') {
                        newContent += '<a href="' + fileHref + '" class="dojoDndItem dndfile" dndType="dndfile">' + fileHref + '</a>';
                    }
                }
                dojo.byId(this.id+'_dnd').innerHTML = newContent;
            },
            _updateValue: function() {
                var newValue = '';
                var inputElem = dojo.byId(this.id + '_input');
                var containerElem = document.getElementById(this.id + '_dnd');
                var containerFiles = dojo.query("a", containerElem);
                for(var i=0; i<containerFiles.length; i++) {
                    var fileNode = containerFiles[i];
                    if (fileNode.href && fileNode.href != '') {
                        if (newValue != '') {
                            newValue += ',';
                        }
                        newValue += this._filterValue(fileNode.href);
                    }
                }
                inputElem.value = newValue;
                this.value = newValue;
                // update dnd container innerHtml
                this._initContent();
                // call sync
                eval(this.id + '_dnd').sync();
            },
            _filterValue: function(val) {
                val = new String(val);
                var beginIndex = val.indexOf('/media/');
                if (beginIndex != -1){
                    val = val.substr(beginIndex);
                }
                return val;
            }
	    }  
    );
}

/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_DndFileMulti.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_DndImage.js' */


////
//// DndImage dijit
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.form.DndImage");
    /*dojo.require("dijit.Declaration");*/
    dojo.require("dojo.parser");
    dojo.require("dijit._Widget");
    dojo.require("dijit._Templated");
    dojo.declare(
        "seitbox.dijit.form.DndImage",
        [dijit._Widget, dijit._Templated],
        {       
            // summary: A dnd image drop area for an image
            //
            // description: A dnd image drop area which can be used like a standard form field
            //
            name: '',
            value: '',
            content: '',
            templateString: '<div class="seitboxDijitDndImage dijitInlineTable"><input type="hidden" id="${id}_input" name="${name}" value="${value}" /><div dojoType="dojo.dnd.Source" accept="dndimg" id="${id}_dnd" jsId="${id}_dnd" class="dndContainer backenddndtarget"></div><div dojoType="dojo.dnd.Source" accept="dndimg" id="${id}_trash" jsId="${id}_trash" class="dndContainer backenddndtrash"></div></div>',
            templatePath: null,
            postCreate: function(){
                this._initContent();
                dojo.parser.parse(this.id);
                dojo.connect(eval(this.id + '_dnd'), 'onDropInternal', dojo.hitch(this, function(evt){
                    this._updateValue();
                }));
                dojo.connect(eval(this.id + '_dnd'), 'onDropExternal', dojo.hitch(this, function(evt){
                    this._updateValue();
                }));
                dojo.connect(eval(this.id + '_trash'), 'onDropExternal', dojo.hitch(this, function(evt){
                    this._updateValue();
                }));
                dojo.connect(dojo.byId(this.id+'_dnd'), 'ondblclick', dojo.hitch(this, function(evt){
                    this._openImageProperties(evt);
                }));
                dojo.connect(dojo.byId(this.id+'_dnd'), 'oncontextmenu', dojo.hitch(this, function(evt){
                    this._openMenu(evt);
                }));
            },      
            _initContent: function(){
                var newContent = '';
                var value = this.value;
                var imgSrc = value;
                if (imgSrc && imgSrc != '') {
                    newContent += '<img src="' + imgSrc + '" class="dojoDndItem dndimg" dndType="dndimg" alt="Image" border="0" />';
                }
                dojo.byId(this.id+'_dnd').innerHTML = newContent;
            },
            _updateValue: function() {
                var inputElem = dojo.byId(this.id + '_input');
                var containerElem = document.getElementById(this.id + '_dnd');
                var containerImages = dojo.query("img", containerElem);
                if (containerImages.length == 0) {
                    var newValue = '';
                    inputElem.value = newValue;
                    this.value = newValue;
                } else {
                    var oldValue = this.value;
                    for(var i=0; i<containerImages.length; i++) {
                        var imgNode = containerImages[i];
                        if (imgNode.src && imgNode.src != '') {
                            var isDndimgThumb = dojo.hasClass(imgNode, 'dndimgThumb');
                            var newValue = this._filterValue(imgNode.src, isDndimgThumb);
                            if (newValue != oldValue) { // only accept new values (this way it is possible to replace existing images, by dropping a new image before or after the existing image)
                                inputElem.value = newValue;
                                this.value = newValue;
                            }
                        }
                    }
                }
                // update dnd container innerHtml
                this._initContent();
                // call sync
                eval(this.id + '_dnd').sync();
            },
            _filterValue: function(val, isDndimgThumb) {
                val = new String(val);
                var beginIndex = val.indexOf('/media/');
                if (beginIndex != -1){
                    val = val.substr(beginIndex);
                }
                if (isDndimgThumb) { // filter away _image_scaler_ if this is a thumbnail 
                    var endIndex = val.indexOf('_image_scaler_');
                    if (endIndex != -1){
                        val = val.substr(0, endIndex);
                    }
                }
                return val;
            },
            _openImageProperties: function(e) {
                if (!e.target || (!dojo.hasClass(e.target, 'dndimgThumb') && !dojo.hasClass(e.target, 'dndimg'))) {
                    return;
                } else {
                    var imgSrc = backend_media_normalizeImagePath(e.target.src);
                    backend_media_showImagesPopupProperties(imgSrc);
                }
            },
            _openMenu: function(evt) {
                var imgContextMenu = dijit.byId('imgContextMenuForDndImage');
                if (imgContextMenu) {
                    imgContextMenu._openMyself(evt);
                }
            }           
        }  
    );
}

/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_DndImage.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_DndImageMulti.js' */


////
//// DndImageMulti dijit
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.form.DndImageMulti");
    /*dojo.require("dijit.Declaration");*/
    dojo.require("dojo.parser");
    dojo.require("dijit._Widget");
    dojo.require("dijit._Templated");
    dojo.declare(
	    "seitbox.dijit.form.DndImageMulti",
	    [dijit._Widget, dijit._Templated],
	    {	    
            // summary: A dnd image drop area for multiple images
            //
            // description: A dnd image drop area which can be used like a standard form field and supports multiple images.
            //
	    	name: '',
			value: '',
			content: '',
            templateString: '<div class="seitboxDijitDndImageMulti dijitInlineTable"><input type="hidden" id="${id}_input" name="${name}" value="${value}" /><div dojoType="dojo.dnd.Source" accept="dndimg" id="${id}_dnd" jsId="${id}_dnd" class="dndContainer backenddndtarget"></div><div dojoType="dojo.dnd.Source" accept="dndimg" id="${id}_trash" jsId="${id}_trash" class="dndContainer backenddndtrash"></div></div>',
            templatePath: null,
            postCreate: function(){
	    		this._initContent();
	    		dojo.parser.parse(this.id);
	    		dojo.connect(eval(this.id + '_dnd'), 'onDropInternal', dojo.hitch(this, function(evt){
	    			this._updateValue();
	    		}));
	    		dojo.connect(eval(this.id + '_dnd'), 'onDropExternal', dojo.hitch(this, function(evt){
	    			this._updateValue();
	    		}));
	    		dojo.connect(eval(this.id + '_trash'), 'onDropExternal', dojo.hitch(this, function(evt){
	    			this._updateValue();
	    		}));
                dojo.connect(dojo.byId(this.id+'_dnd'), 'ondblclick', dojo.hitch(this, function(evt){
                    this._openImageProperties(evt);
                }));	    		
                dojo.connect(dojo.byId(this.id+'_dnd'), 'oncontextmenu', dojo.hitch(this, function(evt){
                    this._openMenu(evt);
                }));
	    	},   	
	    	_initContent: function(){
	    		var newContent = '';
	    		var value = this.value;
	    		var images = value.split(",");
	    		for(var i=0; i<images.length; i++) {
	    			var imgSrc = images[i];
	    			if (imgSrc && imgSrc != '') {
	    				newContent += '<img src="' + imgSrc + '" class="dojoDndItem dndimg" dndType="dndimg" alt="Image" border="0" />';
	    			}
	    		}
	    		dojo.byId(this.id+'_dnd').innerHTML = newContent;
	    	},
	    	_updateValue: function() {
	    		var newValue = '';
	    		var inputElem = dojo.byId(this.id + '_input');
	            var containerElem = document.getElementById(this.id + '_dnd');
	            var containerImages = dojo.query("img", containerElem);
	            for(var i=0; i<containerImages.length; i++) {
	                var imgNode = containerImages[i];
	                if (imgNode.src && imgNode.src != '') {
	                    if (newValue != '') {
	                        newValue += ',';
	                    }
	                    var isDndimgThumb = dojo.hasClass(imgNode, 'dndimgThumb');
	                    newValue += this._filterValue(imgNode.src, isDndimgThumb);
	                }
	            }
	    		inputElem.value = newValue;
	    		this.value = newValue;
	    		// update dnd container innerHtml
	    		this._initContent();
	    		// call sync
	    		eval(this.id + '_dnd').sync();
	    	},
	    	_filterValue: function(val, isDndimgThumb) {
	    		val = new String(val);
	    		var beginIndex = val.indexOf('/media/');
	    		if (beginIndex != -1){
	    			val = val.substr(beginIndex);
	    		}
	    		if (isDndimgThumb) { // filter away _image_scaler_ if this is a thumbnail 
    	    		var endIndex = val.indexOf('_image_scaler_');
                    if (endIndex != -1){
                        val = val.substr(0, endIndex);
                    }
	    		}
	    		return val;
	    	},
	    	_openImageProperties: function(e) {
                if (!e.target || (!dojo.hasClass(e.target, 'dndimgThumb') && !dojo.hasClass(e.target, 'dndimg'))) {
                    return;
                } else {
                    var imgSrc = backend_media_normalizeImagePath(e.target.src);
                    backend_media_showImagesPopupProperties(imgSrc);
                }
	    	},
            _openMenu: function(evt) {
                var imgContextMenu = dijit.byId('imgContextMenuForDndImage');
                if (imgContextMenu) {
                    imgContextMenu._openMyself(evt);
                }
            }	    	
	    }  
    );
}

/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_DndImageMulti.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_SlickCheckBox.js' */


////
//// SlickCheckBox dijit
////
//// A checkbox which supports the parameters 'checkedValue' and 'uncheckedValue' and posts
//// one of this values to the server, depending on it's current state.
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.form.SlickCheckBox");
    dojo.require("dijit.form.CheckBox");
    dojo.declare(
        "seitbox.dijit.form.SlickCheckBox",
        [dijit.form.CheckBox],
        {
            checkedValue: '1',
            uncheckedValue: '0',
            _currentValue: null,
            _uncheckedHiddenField: null,
            postMixInProperties: function(){
                // store current value and set value to checked value
                this._currentValue = this.value;
                this.value = this.checkedValue;
                // set checked state from current value
                if (this._currentValue == this.checkedValue) {
                    this.checked = true;
                } else {
                    this.checked = false;
                    //this._createUncheckedHiddenField(); --> will be done in postCreate()! This is too early!!
                }
                // call inherited
                this.inherited(arguments);
            },
            postCreate: function(){
                this.inherited(arguments);
                if(!this.checked){
                    this._createUncheckedHiddenField();
                }
            },
            _setCheckedAttr: function(){
                this.inherited(arguments);
                if (!this.checked) {
                    this._createUncheckedHiddenField();
                } else {
                    this._removeUncheckedHiddenField();
                }
            },
            _createUncheckedHiddenField: function() {
                this._uncheckedHiddenField = dojo.doc.createElement("input");
                dojo.attr(this._uncheckedHiddenField, "type", "hidden");
                dojo.attr(this._uncheckedHiddenField, "name", this.name);
                dojo.attr(this._uncheckedHiddenField, "value", this.uncheckedValue);
                if (!this.domNode) {
                    alert("seitbox.dijit.form.SlickCheckBox: Could not place unchecked hidden field before domNode, domNode not found.");
                }
                dojo.place(this._uncheckedHiddenField, this.domNode, "before");
            },
            _removeUncheckedHiddenField: function() {
                if (this._uncheckedHiddenField != null) {
                    this._uncheckedHiddenField.parentNode.removeChild(this._uncheckedHiddenField);
                    this._uncheckedHiddenField = null;
                }
            }
        }  
    );
}


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_SlickCheckBox.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_SlickRadioButton.js' */


////
//// SlickRadioButton dijit
////
//// A checkbox which supports the parameters 'checkedValue' and 'uncheckedValue' and posts
//// one of this values to the server, depending on it's current state.
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.form.SlickRadioButton");
    dojo.require("dijit.form.RadioButton");
    dojo.declare(
        "seitbox.dijit.form.SlickRadioButton",
        [dijit.form.RadioButton],
        {
            checkedValue: '1',
            uncheckedValue: '0',
            _currentValue: null,
            _uncheckedHiddenField: null,
            postMixInProperties: function(){
                // store current value and set value to checked value
                this._currentValue = this.value;
                this.value = this.checkedValue;
                // set checked state from current value
                if (this._currentValue == this.checkedValue) {
                    this.checked = true;
                } else {
                    this.checked = false;
                    //this._createUncheckedHiddenField(); --> will be done in postCreate()! This is too early!!
                }
                // call inherited
                this.inherited(arguments);
            },
            postCreate: function(){
                this.inherited(arguments);
                if(!this.checked){
                    this._createUncheckedHiddenField();
                }
            },
            _setCheckedAttr: function(){
                this.inherited(arguments);
                if (!this.checked) {
                    this._createUncheckedHiddenField();
                } else {
                    this._removeUncheckedHiddenField();
                }
            },
            _createUncheckedHiddenField: function() {
                this._uncheckedHiddenField = dojo.doc.createElement("input");
                dojo.attr(this._uncheckedHiddenField, "type", "hidden");
                dojo.attr(this._uncheckedHiddenField, "name", this.name);
                dojo.attr(this._uncheckedHiddenField, "value", this.uncheckedValue);
                if (!this.domNode) {
                    alert("seitbox.dijit.form.SlickRadioButton: Could not place unchecked hidden field before domNode, domNode not found.");
                }
                dojo.place(this._uncheckedHiddenField, this.domNode, "before");
            },
            _removeUncheckedHiddenField: function() {
                if (this._uncheckedHiddenField != null) {
                    this._uncheckedHiddenField.parentNode.removeChild(this._uncheckedHiddenField);
                    this._uncheckedHiddenField = null;
                }
            }
        }  
    );
}


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_SlickRadioButton.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_ValidationCheckBox.js' */


////
//// ValidationCheckBox dijit
////
//// A checkbox which supports the parameters 'checkedValue' and 'uncheckedValue' and posts
//// one of this values to the server, depending on it's current state.
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.form.ValidationCheckBox");
    dojo.require("seitbox.dijit.form.SlickCheckBox");
    dojo.declare(
        "seitbox.dijit.form.ValidationCheckBox",
        [seitbox.dijit.form.SlickCheckBox],
        {
            required: false,
            validate: function(/*Boolean*/ isFocused){
                //alert("validate");
                if (this.required && !this.checked) {
                    dojo.addClass(this.domNode, "dijitCheckBoxRequired");
                    return false;
                }
                dojo.removeClass(this.domNode, "dijitCheckBoxRequired");
                return true;
            },
            postCreate: function(){
                this.inherited(arguments);
                dojo.removeClass(this.domNode, "dijitCheckBoxRequired");
            },            
            _setCheckedAttr: function(){
                this.inherited(arguments);
                dojo.removeClass(this.domNode, "dijitCheckBoxRequired");
            }            
        }  
    );
}


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_ValidationCheckBox.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_ValidationTextBox.js' */

////
//// ValidationTextBox dijit
////
//// A validation text box, that also shows the invalid message if the text box is currently empty and focused.
////
if (window.dojo) {
    dojo.provide("seitbox.dijit.form.ValidationTextBox");
    dojo.require("dijit.form.ValidationTextBox");
    dojo.declare(
        "seitbox.dijit.form.ValidationTextBox",
        [dijit.form.ValidationTextBox],
        {
        
            validate: function(/*Boolean*/ isFocused){
                // summary:
                //      Called by oninit, onblur, and onkeypress.
                // description:
                //      Show missing or invalid messages if appropriate, and highlight textbox field.
                // tags:
                //      protected
                var message = "";
                var isValid = this.disabled || this.isValid(isFocused);
                if(isValid){ this._maskValidSubsetError = true; }
                var isValidSubset = !isValid && isFocused && this._isValidSubset();
                var isEmpty = this._isEmpty(this.textbox.value);
                if(isEmpty){ this._maskValidSubsetError = true; }
                if(isEmpty && this.required) { // added by seitwerk
                    this._maskValidSubsetError = false;
                }
                this.state = (isValid || (!this._hasBeenBlurred && isEmpty) || isValidSubset) ? "" : "Error";
                if(this.state == "Error"){ this._maskValidSubsetError = false; }
                this._setStateClass();
                dijit.setWaiState(this.focusNode, "invalid", isValid ? "false" : "true");
                if(isFocused){
                    if(isEmpty){
                        message = this.getPromptMessage(true);
                    }
                    if(!message && (this.state == "Error" || (isValidSubset && !this._maskValidSubsetError))){
                        message = this.getErrorMessage(true);
                    }
                }
                /*
                if ((!message || message == "") && isEmpty && this.required) { // added by seitwerk, we want to have an error message for empty text boxes
                    console.log("xx");
                    message = "fffffhallo";
                }
                */
                this.displayMessage(message);
                return isValid;
            },
            
            displayMessage: function(/*String*/ message){
                // summary:
                //      Overridable method to display validation errors/hints.
                //      By default uses a tooltip.
                // tags:
                //      extension
                if(this._message == message){ return; }
                this._message = message;
                dijit.hideTooltip(this.domNode);
                if(message){
                    dijit.showTooltip(message, this.domNode, this.tooltipPosition);
                }
            }

        }
    );
}

/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dijit_form_ValidationTextBox.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dojox_image_LightboxNanoMultiMedia.js' */


////
//// LightboxNanoMultiMedia
////
//// A modified version of LightboxNano which supports multiple media types, like .swf or .flv.
////
if (window.dojo) {
    
    if(!dojo._hasResource["seitbox.dojox.image.LightboxNanoMultiMedia"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
        dojo._hasResource["seitbox.dojox.image.LightboxNanoMultiMedia"] = true;
        dojo.provide("seitbox.dojox.image.LightboxNanoMultiMedia");
        dojo.require("dojo.fx");

        (function(d){

            var getViewport = function(){
                    //  summary: Returns the dimensions and scroll position of the viewable area of a browser window
                    var scrollRoot = (d.doc.compatMode == "BackCompat") ? d.body() : d.doc.documentElement,
                        scroll = dojo._docScroll();
                    return { w: scrollRoot.clientWidth, h: scrollRoot.clientHeight, l: scroll.x, t: scroll.y };
                };
                
            var abs = "absolute";
    
            d.declare("seitbox.dojox.image.LightboxNanoMultiMedia", null, {
                //  summary:
                //      A simple "nano" version of the lightbox. 
                //
                //  description:
                //      Very lightweight lightbox which only displays a larger image.  There is
                //      no support for a caption or description.  The lightbox can be closed by
                //      clicking any where or pressing any key.  This widget is intended to be
                //      used on <a> and <img> tags.  Upon creation, if the domNode is <img> tag,
                //      then it is wrapped in an <a> tag, then a <div class="enlarge"> is placed
                //      inside the <a> and can be styled to display an icon that the original
                //      can be enlarged.
                //
                //  example:
                //  |   <a dojoType="seitbox.dojox.image.LightboxNanoMultiMedia" href="/path/to/largeimage.jpg"><img src="/path/to/thumbnail.jpg"></a>
                //
                //  example:
                //  |   <img dojoType="seitbox.dojox.image.LightboxNanoMultiMedia" src="/path/to/thumbnail.jpg" href="/path/to/largeimage.jpg">
    
                //  href: string
                //      URL to the large image to show in the lightbox.
                href: "",
    
                //  duration: int
                //      The delay in milliseconds of the LightboxNano open and close animation.
                duration: 500,
    
                //  preloadDelay: int
                //      The delay in milliseconds after the LightboxNano is created before preloading the larger image.
                preloadDelay: 5000,
    
                constructor: function(p, n){
                    // summary: Initializes the DOM node and connect onload event
                    var _this = this;
    
                    d.mixin(_this, p);
                    n = dojo.byId(n);
    
                    if(!/a/i.test(n.tagName)){
                        var a = d.create("a", { href: _this.href, "class": n.className }, n, "after");
                        n.className = "";
                        a.appendChild(n);
                        n = a;
                    }
    
                    d.style(n, {
                        display: "block",
                        position: "relative"
                    });
                    _this._createDiv("dojoxEnlarge", n);
    
                    _this._node = n;
                    d.setSelectable(n, false);
                    _this._onClickEvt = d.connect(n, "onclick", _this, "_load");
    
                    setTimeout(function(){
                        (new Image()).src = _this.href;
                        _this._hideLoading();
                    }, _this.preloadDelay);
                },
    
                destroy: function(){
                    // summary: Destroys the LightboxNano and it's DOM node
                    var a = this._connects || [];
                    a.push(this._onClickEvt);
                    d.forEach(a, d.disconnect);
                    d.destroy(this._node);
                },
    
                _createDiv: function(/*String*/cssClass, /*DomNode*/refNode, /*boolean*/display){
                    // summary: Creates a div for the enlarge icon and loading indicator layers
                    return d.create("div", { "class": cssClass, style: { position: abs, display: display ? "" : "none" } }, refNode); // DomNode
                },
                
                _load: function(/*Event*/e){
                    // summary: Creates the large image and begins to show it
                    var _this = this;
    
                    d.stopEvent(e);
    
                    if(!_this._loading){
                        _this._loading = true;
                        _this._reset();
    
                        var n = d.query("img", _this._node)[0],
                            a = d._abs(n, true),
                            c = d.contentBox(n),
                            b = d._getBorderExtents(n),
                            m = _this._createMediaNode(),
                            ln = _this._loadingNode;
    
                        if(ln == null){
                            _this._loadingNode = ln = _this._createDiv("dojoxLoading", _this._node, true)
                            var l = d.marginBox(ln);
                            d.style(ln, {
                                left: parseInt((c.w - l.w) / 2) + "px",
                                top: parseInt((c.h - l.h) / 2) + "px"
                            });
                        }
    
                        c.x = a.x - 10 + b.l;
                        c.y = a.y - 10 + b.t;
                        _this._start = c;
    
                        _this._connects = [d.connect(m, "onload", _this, "_show")];
    
                        _this._loadMedia();
                    }
                },
                
                _createMediaNode: function() {
                    var _this = this;
                    _this._mediaNode = d.create("img", {
                        style: {
                            visibility: "hidden",
                            cursor: "pointer",
                            position: abs,
                            top: 0,
                            left: 0,
                            zIndex: 9999999
                        }
                    }, d.body());
                    return _this._mediaNode;
                },
                
                _loadMedia: function() {
                    var _this = this;
                    _this._mediaNode.src = _this.href;
                },
    
                _hideLoading: function(){
                    // summary: Hides the animated loading indicator
                    if(this._loadingNode){
                        d.style(this._loadingNode, "display", "none");
                    }
                    this._loadingNode = false;
                },
    
                _show: function(){
                    // summary: The image is now loaded, calculate size and display
                    var _this = this,
                        vp = getViewport(),
                        w = _this._mediaNode.width,
                        h = _this._mediaNode.height,
                        vpw = parseInt((vp.w - 20) * 0.9),
                        vph = parseInt((vp.h - 20) * 0.9),
                        dd = d.doc,
                        bg = _this._bg = d.create("div", {
                            style: {
                                backgroundColor: "#000",
                                opacity: 0.0,
                                position: abs,
                                zIndex: 9999998
                            }
                        }, d.body()),
                        ln = _this._loadingNode;
    
                    if(_this._loadingNode){
                        _this._hideLoading();
                    }
                    d.style(_this._mediaNode, {
                        border: "10px solid #fff",
                        visibility: "visible"
                    });
                    d.style(_this._node, "visibility", "hidden");
    
                    _this._loading = false;
    
                    _this._connects = _this._connects.concat([
                        d.connect(dd, "onmousedown", _this, "_hide"),
                        d.connect(dd, "onkeypress", _this, "_key"),
                        d.connect(window, "onresize", _this, "_sizeBg")
                    ]);
    
                    if(w > vpw){
                        h = h * vpw / w;
                        w = vpw;
                    }
                    if(h > vph){
                        w = w * vph / h;
                        h = vph;
                    }
    
                    _this._end = {
                        x: (vp.w - 20 - w) / 2 + vp.l,
                        y: (vp.h - 20 - h) / 2 + vp.t,
                        w: w,
                        h: h
                    };
    
                    _this._sizeBg();
    
                    d.fx.combine([
                        _this._anim(_this._mediaNode, _this._coords(_this._start, _this._end)),
                        _this._anim(bg, { opacity: 0.5 })
                    ]).play();
                },
    
                _sizeBg: function(){
                    // summary: Resize the background to fill the page
                    var dd = d.doc.documentElement;
                    d.style(this._bg, {
                        top: 0,
                        left: 0,
                        width: dd.scrollWidth + "px",
                        height: dd.scrollHeight + "px"
                    });
                },
    
                _key: function(/*Event*/e){
                    // summary: A key was pressed, so hide the lightbox
                    d.stopEvent(e);
                    this._hide();
                },
    
                _coords: function(/*Object*/s, /*Object*/e){
                    // summary: Returns animation parameters with the start and end coords
                    return {
                        left:   { start: s.x, end: e.x },
                        top:    { start: s.y, end: e.y },
                        width:  { start: s.w, end: e.w },
                        height: { start: s.h, end: e.h }
                    }; // object
                },
    
                _hide: function(){
                    // summary: Closes the lightbox
                    var _this = this;
                    d.forEach(_this._connects, d.disconnect);
                    _this._connects = [];
                    d.fx.combine([
                        _this._anim(_this._mediaNode, _this._coords(_this._end, _this._start), "_reset"),
                        _this._anim(_this._bg, {opacity:0})
                    ]).play();
                },
    
                _reset: function(){
                    // summary: Destroys the lightbox
                    d.style(this._node, "visibility", "visible");
                    d.forEach([this._mediaNode, this._bg], function(n){
                        d.destroy(n);
                        n = null;
                    });
                    this._node.focus();
                },
    
                _anim: function(node, args, onEnd){
                    // summary: Creates the lightbox open/close and background fadein/out animations
                    return d.animateProperty({
                        node: node,
                        duration: this.duration,
                        properties: args,
                        onEnd: onEnd ? d.hitch(this, onEnd) : null
                    }); // object
                }
            });
    
        })(dojo);

    }
    
}
    
    


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/usability/js/seitbox_dojox_image_LightboxNanoMultiMedia.js' */



/* BEGIN OF INCLUDED FILE '/modules/headerimage/js/headerimage.js' */


// Init slideshow if first slide found
if (window.dojo) {
    dojo.addOnLoad(function(){
        if (dojo.byId('headerimageSlide0') && dojo.byId('headerimageSlide1')) { // we need at least two slides
            window.headerimage.startSlideshow();
        }
    });
}

// Create namespace
window.headerimage = new Object();

// Array containing all slide nodes
window.headerimage.DELAY = 6000;  
window.headerimage.DURATION = 750;
window.headerimage.currentOffset = 0;
window.headerimage.allSlides = new Array();

// Start slideshow
window.headerimage.startSlideshow = function() {
	var containerNode = dojo.byId("headerimageSlideshow");
    // find all slides
    window.headerimage.allSlides = dojo.query(".headerimageSlide", containerNode);
    // set the size of all slides to the size of the container, set the z-index
    for(var i=0; i<window.headerimage.allSlides.length; i++) {
    	dojo.style(window.headerimage.allSlides[i], "width", containerNode.offsetWidth+"px");
    	dojo.style(window.headerimage.allSlides[i], "height", containerNode.offsetHeight+"px");
    	dojo.style(window.headerimage.allSlides[i], "zIndex", 8);
    }
    // make all but the first slide transparent
    dojo.style(window.headerimage.allSlides[0], "opacity", 1.0);
    dojo.style(window.headerimage.allSlides[0], "visibility", "visible");
    for(var i=1; i<window.headerimage.allSlides.length; i++) {
        dojo.style(window.headerimage.allSlides[i], "opacity", 0.0);
        dojo.style(window.headerimage.allSlides[i], "visibility", "visible"); // slides are hidden when loading
    }
    // start the slideshow loop
    window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
};

// Skip to next slide
window.headerimage.nextSlide = function() {
    var newOffset = window.headerimage.currentOffset + 1;
    if (newOffset >= window.headerimage.allSlides.length) {
        newOffset = 0;
    }
    window.headerimage.gotoSlide(newOffset);
    // repeat the slideshow loop forever
    window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
};

// Goto given slide
window.headerimage.gotoSlide = function(newOffset) {
    var oldOffset = window.headerimage.currentOffset;
    // set z-indexes
    dojo.style("headerimageSlide"+oldOffset, "zIndex", 8);
    dojo.style("headerimageSlide"+newOffset, "zIndex", 9);
    // fade in new slide and make old slide invisible on end
    var fadeIn = dojo.animateProperty(
    	{
    		node: "headerimageSlide"+newOffset,
    		duration: window.headerimage.DURATION,
    		properties: {
    			opacity: 1.0
    		},
    		onEnd: function() {
    			dojo.style("headerimageSlide"+oldOffset, "opacity", 0.0);
    		}
    	}
    );
    fadeIn.play();
    // set current slide
    window.headerimage.currentOffset = newOffset;
};



/* END OF INCLUDED FILE '/modules/headerimage/js/headerimage.js' */



/* BEGIN OF INCLUDED CUSTOM FILE '/modules/headerimage/js/headerimage_custom.js' */


// Init slideshow if first slide found
if (window.dojo) {
    dojo.addOnLoad(function(){
        if (dojo.byId('headerimageSlide0') && dojo.byId('headerimageSlide1')) { // we need at least two slides
            window.headerimage.startSlideshow();
            loopTimer = window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
        }
    });
}

// Create namespace
window.headerimage = new Object();

// Array containing all slide nodes
window.headerimage.DELAY = 10000;  
window.headerimage.DURATION = 2000;
window.headerimage.currentOffset = 0;
window.headerimage.allSlides = new Array();
loopTimer = 0;

// Start slideshow
window.headerimage.startSlideshow = function() {
	var containerNode = dojo.byId("headerimageSlideshow");
    // find all slides
    window.headerimage.allSlides = dojo.query(".headerimageSlide", containerNode);
    // set the size of all slides to the size of the container, set the z-index
    for(var i=0; i<window.headerimage.allSlides.length; i++) {
    	dojo.style(window.headerimage.allSlides[i], "width", containerNode.offsetWidth+"px");
    	dojo.style(window.headerimage.allSlides[i], "height", containerNode.offsetHeight+"px");
    	dojo.style(window.headerimage.allSlides[i], "zIndex", 8);
    }
    // make all but the first slide transparent
    dojo.style(window.headerimage.allSlides[0], "opacity", 1.0);
    dojo.style(window.headerimage.allSlides[0], "visibility", "visible");
    for(var i=1; i<window.headerimage.allSlides.length; i++) {
        dojo.style(window.headerimage.allSlides[i], "opacity", 0.0);
        dojo.style(window.headerimage.allSlides[i], "visibility", "visible"); // slides are hidden when loading
    }
};

// Skip to next slide
window.headerimage.nextSlide = function() {
	//window.clearTimeout(StartTimer);
    var newOffset = window.headerimage.currentOffset + 1;
    if (newOffset >= window.headerimage.allSlides.length) {
        newOffset = 0;
    }
    window.headerimage.gotoSlide(newOffset);
    // repeat the slideshow loop forever
    if (loopTimer > 0) {
    	window.clearTimeout(loopTimer);
    	loopTimer = window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
    }
};


//Goto given slide
window.headerimage.gotoSlide = function(newOffset) {
    var oldOffset = window.headerimage.currentOffset;
    // set z-indexes
    dojo.style("headerimageSlide"+oldOffset, "zIndex", 8);
    dojo.style("headerimageSlide"+newOffset, "zIndex", 9);
    // fade in new slide and make old slide invisible on end
    var fadeIn = dojo.animateProperty(
    	{
    		node: "headerimageSlide"+newOffset,
    		duration: window.headerimage.DURATION,
    		properties: {
    			opacity: 1.0
    		},
    		onEnd: function() {
    			dojo.style("headerimageSlide"+oldOffset, "opacity", 0.0);
    		}
    	}
    );

    dojo.query(".slice_mini_active").forEach(function(node) {
    	dojo.removeClass(dojo.byId(node), "slice_mini_active");
    });
    
    var slideNode = "minislide_"+newOffset;
    dojo.addClass(dojo.byId(slideNode), "slice_mini_active");
    
    fadeIn.play();
    // set current slide
    window.headerimage.currentOffset = newOffset;
};



window.headerimage.gotoSlideByClick = function(newOffset) {
	// disable loop
	window.clearTimeout(loopTimer);
	loopTimer = 0;
	// restart loop
	loopTimer = window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
	window.headerimage.gotoSlide(newOffset);
}

/* END OF INCLUDED CUSTOM FILE '/modules/headerimage/js/headerimage_custom.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/headerimage/js/headerimage.js' */


// Init slideshow if first slide found
if (window.dojo) {
    dojo.addOnLoad(function(){
        if (dojo.byId('headerimageSlide0') && dojo.byId('headerimageSlide1')) { // we need at least two slides
            window.headerimage.startSlideshow();
        }
    });
}

// Create namespace
window.headerimage = new Object();

// Array containing all slide nodes
window.headerimage.DELAY = 6000;  
window.headerimage.DURATION = 750;
window.headerimage.currentOffset = 0;
window.headerimage.allSlides = new Array();

// Start slideshow
window.headerimage.startSlideshow = function() {
	var containerNode = dojo.byId("headerimageSlideshow");
    // find all slides
    window.headerimage.allSlides = dojo.query(".headerimageSlide", containerNode);
    // set the size of all slides to the size of the container, set the z-index
    for(var i=0; i<window.headerimage.allSlides.length; i++) {
    	dojo.style(window.headerimage.allSlides[i], "width", containerNode.offsetWidth+"px");
    	dojo.style(window.headerimage.allSlides[i], "height", containerNode.offsetHeight+"px");
    	dojo.style(window.headerimage.allSlides[i], "zIndex", 8);
    }
    // make all but the first slide transparent
    dojo.style(window.headerimage.allSlides[0], "opacity", 1.0);
    dojo.style(window.headerimage.allSlides[0], "visibility", "visible");
    for(var i=1; i<window.headerimage.allSlides.length; i++) {
        dojo.style(window.headerimage.allSlides[i], "opacity", 0.0);
        dojo.style(window.headerimage.allSlides[i], "visibility", "visible"); // slides are hidden when loading
    }
    // start the slideshow loop
    window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
};

// Skip to next slide
window.headerimage.nextSlide = function() {
    var newOffset = window.headerimage.currentOffset + 1;
    if (newOffset >= window.headerimage.allSlides.length) {
        newOffset = 0;
    }
    window.headerimage.gotoSlide(newOffset);
    // repeat the slideshow loop forever
    window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
};

// Goto given slide
window.headerimage.gotoSlide = function(newOffset) {
    var oldOffset = window.headerimage.currentOffset;
    // set z-indexes
    dojo.style("headerimageSlide"+oldOffset, "zIndex", 8);
    dojo.style("headerimageSlide"+newOffset, "zIndex", 9);
    // fade in new slide and make old slide invisible on end
    var fadeIn = dojo.animateProperty(
    	{
    		node: "headerimageSlide"+newOffset,
    		duration: window.headerimage.DURATION,
    		properties: {
    			opacity: 1.0
    		},
    		onEnd: function() {
    			dojo.style("headerimageSlide"+oldOffset, "opacity", 0.0);
    		}
    	}
    );
    fadeIn.play();
    // set current slide
    window.headerimage.currentOffset = newOffset;
};



/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/headerimage/js/headerimage.js' */



/* BEGIN OF INCLUDED FILE '/modules/headerimage/js/headerimage.js' */


// Init slideshow if first slide found
if (window.dojo) {
    dojo.addOnLoad(function(){
        if (dojo.byId('headerimageSlide0') && dojo.byId('headerimageSlide1')) { // we need at least two slides
            window.headerimage.startSlideshow();
        }
    });
}

// Create namespace
window.headerimage = new Object();

// Array containing all slide nodes
window.headerimage.DELAY = 6000;  
window.headerimage.DURATION = 750;
window.headerimage.currentOffset = 0;
window.headerimage.allSlides = new Array();

// Start slideshow
window.headerimage.startSlideshow = function() {
	var containerNode = dojo.byId("headerimageSlideshow");
    // find all slides
    window.headerimage.allSlides = dojo.query(".headerimageSlide", containerNode);
    // set the size of all slides to the size of the container, set the z-index
    for(var i=0; i<window.headerimage.allSlides.length; i++) {
    	dojo.style(window.headerimage.allSlides[i], "width", containerNode.offsetWidth+"px");
    	dojo.style(window.headerimage.allSlides[i], "height", containerNode.offsetHeight+"px");
    	dojo.style(window.headerimage.allSlides[i], "zIndex", 8);
    }
    // make all but the first slide transparent
    dojo.style(window.headerimage.allSlides[0], "opacity", 1.0);
    dojo.style(window.headerimage.allSlides[0], "visibility", "visible");
    for(var i=1; i<window.headerimage.allSlides.length; i++) {
        dojo.style(window.headerimage.allSlides[i], "opacity", 0.0);
        dojo.style(window.headerimage.allSlides[i], "visibility", "visible"); // slides are hidden when loading
    }
    // start the slideshow loop
    window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
};

// Skip to next slide
window.headerimage.nextSlide = function() {
    var newOffset = window.headerimage.currentOffset + 1;
    if (newOffset >= window.headerimage.allSlides.length) {
        newOffset = 0;
    }
    window.headerimage.gotoSlide(newOffset);
    // repeat the slideshow loop forever
    window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
};

// Goto given slide
window.headerimage.gotoSlide = function(newOffset) {
    var oldOffset = window.headerimage.currentOffset;
    // set z-indexes
    dojo.style("headerimageSlide"+oldOffset, "zIndex", 8);
    dojo.style("headerimageSlide"+newOffset, "zIndex", 9);
    // fade in new slide and make old slide invisible on end
    var fadeIn = dojo.animateProperty(
    	{
    		node: "headerimageSlide"+newOffset,
    		duration: window.headerimage.DURATION,
    		properties: {
    			opacity: 1.0
    		},
    		onEnd: function() {
    			dojo.style("headerimageSlide"+oldOffset, "opacity", 0.0);
    		}
    	}
    );
    fadeIn.play();
    // set current slide
    window.headerimage.currentOffset = newOffset;
};



/* END OF INCLUDED FILE '/modules/headerimage/js/headerimage.js' */



/* BEGIN OF INCLUDED CUSTOM FILE '/modules/headerimage/js/headerimage_custom.js' */


// Init slideshow if first slide found
if (window.dojo) {
    dojo.addOnLoad(function(){
        if (dojo.byId('headerimageSlide0') && dojo.byId('headerimageSlide1')) { // we need at least two slides
            window.headerimage.startSlideshow();
            loopTimer = window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
        }
    });
}

// Create namespace
window.headerimage = new Object();

// Array containing all slide nodes
window.headerimage.DELAY = 10000;  
window.headerimage.DURATION = 2000;
window.headerimage.currentOffset = 0;
window.headerimage.allSlides = new Array();
loopTimer = 0;

// Start slideshow
window.headerimage.startSlideshow = function() {
	var containerNode = dojo.byId("headerimageSlideshow");
    // find all slides
    window.headerimage.allSlides = dojo.query(".headerimageSlide", containerNode);
    // set the size of all slides to the size of the container, set the z-index
    for(var i=0; i<window.headerimage.allSlides.length; i++) {
    	dojo.style(window.headerimage.allSlides[i], "width", containerNode.offsetWidth+"px");
    	dojo.style(window.headerimage.allSlides[i], "height", containerNode.offsetHeight+"px");
    	dojo.style(window.headerimage.allSlides[i], "zIndex", 8);
    }
    // make all but the first slide transparent
    dojo.style(window.headerimage.allSlides[0], "opacity", 1.0);
    dojo.style(window.headerimage.allSlides[0], "visibility", "visible");
    for(var i=1; i<window.headerimage.allSlides.length; i++) {
        dojo.style(window.headerimage.allSlides[i], "opacity", 0.0);
        dojo.style(window.headerimage.allSlides[i], "visibility", "visible"); // slides are hidden when loading
    }
};

// Skip to next slide
window.headerimage.nextSlide = function() {
	//window.clearTimeout(StartTimer);
    var newOffset = window.headerimage.currentOffset + 1;
    if (newOffset >= window.headerimage.allSlides.length) {
        newOffset = 0;
    }
    window.headerimage.gotoSlide(newOffset);
    // repeat the slideshow loop forever
    if (loopTimer > 0) {
    	window.clearTimeout(loopTimer);
    	loopTimer = window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
    }
};


//Goto given slide
window.headerimage.gotoSlide = function(newOffset) {
    var oldOffset = window.headerimage.currentOffset;
    // set z-indexes
    dojo.style("headerimageSlide"+oldOffset, "zIndex", 8);
    dojo.style("headerimageSlide"+newOffset, "zIndex", 9);
    // fade in new slide and make old slide invisible on end
    var fadeIn = dojo.animateProperty(
    	{
    		node: "headerimageSlide"+newOffset,
    		duration: window.headerimage.DURATION,
    		properties: {
    			opacity: 1.0
    		},
    		onEnd: function() {
    			dojo.style("headerimageSlide"+oldOffset, "opacity", 0.0);
    		}
    	}
    );

    dojo.query(".slice_mini_active").forEach(function(node) {
    	dojo.removeClass(dojo.byId(node), "slice_mini_active");
    });
    
    var slideNode = "minislide_"+newOffset;
    dojo.addClass(dojo.byId(slideNode), "slice_mini_active");
    
    fadeIn.play();
    // set current slide
    window.headerimage.currentOffset = newOffset;
};



window.headerimage.gotoSlideByClick = function(newOffset) {
	// disable loop
	window.clearTimeout(loopTimer);
	loopTimer = 0;
	// restart loop
	loopTimer = window.setTimeout(window.headerimage.nextSlide, window.headerimage.DELAY);
	window.headerimage.gotoSlide(newOffset);
}

/* END OF INCLUDED CUSTOM FILE '/modules/headerimage/js/headerimage_custom.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/fileupload/js/seitbox_dijit_form_FileBrowseDialogButton.js' */

if (window.dojo) {
    dojo.provide("seitbox.dijit.form.FileBrowseDialogButton");
    dojo.require("dijit.form.Button");
    dojo.declare(
        "seitbox.dijit.form.FileBrowseDialogButton",
        [dijit.form.Button],
        {
            
            label: "Browse...",
            multipleFilesAllowed: "false",
            valueFieldElemId: "",
            autoSubmitFormId: "",
            dialog: null,
            
            postCreate: function(){
                // call parent method
                this.inherited(arguments);
            },
            
            onClick: function(/*Event*/ e){
                console.log("seitbox.dijit.form.FileBrowseDialogButton - FileBrowseDialogButton clicked ...");
                this.showDialog();
                return true;
            },
            
            showDialog: function() {
                console.log("seitbox.dijit.form.FileBrowseDialogButton - Showing Dialog ...");
                if (this.dialog == null) {
                    var dialogHref = "/de/fileupload/do/file-browse-dialog.html";
                    if (dialogHref.indexOf("?") == -1) {
                        dialogHref += "?";
                    } else {
                        dialogHref += "&";
                    }
                    dialogHref += "multipleFilesAllowed=" + escape(this.multipleFilesAllowed) + "&valueFieldElemId=" + escape(this.valueFieldElemId) + "&autoSubmitFormId=" + escape(this.autoSubmitFormId) + "&fileBrowseDialogButtonId=" + escape(this.id);
                    this.dialog = new dijit.Dialog({
                        title: "Mediendatenbank durchsuchen",
                        id: this.id + "_dialog",
                        href: dialogHref,
                        style: "width: 950px; height: 550px; overflow: auto;"
                    });
                    this.dialog.fileBrowseDialogButton = this;
                    dojo.connect(this.dialog, "hide", function() {
                        console.log("seitbox.dijit.form.FileBrowseDialogButton - Dialog hide() called, Destoying Dialog ...");
                        this.fileBrowseDialogButton.destroyDialog();
                    }, this.dialog);
                }
                this.dialog.show();
            },
            
            destroyDialog:  function() {
                console.log("seitbox.dijit.form.FileBrowseDialogButton - Destoying Dialog ...");
                if (this.dialog != null) {
                    this.dialog.destroyRecursive();
                    this.dialog = null;
                }
            }         
            
        }
    );
}


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/fileupload/js/seitbox_dijit_form_FileBrowseDialogButton.js' */



/* BEGIN OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/fileupload/js/seitbox_dijit_form_FileUploadDialogButton.js' */

if (window.dojo) {
    dojo.provide("seitbox.dijit.form.FileUploadDialogButton");
    dojo.require("dijit.form.Button");
    dojo.require("dojox.form.Uploader");
    dojo.require("dojox.form.uploader.plugins.HTML5");
    dojo.require("dojox.form.uploader.plugins.Flash");
    dojo.declare(
        "seitbox.dijit.form.FileUploadDialogButton",
        [dijit.form.Button],
        {
            
            label: "Upload...",
            multipleFilesAllowed: "false",
            uploadUrl: "",
            valueFieldElemId: "",
            autoSubmitFormId: "",
            dialog: null,
            
            postCreate: function(){
                // call parent method
                this.inherited(arguments);
            },
            
            onClick: function(/*Event*/ e){
                console.log("seitbox.dijit.form.FileUploadDialogButton - FileUploadDialogButton clicked ...");
                this.showDialog();
                return true;
            },
            
            onComplete: function(uploadResponse){
            },            
            
            showDialog: function() {
                console.log("seitbox.dijit.form.FileUploadDialogButton - Showing Dialog ...");
                if (this.dialog == null) {
                    var dialogHref = "/de/fileupload/do/file-upload-dialog.html";
                    if (dialogHref.indexOf("?") == -1) {
                        dialogHref += "?";
                    } else {
                        dialogHref += "&";
                    }
                    dialogHref += "multipleFilesAllowed=" + escape(this.multipleFilesAllowed) + "&uploadUrl=" + escape(this.uploadUrl) + "&valueFieldElemId=" + escape(this.valueFieldElemId) + "&autoSubmitFormId=" + escape(this.autoSubmitFormId) + "&fileUploadDialogButtonId=" + escape(this.id);
                    this.dialog = new dijit.Dialog({
                        title: "File upload",
                        id: this.id + "_dialog",
                        href: dialogHref,
                        /* style: "width: 600px; height: 370px;" */
                        style: "width: 600px;"
                    });
                    this.dialog.fileUploadDialogButton = this;
                    dojo.connect(this.dialog, "hide", function() {
                        console.log("seitbox.dijit.form.FileUploadDialogButton - Dialog hide() called, Destoying Dialog ...");
                        this.fileUploadDialogButton.destroyDialog();
                    }, this.dialog);
                }
                this.dialog.show();
            },
            
            destroyDialog:  function() {
                console.log("seitbox.dijit.form.FileUploadDialogButton - Destoying Dialog ...");
                if (this.dialog != null) {
                    this.dialog.destroyRecursive();
                    this.dialog = null;
                }
            }         
            
        }
    );
}


/* END OF INCLUDED FILE '/www/353488_82418/webseiten/faspo/faspo.swhosting11.de/system/modules/fileupload/js/seitbox_dijit_form_FileUploadDialogButton.js' */


