// JavaScript Document

//****************************************************************
// Fonction d'import des animations Flash 
//****************************************************************

function RunFlash(swf, hauteur, largeur, nom) {
	document.write("<object width=\""+largeur+"\" height=\""+hauteur+"\" id=\""+nom+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\">\n");
	document.write("<param name=\"quality\" value=\"high\">\n");
	document.write("<param name=\"wmode\" value=\"transparent\">\n");
	document.write("<param name=\"movie\" value=\""+swf+"\">\n");
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\">\n");
	document.write("<embed src=\""+swf+"\" quality=\"high\" wmode=\"transparent\" width=\""+largeur+"\" height=\""+hauteur+"\" name=\""+nom+"\" align=\"middle\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">\n");
	document.write("</object>\n");
}



//****************************************************************
// Sous Menu
//****************************************************************
sfHover = function() {
		var sfEls = document.getElementById("menu").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onmouseover=function() {
						this.className+=" sfhover";
				}
				sfEls[i].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				}
		}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//****************************************************************
// Positionnement du pied de page 
//****************************************************************
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 setHeight() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('global').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'relative';
				footerElement.style.top = (windowHeight - (contentHeight + footerHeight + 20)) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}
window.onload = function() {
	setHeight();
}
window.onresize = function() {
	setHeight();
}

function disableselect(e){ 
return false 
} 

function reEnable(){ 
return true 
} 

//if IE4+ 
document.onselectstart=new Function ("return false") 
document.oncontextmenu=new Function ("return false")
document.ondragstart=new Function ("return false") 
//if NS6 
if (window.sidebar){ 
//document.onmousedown=disableselect 
document.onclick=reEnable 
document.ondragstart=disableselect
} 
//--> 

