$(document).ready(function() {
	initMenu();
	/*bandeaux de pub*/
	/*$('#slider_haut').s3Slider({
		timeOut: 3000
	});
	$('#slider_milieu').s3Slider({
		timeOut: 3000
	});*/
});

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
						
			var contentHeight = document.getElementById('corps').offsetHeight;
			var headerHeight = document.getElementById('banniere').offsetHeight;
			var footer1Element = document.getElementById('footer');
			var footer1Height = document.getElementById('footer').offsetHeight;
			var footer2Element = document.getElementById('footer2');
			var footer2Height = document.getElementById('footer2').offsetHeight;
							
			if (windowHeight - (contentHeight + headerHeight + footer1Height + footer2Height) >= 0) {
				footer1Element.style.position = 'relative';
				footer1Element.style.top = (windowHeight - (contentHeight + headerHeight + footer1Height + footer2Height + 15)) + 'px';
				footer2Element.style.position = 'relative';
				footer2Element.style.top= (windowHeight - (contentHeight + headerHeight + footer1Height + footer2Height + 15)) + 'px';
				/*footer2Element.style.top = (windowHeight - (contentHeight + headerHeight + footer2Height)) + 'px';*/
			}
			else {
				footer1Element.style.position = 'static';
				footer2Element.style.position = 'static';
			}
		}
	}
}

function PopupImage(img,width,height) { 
	var titre="Agrandissement"; 
	w=open("",'image','width='+width+',height='+height+',toolbar=no,scrollbars=no,resizable=no'); 
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
	w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
	w.document.write("<BODY onload='checksize()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
	w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' width='800' height='600' border=0 alt='Mon image'>"); 
	w.document.write("</TD></TR></TABLE>");
	w.document.write("</BODY></HTML>"); 
	w.document.close(); 
}

function xiti(page) {
	Xt_param = 's=398567&p='+page;
	try {Xt_r = top.document.referrer;}
	catch(e) {Xt_r = document.referrer; }
	Xt_h = new Date();
	Xt_i = '<img width="80" height="15" alt="" ';
	Xt_i += 'src="http://logv6.xiti.com/rcg.xiti?'+Xt_param;
	Xt_i += '&hl='+Xt_h.getHours()+'x'+Xt_h.getMinutes()+'x'+Xt_h.getSeconds();
	if(parseFloat(navigator.appVersion)>=4)
	{	Xt_s=screen;
		Xt_i+='&r='+Xt_s.width+'x'+Xt_s.height+'x'+Xt_s.pixelDepth+'x'+Xt_s.colorDepth;
	}
	document.write(Xt_i+'&ref='+Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" title="Internet Audience">');
}

