// globale Variablen und Vorbesetzungen
	var rx = 280;			// radius in x-richtung
	var ry = 170;			// radius in y-richtung
// wenn rx = ry ist, dann ist es ein Kreis, sonst ein Oval!
    var xoff = 290;     // x offset
    var yoff = 220;     // y offset
    var pi = Math.PI;   // get pi
    var inc =  pi / 180; // degrees per rotation cycle (links drehen) - ein Minuszeichen davor: gegen Uhrzeigersinn drehen
	var fly_max = 8;		// anzahl fliegender Menüpunkte
    var objects;        // objects to be rotated
    var pos;            // position for objects
	var HIDDEN = "hidden";
	var VISIBLE = "visible";

function showObject(object) {
        object.visibility = VISIBLE;
    }

function hideObject(object) {
        object.visibility = HIDDEN;
    }

function slideLogo(from, to) {
            if (from < to) {
                company.top = (from += 10);
                setTimeout('slideLogo(' + from + ',' + to + ')', 75);
            }
            else initObjects();
    }

function rotateObjects() {
            for (var i = 0; i < fly_max; i++) {
                pos[i] += inc; objects[i].visibility = VISIBLE;
                objects[i].left = (rx * Math.cos(pos[i])) + xoff
                objects[i].top = (ry * Math.sin(pos[i])) + yoff;
            }
        rotateTimer = setTimeout("rotateObjects()", 70);
}

function initObjects() {
	objects = new Array();
        pos = new Array();
        pos[0] = 0;
		var j = 0;
            for (var i = 1; i <= fly_max; i++) {
			j = i-1;
			objects[j] = eval("fly" + i );
            pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / fly_max));
            }
        rotateObjects();
}

function rechts() {
inc=pi/180;
}

function links() {
inc=-(pi/180);
}

function farben( )
{	var max = 3*255;
	var inter = max / (fly_max + 1);
	var wert, wert1 = 0, wert2 = 0, wert3  = 0;
	var farb = "#";

	for (var i = 1; i <= fly_max; i++)
	{	wert = i * inter;
		if (wert > 510)
		{ wert3 = wert - 510; wert -= 510; }
		else if (wert > 255)
		{ wert2 = wert - 255; wert -= 255; }
		else wert1 = wert;

		farb = DezNachHex(wert1) + DezNachHex(wert2) + DezNachHex(wert3);

		eval("fly" + i + ".linkColor = \"#" + farb + "\";");
		eval("fly" + i + ".alinkColor = \"#" + farb + "\";");
		eval("fly" + i + ".vlinkColor = \"#" + farb + "\";");
	}
}

hex = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
function DezNachHex(x)
{
 var high = Math.floor(x / 16)
 var low = Math.floor(x - high * 16)
 return(hex[high] + hex[low])
}

function titel_settings(  strm, fuellchar, anzahl )
{	var tmp;
	var len = document.title.indexOf( strm );
	if ( len >= 0 )
	{	this.timer		= 200;
		this.mti			= -1;
		this.fuellchar	= fuellchar;
		this.anzahl		= anzahl;
		this.anzahl2	= anzahl + anzahl;
		this.strl			= document.title.slice( 0, len );
		this.strmove 	= strm;
		this.strr			= document.title.slice( len + strm.length );
		this.status		= 0;
		this.titel		= new Array( );

// fülle alle Titelzeilen für Bewegung

		for ( i=0; i<this.anzahl; i++ )
			{	tmp = this.strl;
				for ( j = 0; j < i; j++ ) tmp += this.fuellchar;
				tmp += this.strmove;
				for ( j = (this.anzahl-1); j > i; j-- ) tmp += this.fuellchar;
				tmp += this.strr;
				this.titel.push( tmp );
			}

		for ( i=(this.anzahl-1); i>=0; i-- )
		{	ii = this.anzahl2 - i - 1;
			tmp = this.strl;
			for ( j = 0; j < i; j++ ) tmp += this.fuellchar;
			tmp += this.strmove;
			for ( j = (this.anzahl-1); j > i ; j-- ) tmp += this.fuellchar;
			tmp += this.strr;
			this.titel.push( tmp );
		}
	}
	else
	{	this.timer		= 10000;
		this.mti			= -2;
		this.anzahl		= 0;
		this.fuellchar	= ""
		this.strl			= "";
		this.strmove	= "";
		this.strr			= "";
		this.status		= 0;
	}
	window.status = this.titel[0];
	return this;
}

function titel_move( )
{
	if (titel_move.arguments.length > 0)
		tm.status = titel_move.arguments[0];

	if (tm.mti >= -1)
	{	tm.mti++;
		if (tm.mti == tm.anzahl2) tm.mti = 0;

		document.title = tm.titel[tm.mti];

		if (tm.status > 1) window.status = tm.titel[tm.mti];
	}
	setTimeout( "titel_move(  )", tm.timer);
	return 1;
}