<!-- Beginning of JavaScript -

// CREDITS:
// Slide-show and Text-Ticker all in one by Urs Dudli and Peter Gehrig 
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.com.
// info@24fun.ch
// 4/19/2000

// IMPORTANT: 
// If you add this script to a script-library or script-archive 
// you have to add a link to http://www.24fun.com on the webpage 
// where this script will be running.

// CONFIGURATION:
//  1.  Delete the DIV-block with the id "delethethistext". Save all the rest as HTML-file.
//  4.  Configure the varibales of the first script-block. 
//      The second script block (below the body-tag) needs no configuration.

// Edit your messages. You can add as many messages a you like.
var message = new Array()
message[0]="NEU: Baumarktstudie 2010"
message[1]="Globus hat die zufriedensten Kunden"
message[2]="Näheres unter Produkte + Services / Studien"

// The links of your messages. Be sure that you configure as many links as messages.
// If you don't want to link a message write '#' instead of an URL (see last sample).
var messageurl = new Array()

// The images for your messages. 
var messageimg = new Array()
messageimg[0]="nopixel.gif"
messageimg[1]="nopixel.gif"
messageimg[2]="nopixel.gif"

// Do not change the variables below this line
var imgpreload=new Array()
for (i=0;i<=messageimg.length-1;i++) {
	imgpreload[i]=new Image()
	imgpreload[i].src=messageimg[i]
}

// Alignment for each image in relation to its message-text (right or left)
var alignimg=new Array()
alignimg[0]="left"
alignimg[1]="left"
alignimg[2]="left"

// Alignment for message in relation to the margin of the messagebox
var alignmessage=new Array()
alignmessage[0]="left"
alignmessage[1]="left"
alignmessage[2]="left"

// target of the message-links (HTML conventions)
var target_url="_blank"
	
// The width of your ticker
var textwidth=747

// The height of your ticker
var textheight=35

// The borderwidth of the ticker
var borderwidth=0

// The size of the font (HTML3 font-size conventions)
var font_size=3

// font-face
var font_face="Arial"

// font-color
var font_color="white"

// background-color of the ticker
var bg_ticker="AB0000"

// Final horizontal position of the messagebox: distance to the left margin of the window
var x_finalpos=200

// Final vertical position of the messagebox: distance to the top margin of the window
var y_finalpos=93

// Number of lamellas.
var x_slices=15

// Pause beween the messages (milliseconds)
var pause=2000

// Do not change the variables below
var i_loop=0
var i_message=0
var width_slice=Math.ceil(textwidth/x_slices)
var cliptop=0
var clipbottom=textheight
var i_clipright=1
var content=""

function initiate() {
    content+="<table border="+borderwidth+" cellpadding='5' width="+textwidth+" height="+textheight+">"
    content+="<tr><td bgcolor="+bg_ticker+" align="+alignmessage[i_message]+">"
	content+="<img hspace=5 src="+messageimg[i_message]+" align="+alignimg[i_message]+" border='0'>"

    content+="<font face="+font_face+" size="+font_size+" color="+font_color+">"
    content+=message[i_message]
    content+="</font></a></td></tr></table>"
    if (document.all) {
	    for (i=0;i<=x_slices;i++) {
            var thisinners=eval("s"+i)
            thisinners.innerHTML=content
            var thiss=eval("document.all.s"+i+".style")
            thiss.posLeft=x_finalpos
            thiss.posTop=y_finalpos
        }
	    i_message++
	    openlamellar()
    }
	if (document.layers) {
	    for (i=0;i<=x_slices;i++) {
            var thisinners=eval("document.s"+i+".document")
            thisinners.write(content)
			thisinners.close()
            var thiss=eval("document.s"+i)
            thiss.left=x_finalpos
            thiss.top=y_finalpos
        }
	    i_message++
	    openlamellarNN()
    }
}

function openlamellar() {
	clipleft=-width_slice
	clipright=0
    if (i_clipright<=width_slice) {
        for (i=0;i<=x_slices;i++) {
            var thiss=eval("document.all.s"+i+".style")
            thiss.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
            clipleft+=width_slice
            clipright=clipleft+i_clipright
		}
    i_clipright++
    var timer=setTimeout("openlamellar()",20)
   }
   	else {
		clearTimeout(timer)
		var timer=setTimeout("closelamellar()",2000)
	}
}

function openlamellarNN() {
	clipleft=-width_slice
	clipright=0
    if (i_clipright<=width_slice) {
        for (i=0;i<=x_slices;i++) {
            var thiss=eval("document.s"+i)
			thiss.clip.left=clipleft
        	thiss.clip.right=clipright
        	thiss.clip.top=cliptop
        	thiss.clip.bottom=clipbottom
            clipleft+=width_slice
            clipright=clipleft+i_clipright
		}
    i_clipright++
    var timer=setTimeout("openlamellarNN()",20)
   }
   	else {
		clearTimeout(timer)
		var timer=setTimeout("closelamellarNN()",2000)
	}
}

function closelamellar() {
    clipleft=-width_slice
	clipright=0
    if (i_clipright>=0) {
        for (i=0;i<=x_slices;i++) {
            var thiss=eval("document.all.s"+i+".style")
            thiss.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
            clipleft+=width_slice
            clipright=clipleft+i_clipright
		}
    i_clipright--
    var timer=setTimeout("closelamellar()",20)
    
   }
   	else {
		clearTimeout(timer)
		var timer=setTimeout("changeimage()",2000)
	}
}

function closelamellarNN() {
    clipleft=-width_slice
	clipright=0
    if (i_clipright>=0) {
        for (i=0;i<=x_slices;i++) {
           	var thiss=eval("document.s"+i)
			thiss.clip.left=clipleft
        	thiss.clip.right=clipright
        	thiss.clip.top=cliptop
        	thiss.clip.bottom=clipbottom
            clipleft+=width_slice
            clipright=clipleft+i_clipright
		}
    i_clipright--
    var timer=setTimeout("closelamellarNN()",20)
    
   }
   	else {
		clearTimeout(timer)
		var timer=setTimeout("changeimageNN()",2000)
	}
}

function changeimage() {
    content=""
	if (i_message>message.length-1) {i_message=0}
    content+="<table border="+borderwidth+" cellpadding='5' width="+textwidth+" height="+textheight+">"
    content+="<tr><td bgcolor="+bg_ticker+" align="+alignmessage[i_message]+">"
	content+="<img hspace=5 src="+messageimg[i_message]+" align="+alignimg[i_message]+" border='0'>"

    content+="<font face="+font_face+" size="+font_size+" color="+font_color+">"
    content+=message[i_message]
    content+="</font></a></td></tr></table>"
	for (i=0;i<=x_slices;i++) {
        var thisinners=eval("s"+i)
        thisinners.innerHTML=content   
    }
	i_message++
	openlamellar()
}

function changeimageNN() {
    content=""
	if (i_message>message.length-1) {i_message=0}
    content+="<table border="+borderwidth+" cellpadding='5' width="+textwidth+" height="+textheight+">"
    content+="<tr><td bgcolor="+bg_ticker+" align="+alignmessage[i_message]+">"
	content+="<img hspace=5 src="+messageimg[i_message]+" align="+alignimg[i_message]+" border='0'>"

    content+="<font face="+font_face+" size="+font_size+" color="+font_color+">"
    content+=message[i_message]
    content+="</font></a></td></tr></table>"
	for (i=0;i<=x_slices;i++) {
        var thisinners=eval("document.s"+i+".document")
        thisinners.write(content)
		thisinners.close()
    }
	i_message++
	openlamellarNN()
}