function GimmickDummyStart()
{
	return
}

function GimmickErdbeben()
{
	this.start	= GimmickDummyStart
}

function GimmickSpirale()
{
	this.start	= GimmickDummyStart
}

function GimmickErdbebenStart()
{
	if(this.running)
		return
	this.running	= true
	this.counter	= 0
	if(document[this.id])
	{
		this.pos	= parseInt(document[this.id].top)
		setTimeout(this.name + ".end()", this.duration_effect)
	}
	else
	{
		this.pos	= parseInt(window[this.id].style.posTop)
		setTimeout(this.name + ".end()", this.duration_effect)
	}
}

function GimmickErdbebenEnde(akt_pos)
{
	var	welle	= this.hoehe * Math.sin(Math.PI * this.increment * this.counter) * ((this.max_counter - this.counter) / this.max_counter)
	if(document[this.id])
		document[this.id].top	= this.pos + welle
	else
		window[this.id].style.posTop	= this.pos + welle
	this.counter++
	if(this.counter	== this.max_counter)
	{
		if(document[this.id])
			document[this.id].top	= this.pos
		else
			window[this.id].style.posTop	= this.pos
		setTimeout(this.name + ".running	= false", this.duration_wait)
	}
	else
		setTimeout(this.name + ".end()", this.duration_effect)
}

function GimmickErdbeben(id, name)
{
	this.hoehe		= 10
	this.duration_effect	= 5
	this.duration_wait	= 1000
	this.running		= false
	this.id			= id
	this.name		= name
	this.increment		= .1
	this.pos		= 0
	this.counter		= 0
	this.max_counter	= 100
	this.start		= GimmickErdbebenStart
	this.end		= GimmickErdbebenEnde
}

function GimmickSpiraleStart()
{
	if(this.running)
		return
	this.running	= true
	this.counter	= 0
	if(document[this.id])
	{
		this.pos_x	= parseInt(document[this.id].left)
		this.pos_y	= parseInt(document[this.id].top)
		setTimeout(this.name + ".end()", this.duration_effect)
	}
	else
	{
		this.pos_x	= parseInt(window[this.id].style.posLeft)
		this.pos_y	= parseInt(window[this.id].style.posTop)
		setTimeout(this.name + ".end()", this.duration_effect)
	}
}

function GimmickSpiraleEnde(akt_pos)
{
	var	r_x	= this.radius * Math.sin(Math.PI * this.increment * this.counter) *
				Math.sin(Math.PI * this.counter / this.max_counter)
	var	r_y	= this.radius * Math.cos(Math.PI * this.increment * this.counter) *
				Math.sin(Math.PI * this.counter / this.max_counter)
	if(document[this.id])
	{
		document[this.id].left	= this.pos_x + r_x
		document[this.id].top	= this.pos_y + r_y
	}
	else
	{
		window[this.id].style.posLeft	= this.pos_x + r_x
		window[this.id].style.posTop	= this.pos_y + r_y
	}
	this.counter++
	if(this.counter	== this.max_counter)
	{
		if(document[this.id])
		{
			document[this.id].left	= this.pos_x
			document[this.id].top	= this.pos_y
		}
		else
		{
			window[this.id].style.posLeft	= this.pos_x
			window[this.id].style.posTop	= this.pos_y
		}
		setTimeout(this.name + ".running	= false", this.duration_wait)
	}
	else
		setTimeout(this.name + ".end()", this.duration_effect)
}

function GimmickSpirale(id, name)
{
	this.radius		= 24
	this.duration_effect	= 5
	this.duration_wait	= 1000
	this.running		= false
	this.id			= id
	this.name		= name
	this.increment		= .05
	this.pos_x		= 0
	this.pos_y		= 0
	this.counter		= 0
	this.max_counter	= 150
	this.start		= GimmickSpiraleStart
	this.end		= GimmickSpiraleEnde
}

var	Gimmick1a = new GimmickErdbeben("E1", "Gimmick1a")
var	Gimmick1b = new GimmickErdbeben("E2", "Gimmick1b")
var	Gimmick1c = new GimmickErdbeben("E3", "Gimmick1c")
var	Gimmick2a = new GimmickSpirale("S1", "Gimmick2a")
var	Gimmick2b = new GimmickSpirale("S2", "Gimmick2b")
var	Gimmick2c = new GimmickSpirale("S3", "Gimmick2c")