function make_Visible(obj, bol){
	if(bol){val="inline-block";}else{val="none";}
	if(document.getElementById(obj)){
		if(browserIsIE()){
			if(document.getElementById(obj).style.display){
				document.getElementById(obj).style.display = val;
			}
		}else{
			if(document.getElementById(obj).setAttribute){
				var att = document.getElementById(obj).getAttribute("style");
				att = att.replace(/display:\s?(none|inline\-block);?/,"");
				document.getElementById(obj).setAttribute("style","display:"+val+";"+att);
			}
		}
	}
}

var _RESULTAT = Array();
_RESULTAT["current"] = 1;
_RESULTAT["total"] = 3;

function nextResults(){
	if(_RESULTAT["current"] < _RESULTAT["total"]){
		_RESULTAT["current"]++;
	}else{
		_RESULTAT["current"] = 1;
	}
	showResult();
}
function previousResults(){
	if(_RESULTAT["current"] > 1){
		_RESULTAT["current"]--;
	}else{
		_RESULTAT["current"] = _RESULTAT["total"];
	}
	showResult();
}
function showResult(){
	for(i=0;i<_RESULTAT["total"];i++){
		make_Visible("resultat"+(i+1)+"-avant",false);
		make_Visible("resultat"+(i+1)+"-apres",false);
		make_Visible("resultat"+(i+1)+"-small",false);
	}
	make_Visible("resultat"+_RESULTAT["current"]+"-avant",true);
	make_Visible("resultat"+_RESULTAT["current"]+"-apres",true);
	make_Visible("resultat"+_RESULTAT["current"]+"-small",true);
}

function browserIsIE(){
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("msie") != -1){return true;}
	return false;
}
