/*---------Druckfenster Script zum öffnen des Druckfensters---------*/

function OpenPrintWindow() {
	var path = location.href + "/usetemplate-print/";
	var elmWin = window.open(path, "Printpreview", "width=600,height=600,left=100,top=200, scrollbars=yes, resizable=yes");
}

function OpenPrintWindow(location) {
	var path = location + "/usetemplate-print/";
	var elmWin = window.open(path, "Printpreview", "width=600,height=600,left=100,top=200, scrollbars=yes, resizable=yes");
}

/*---------Druckfenster Script Ende---------*/

/*---------PdfDruckfenster Script zum öffnen des PdfDruckfensters---------*/

function OpenPdfPrintWindow() {
	var path = location.href + "/usetemplate-pdfPrint/";
	var elmWin = window.open(path, "Printpreview", "width=600,height=600,left=100,top=200, scrollbars=yes, resizable=yes");
}

function OpenPdfPrintWindow(location) {
	var path = location + "/usetemplate-pdfPrint/";
	var elmWin = window.open(path, "Printpreview", "width=600,height=600,left=100,top=200, scrollbars=yes, resizable=yes");
}

/*---------PdfDruckfenster Script Ende---------*/


function getTemplate(imgSrc){

    var template = imgSrc.substring(imgSrc.indexOf('templateid=')+11);
    template = template.substring(0, template.indexOf('&'));
    
    return template;
}

function toggleSubBackground(id, level){

    var imageSrc = document.getElementById(id).src
    
    var template = getTemplate(imageSrc);
    
    if(template == 'markENavigationInactiveSub'+level)
        imageSrc = imageSrc.replace('markENavigationInactiveSub'+level, 'markENavigationActiveSub'+level);
    else
        imageSrc = imageSrc.replace('markENavigationActiveSub'+level, 'markENavigationInactiveSub'+level);

    document.getElementById(id).src = imageSrc;
}


