<!--

// scripting (c)2003 plumsoft Systemhaus GmbH
// jwalch@plumsoft.de

var TIME = 1.0 ;
var STEPS = 100 ;
var X0 = 515 ;
var Y0 = -150 ;
var R = 550 ;
var PHI0 = 3.45 ;
var BUTTON_MOVING = "media/start/button_moving.gif" ;
var BUTTON_EMPTY = "media/start/button_empty.gif" ;

var _inMove_ = "" ;
var _button_moving_ = new Image() ;
var _button_empty_ = new Image() ;

_button_empty_.src = BUTTON_EMPTY ;
_button_moving_.src = BUTTON_MOVING ;

function menuEntry(id, url, urlHighlight, urlEmpty, phi) {
	this.id = id ;
	this.img = new Image() ;
	this.img.src = url ;
	this.imgHighlight = new Image() ;
	this.imgHighlight.src = urlHighlight ;
	this.imgEmpty = new Image() ;
	this.imgEmpty.src = urlEmpty ;
	this.phiEnd = phi ;
	this.phi = PHI0 ;
	this.move = _menuEntryMove_ ;
	this.highlight = _menuEntryHighlight_ ;
}

function _menuEntryMove_() {
	setImage(this.id + "Img",this.imgEmpty) ;
	if (_inMove_ == "") {
		_inMove_ = this.id ;
		setImage(this.id + "Mover",_button_moving_) ;
	}
	else {
		document.getElementById(this.id + "Div").style.left= 0 ;
		document.getElementById(this.id + "Div").style.top= 0 ;
	}
	if (this.phi <= this.phiEnd) {
		if (_inMove_ == this.id) {
			this.phi += (this.phiEnd - PHI0) / STEPS ;
			x = X0 + R * Math.cos(this.phi) ;
			y = Y0 - R * Math.sin(this.phi) ;
			document.getElementById(this.id + "Div").style.left= x ;
			document.getElementById(this.id + "Div").style.top= y ;
		}
		window.setTimeout(this.id + ".move()", (1000 * TIME) / STEPS) ;
	}
	else {
		document.getElementById(this.id + "Div").style.left= 0 ;
		document.getElementById(this.id + "Div").style.top= 0 ;
		setImage(this.id + "Mover",_button_empty_) ;
		setImage(this.id + "Img",this.img) ;
		_inMove_ = "" ;
	}
}

function _menuEntryHighlight_(val) {
	if (_inMove_=="") {
		if (val) setImage(this.id + "Img",this.imgHighlight) ;
		else setImage(this.id + "Img",this.img) ;
	}
}

function setImage(name, image) {
	document.images[name].src = image.src ;
	document.images[name].width = image.width ;
	document.images[name].height = image.height ;
}

function onLoad() {
	m3.move() ;
	m2.move() ;
	m1.move() ;
}

m1 = new menuEntry("m1", "media/start/praxis.gif", "media/start/praxis_highlight.gif", "media/start/empty.gif", 3.68) ;
m2 = new menuEntry("m2", "media/start/therapie.gif", "media/start/therapie_highlight.gif", "media/start/empty.gif", 3.84) ;
m3 = new menuEntry("m3", "media/start/kontakt.gif", "media/start/kontakt_highlight.gif", "media/start/empty.gif", 4.01) ;

//->