function checkAuswahl(uName) {
    

    eval('locAnzahl = document.' + uName + 'form.' + uName + '.length');
    for(i=0; i < locAnzahl; i++) {
        eval('locSelect = document.' + uName + 'form.' + uName + '.options[i].selected');
        if(locSelect == true) {
            eval('locValue = document.' + uName + 'form.' + uName + '.options[i].value');
            if (locValue != "") {
                locTarget = locValue.split("|");
                if(locTarget.length > 1)
                {
                 if(locTarget[0] != "")
                 {
                  Fenster1 = window.open(locTarget[0], "Seite");
                 }
                }
                else
                {
                 location.href = locValue;
                }
            }
        }
    }
}

function openPopup(uHREF, uName, uWidth, uHeight, uScrollbars, uResizable) {
    
    
    locParams =
        "width="      + uWidth                     + "," +
        "height="     + uHeight                    + "," +
        "scrollbars=" + ((uScrollbars)?"yes":"no") + "," +
        "resizable="  + ((uResizable)?"yes":"no")  + "," +
        "caption=no," +
        "menubar=no";
    locWindow = window.open(uHREF, uName, locParams);
    locWindow.focus();
}

function openDetailPopUp(uId, uImage, uText) {
    
    openPopup("/stiftung/cms/de/detail_popup.jsp?image="+ uImage + "&text=" + uText, "detailpopup", 330, 380, false, false);
}

function openDetailPopUpWithPath(uId, uImage, uText, uPath) {
    
    openPopup("/stiftung/cms/de/detail_popup.jsp?image="+ uImage + "&text=" + uText + "&menuepath=" + escape(uPath), "detailpopup", 330, 380, false, false);
}

function openMediaPopUp(uId, uImage, uReal56, uReal300, uWmp56, uWmp300)
{
    
    openPopup("?image=" + uImage + "&real56=" + uReal56 + "&real300=" + uReal300 + "&wmp56=" + uWmp56 + "&wmp300=" + uWmp300, "mediapopup", 330, 380, false, false);
}

function openMediaPopUpWithPath(uId, uImage, uReal56, uReal300, uWmp56, uWmp300, uPath, uHeadline)
{
    

    openPopup("?image=" + uImage + "&real56=" + escape(escape(uReal56)) + "&real300=" + escape(escape(uReal300)) + "&wmp56=" + escape(escape(uWmp56)) + "&wmp300=" + escape(escape(uWmp300)) + "&menuepath=" + escape(uPath) + "&headline=" + uHeadline, "mediapopup", 330, 380, false, false);
}

function openSoundPopUp(uId, uText, uStream)
{
    
    openPopup("?text=" + uText + "&stream=" + uStream, "mediapopup", 330, 380, false, false);
}
function openPIP(uEventNr)
{
    
    openPopup("/premweb/cms/de/modules/pip/de.premiere.modules.tvguide.pip.standard.jsp?eventNr=" + uEventNr, "tvpremieren", 475, 350, false, false);
}
 
function OpenPopUp_KontoauszugEbene3(strLink, strEntryNo, uName, uWidth, uHeight, uScrollbars, uResizable) 
{ 
    
    
    openPopup(strLink+"?entryNo="+strEntryNo, uName, uWidth, uHeight, uScrollbars, uResizable);
}

function Blotter()
{
    this.blotterTab = [];
    this.blotterRegister = [];
    this.startTab = "";
    this.startRegister = "";
    this.setStartTab = function(tab, register) {
        this.startTab = tab;
        this.startRegister = register;
    }
    this.showStartTab = function(tab, register) {
        this.closeAllTabs();
        this.setStartTab(tab, register);
        document.getElementById(this.startTab).className = "active";
        document.getElementById(this.startRegister).style.display = "block";
    }
    this.addTab = function(tab, register) {
        this.blotterTab.push(tab);
        this.blotterRegister.push(register);
    }
    this.showTab = function(tab, register) {
        this.closeAllTabs()
        document.getElementById(tab).className = "active";
        document.getElementById(register).style.display = "block";
    }
    this.closeAllTabs = function() {
        var blotterRegisterCount = this.blotterRegister.length;
        for (var i = 0; i < blotterRegisterCount; i++) {
            document.getElementById(this.blotterRegister[i]).className = "";
        }
        var blotterTabCount = this.blotterTab.length;
        for (var i = 0; i < blotterTabCount; i++) {
            document.getElementById(this.blotterTab[i]).style.display = "none";;
        }
    }
}

function singleSubmit(formName,formField){
 if(document.forms[formName].elements[formField].value == "0"){
  document.forms[formName].elements[formField].value = "1";
  return true;
 } else {
  return false;
 }
}
function singleSubmitDisable(form, flagName, submitButtonName) {
 if (form.elements[flagName].value == "0") {
  form.elements[flagName].value = "1";
  form.elements[submitButtonName].disabled = true;
  return true;
 } else {
  return false;
 }
}
