
function retour() {
window.history.back();
}

function visibilite(thingId)
{
var targetElement;
targetElement = document.getElementById(thingId) ;
if (targetElement.style.display == "none")
{
targetElement.style.display = "" ;
} 
else {
targetElement.style.display = "none" ;
}
}

var cheminImage = "image/monimage.gif"; //image
var lienpopup = "http://www.jejavascript.net/";
monImage = new Image;
monImage.src = cheminImage;
var taillebg = monImage.width //largeur popup
var position_x = (screen.width-monImage.width)/2 //(largeur ecran - largeur image)/2
var position_y = (screen.height-monImage.height-10)/2 //(hauteur ecran - hauteur image)/2
function ouvrir_menu()
{
document.getElementById("menu_context").style.top = position_y;
document.getElementById("menu_context").style.left = position_x;
document.getElementById("menu_context").style.visibility = "visible";
deactiv_pop = setTimeout("fermer_menu()",30000)
}
function fermer_menu()
{
document.getElementById("menu_context").style.visibility = "hidden";
activ_pop = setTimeout("ouvrir_menu()",30000)
}
window.onload = ouvrir_menu;



function over(key)
{	
	var style = document.getElementById(key).style.display;
	
	if(style == 'block')
	{
		document.getElementById(key).style.display='none';
	}
	else
	{
		document.getElementById(key).style.display='block';
	}
}


function setCharCounter (a, b, n) {
	var o = document.getElementById(a);
	o.charCounterMax
	= n;
	o.charCounterDisplay = b;
	o.onkeyup = charCounterUpdate;
}
function charCounterUpdate () {
	var n = this.value.length;
	if (n > this.charCounterMax)
	{ 
		alert("Vous ne pouvez pas dépasser " + this.charCounterMax + " caractères pour cette zone.");
		return false;
	}
	if (this.charCounterDisplay)
	{
		var o = document.getElementById(this.charCounterDisplay);
		if (o.tagName.toLowerCase()=="input") o.value = n;
		else o.innerHTML = n;
	}

}

	window.addEvent('domready',function(){
		//SAMPLE 2 (transition: Bounce.easeOut)
		var nS2 = new noobSlide({
			box: $('box2'),
			items: [0,1,2,3,4,5,6,7],
			interval: 3000,
			fxOptions: {
				duration: 1000,
				transition: Fx.Transitions.Bounce.easeOut,
				wait: false
			},
			addButtons: {
				previous: $('prev1'),
				play: $('play1'),
				stop: $('stop1'),
				next: $('next1')
			}
		});

	
		//more "previous" and "next" buttons
		nS8.addActionButtons('previous',$$('#box8 .prev'));
		nS8.addActionButtons('next',$$('#box8 .next'));
		//more handle buttons
		nS8.addHandleButtons(handles8_more);
		//walk to item 3 witouth fx
		nS8.walk(3,false,true);

	});

