window.onError = handle_error;
var infoWin;

function submitForm(x) {
   document.forms[x].submit();
}

function showInfo(url) {
   showSizableInfo(url, 680, 580);
}

function showSizableInfo(url, width, height) {
   //if (infoWin && navigator.userAgent.indexOf("MSIE") != -1) infoWin.close(); Zeile geloescht, da sich bei Macintosh das zweite Popup im Hauptfenster oeffnet
   infoWin = window.open(url + '&popup=true', 'tui_details', 'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes');
   //if (navigator.userAgent.indexOf("MSIE") == -1 )
   infoWin.focus();
}

function setMainName() {
   window.name = "tui_main";
}

function handle_error() {
   msg = "\nEs ist ein JavaScript-Fehler aufgetreten.";
   alert(msg);
   return true;
}

function showWaitPage(normalId, waitId) {
   return true;
}

function checkSubmitted() {
   if(formSubmitted == false) {
      formSubmitted = true;
      return true;
   }
   else {
      return false;
   }
}

function redirect_me (){
    return true;
}

// read css-property
function getElementStyleValue(id, prop){
    var el = document.getElementById(id);
    if (el.currentStyle){
        return el.currentStyle[prop];
    } else if (window.getComputedStyle){
        return window.getComputedStyle(el, '').getPropertyValue(prop);
    }
}

function doCommonOnloadStuff(module, page) {
    setMainName();
}
// intentionally left empty - overwrite in designer's common js file
function doCommonDesignOnloadStuff(module, page) { }
// intentionally left empty - overwrite in module's js file
function doModuleOnloadStuff(page) { }
// intentionally left empty - overwrite in designer's module js file
function doModuleDesignOnloadStuff(page) { }
// intentionally left empty - overwrite in module's js file
function doCrosssellingOnloadStuff(module, page) { }

function doOnLoadStuff(module, page) {
    doCommonOnloadStuff(module, page);
    doCommonDesignOnloadStuff(module, page);
    doModuleOnloadStuff(page);
    doModuleDesignOnloadStuff(page);
    doCrosssellingOnloadStuff(module, page);
    redirect_me();
}

// intentionally left empty - overwrite in module's js file
function doModulePrePageScrolling (currentPageNumber, numberOfPages, dataContainerKey){ }