
   // Deklaration der Variable 'myProcWindow'
   var myProcWindow
   var hoehe  = screen.height;
   var breite = screen.width;
   var winName = 'lala';
   
   // URL übergibt die Seite die im Fenster dargestellt werden soll
   //
 
   function OpenMyPopUp(url,window_height,window_width,scrollbars) {
    myProcWindow = window.open(url,'lala','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=' + scrollbars + ', resizable=no, copyhistory=no');
 
    if (window_height <= 0) {
           window_height = hoehe
           window_width = breite  
        }

    myProcWindow.resizeTo(window_width,window_height)

    myProcWindow.moveTo(0,0)
    
    if (!myProcWindow.opener) {
    myProcWindow.opener = window }
  
   }

   function OpenPopUp(url,window_height,window_width) {
    myProcWindow = window.open(url,'lala','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no');
 
    if (window_height <= 0) {
           window_height = hoehe
           window_width = breite  
        }

    myProcWindow.resizeTo(window_width,window_height)

    myProcWindow.moveTo(0,0)
    
    if (!myProcWindow.opener) {
    myProcWindow.opener = window }
  
   }

   function CloseWindow() {
    myProcWindow.close (); }


var speed = 15 		//-->  Geschwindgkeit
var pause = 3500        //-->  Pausen zwischen den Nachrichten
var timerID = null
var bannerRunning = false
var ar = new Array()

//Anzahl der NAchrichten
ar[0] = "Willkommen an der Geltinger Birk"
ar[1] = "Geniessen Sie Ihren Urlaub"
ar[2] = "Natur pur - Erholung pur"


var message = 0
var state = ""
clearState()
function stopBanner() {
        if (bannerRunning)
                clearTimeout(timerID)
        bannerRunning = false
}
function startBanner() {
        stopBanner()
        showBanner()
}
function clearState() {
        state = ""
        for (var i = 0; i < ar[message].length; ++i) {
                state += "0"
        }
}
function showBanner() {
        if (getString()) {
                message++
                if (ar.length <= message)
                        message = 0
                clearState()
                timerID = setTimeout("showBanner()", pause)
                bannerRunning = true
        } else {
                var str = ""
                for (var j = 0; j < state.length; ++j) {
str += (state.charAt(j) == "1") ? ar[message].charAt(j) : "     "
                }
                window.status = str
                timerID = setTimeout("showBanner()", speed)
                bannerRunning = true
        }
}
function getString() {
        var full = true
        for (var j = 0; j < state.length; ++j) {
                if (state.charAt(j) == 0)
                        full = false
        }
        if (full)
                return true
        while (1) {
                var num = getRandom(ar[message].length)
                if (state.charAt(num) == "0")
                        break
        }
state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
        return false
}
function getRandom(max) {
        return Math.round((max - 1) * Math.random())
}


