function deplace(){
	if (self.innerWidth)
		{
			frameWidth = self.innerWidth;
			frameHeight = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientWidth)
		{
			frameWidth = document.documentElement.clientWidth;
			frameHeight = document.documentElement.clientHeight;
		}
		else if (document.body)
		{
			frameWidth = document.body.clientWidth;
			frameHeight = document.body.clientHeight;
		}
		else return;
	
	window.moveTo((screen.width/2)-(frameWidth/2), (screen.height/2)-(frameHeight/2));
}

function popup(img,w,h, base_url)
{
	var p = window.open('', 'p', 'width='+w+', height='+h+', resizable=0,menubar=0,toolbar=0,directories=0,scrollbars=0,status=0' );
	p.document.write('<html><head><title>Zoom</title><style>body{margin:0;padding:0;text-align:center;background:#fff;}a img{border:0;};</style><script type="text/javascript" src="'+base_url+'js/functions.js"></script></head><body onload="focus();deplace();"><a href="#" onclick="window.close();return false;" title="cliquez pour fermer cette fenêtre"><img src="'+base_url+img+'" alt="" style="width:100%" /></a></body></html>');
	p.document.close(); 
}

function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}
var testCal = 1;
function showHide(id){
	
	if (testCal == 0){
		//document.getElementById(id).style.display = 'none';
		new Effect.BlindUp(document.getElementById(id));
		testCal = 1;
	}else{
		//document.getElementById(id).style.display = 'block'
		new Effect.BlindDown(document.getElementById(id));
		testCal = 0;
	}
	
}