function OpenWindow(theURL,winName,winCenter,x,y,features) {
  var param = "width=" + x + ",height=" + y + ( features=="" ? "" : "," + features );
  var win = window.open(theURL,winName,param);
  if (theURL.indexOf('http:// ') == -1) {
    if (winCenter==1) {win.moveTo((screen.width-x)/2,(screen.height-y)/2);}
    if (winCenter==3) {win.moveTo(0,0);}
    win.focus();
  }
  return win;
}


function preloadImgs(){
    document.preload = new Array();
    if(document.images){
        for(var i = 0; i < preloadImgs.arguments.length; i++){
            document.preload[i] = new Image();
            document.preload[i].src = preloadImgs.arguments[i];
        }
    }
}

/* default onload Funktion, wird auf jeder Seite aufgerufen;
 normalerweise leer, kann auf einzelnen seiten dann
 überschrieben werden mnit onload-aufgaben
*/

function ld() {}


function showSection(nr) {
    if (nr>0) {
        elm=document.getElementById('section'+nr);
        elm.className='';
        for(n=0;n<99;n++) {
            if ( (document.getElementById('section'+n))&&(n!=nr)) {
                elm=document.getElementById('section'+n);
                elm.className='off';
                }
            }
        }
    else {
        for(n=0;n<99;n++) {
            if ( document.getElementById('section'+n)) {
                elm=document.getElementById('section'+n);
                elm.className='';
                }
            }
        }
    }


    var string_tick     =  "Dies ist ein Tickertext der vor sich hin tickert und tickert und immer noch weitermacht              ";
var strlength       =  string_tick.length;
var strpos_1        =  0;
var strpos_2        =  60;                  // change displayed substring here
var delay           =  100;                 // set interval-delay here
var pos1            =  0;
var pos2            =  0;

function ticktick () {

    // some vars
    //
    var str1, str2, pos3;

    // reset when end of string
    //
    if (pos1 > strlength) {
        pos1 =  strpos_1;
        pos2 =  strpos_2;
    }

    // display a substring
    // after string end is reached continue with beginning of string
    //
    if (pos2 < strlength) {
        str1 =  string_tick.substring(pos1, pos2);
        str2 =  "";
    } else {
        pos3 =  pos2 - strlength;
        str1 =  string_tick.substring(pos1);
        str2 =  string_tick.substring(0, pos3);
    }

    // at startup add up pos2
    // then add up pos 1 and pos 2
    //
    if (pos2 < strpos_2) {
        pos2 ++;
    } else {
        pos1 ++;
        pos2 ++;
    }
    document.tickerform.out.value =  str1 + str2;
}
