var CurrElement = Object();
function highlight(el){
	new Effect.Highlight(el, {startcolor:'#9DB9C3', endcolor:'#DDE8F5',duration: 1.0});
}

function puff(val, el){
	CurrElement = el;
//	new Effect.Pulsate(CurrElement, {duration:0.3});	
	var corrAnswer = myQuiz.checkAntwort(val);
	if(corrAnswer == true){
		turnGreen();
//		setTimeout('turnGreen()', 200);
		setTimeout('myQuiz.dispatchAnswer(' + corrAnswer + ')', 1100);	
	}else{
		turnRed();
//		setTimeout('turnRed()', 200);
		setTimeout('myQuiz.dispatchAnswer(' + corrAnswer + ')', 3300);	
	}
	//setTimeout('dispatchAnswer(' + corrAnswer + ')', 5000);	
	
	//alert(val);
	
	
}		

function turnGreen(){
	new Effect.Highlight(CurrElement, {startcolor:'#DDE8F5', endcolor:'#49D53C', restorecolor:'#49D53C', duration: 0.6 });
}

function turnRed(){
	var corrId = "li" + qRichtig;
	
	new Effect.Highlight(CurrElement, {startcolor:'#DDE8F5', endcolor:'#CD1F18', restorecolor:'#CD1F18', duration: 0.8, afterFinish: function(){ new Effect.Highlight(corrId, {startcolor:'#DDE8F5', endcolor:'#49D53C', restorecolor:'#49D53C', duration: 0.5}); }});
	Effect.Shake(CurrElement);
}		
