// L'amplitude de la secousse
var quakestrength=5
// La durée de la secousse
var max_quake=12
////////////////////////////////////////////////
var thisspan
var i_quake=0
var pause=5
var x_pos,y_pos
var occupied=0

function quakeme(spanname,x,y) {
	if (occupied==0) {
		i_quake=0
		x_pos=x
		y_pos=y
		if (document.all) {
			thisspan=eval("document.all."+spanname+".style")	
		}
		if (document.layers) {
			thisspan=eval("document."+spanname)	
		}
		quakeme2()
	}
}

function quakeme2() {
	quakestrength=quakestrength*(-1)
	if (document.all&&i_quake<max_quake) {
		occupied=1
		thisspan.posTop+=quakestrength		
		thisspan.posLeft+=quakestrength
		var timer=setTimeout("quakeme2()",pause)
		i_quake++
	}
	else if (document.layers&&i_quake<max_quake) {
		occupied=1
		thisspan.top+=quakestrength		
		thisspan.left+=quakestrength
		var timer=setTimeout("quakeme2()",pause)
		i_quake++
	}
	else {
		clearTimeout(timer)
/*		thisspan.posTop=x_pos
		thisspan.posLeft=y_pos*/
		occupied=0
	}
}

/*var rector=5
var stopit=0 
var a=1
function debut(which){
	stopit=0
	shake=which
	shake.style.left=0
	shake.style.top=0
}

function rattleimage(){
	if ((!document.all&&!document.getElementById)||stopit==1)
		return
	if (a==1){
		shake.style.top=parseInt(shake.style.top)+rector
	}
	else if (a==2){
		shake.style.left=parseInt(shake.style.left)+rector
	}
	else if (a==3){
		shake.style.top=parseInt(shake.style.top)-rector
	}
	else{
		shake.style.left=parseInt(shake.style.left)-rector
	}
	if (a<4)
		a++
	else
		a=1
	setTimeout("rattleimage()",50)
}

function stoprattle(which){
	stopit=1
	which.style.left=0
	which.style.top=0
}*/
