var Nachricht = new Array;

Nachricht[1] = "Automaten Service Hannover GmbH";
Nachricht[2] = "Ihr kompetenter Partner";
Nachricht[3] = "Beratung - Verkauf - Service";
Nachricht[4] = "Leasing und Vermietung";
Nachricht[5] = "Table Top Kaffeautomaten";
Nachricht[6] = "Heißgetränke";
Nachricht[7] = "Kaltgetränke";
Nachricht[8] = "Warenautomaten";
Nachricht[9] = "Snackautomaten";
Nachricht[10] = "kontaktlose Bezahlungssysteme";

var Div = new Array('[ ... ',' ... ]');

var speed = 100
var pause = 1000

function ShowTicker(x,y,dir)
{
	if(x == Nachricht[y].length-1 && dir == "x++") { speed = pause } else { speed = Cache[1] }
	if(x == Nachricht[y].length) { dir = "x--" }
	if(x == 0) { dir = "x++"; y++ }
	if(y == Nachricht.length) y = 1;

	eval(dir);	// Gibt die Richtung an :)

	window.status = Div[0]+Nachricht[y].substring(0,x)+Div[1];
	Cache[2] = x
	Cache[3] = y
	Cache[4] = dir
	StatusTimer = window.setTimeout('ShowTicker('+x+','+y+',"'+dir+'")', speed);
}

var Cache = new Array
Cache[1] = speed
var StatusTimer;
ShowTicker(1,1,'x++');

function ShowText(txt) {
	clearTimeout(StatusTimer);
	status = txt;
}

function HideText() {
ShowTicker(Cache[2],Cache[3],Cache[4])
}

var Agent   = navigator.userAgent.toLowerCase()
if(Agent.indexOf('msie') != -1) {
var Location = top.location;
var Mainlocation = "";
if(self.location.search != "") { var Mainlocation = self.location.search.substring(1,self.location.search.length) } else {
if(Location.search != "") { var Mainlocation = Location.search.substring(1,Location.search.length) }}
if(Mainlocation != "") {
document.write('<FRAMESET cols="170,*" frameborder="NO" border="0" framespacing="0" rows="*">\n');
document.write('<FRAME name="menu" scrolling="NO" noresize src="menu.php">\n');
document.write('<FRAME name="main" src="'+Mainlocation+'">\n');
document.write('</FRAMESET>\n');
}
}
