// Displaying dropdown menu, only for IE
sfHover = function() {
	var sfEls = document.getElementById("nav").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);


function displayPhoto(url,x,y){
	var body_node = document.getElementsByTagName("body")[0];
	var mask_node = document.createElement('div');
	mask_node.id="darkdiv";
	if(!document.getElementById('darkdiv'))	body_node.appendChild(mask_node);
	document.getElementById("darkdiv").style.width=largdd+"px";
	document.getElementById("darkdiv").style.height=hautdd+"px";
	document.getElementById("darkdiv").style.left="0px";
	document.getElementById("darkdiv").style.display="block";
	body_node.style.overflow="hidden";
	if(!document.getElementById('bigPhoto')){
		var event_node = document.createElement('div');
		event_node.id="bigPhoto";
	}else{
		event_node = document.getElementById('bigPhoto');
	}
	event_node.innerHTML = "<a class=\"bigpicture\" onfocus=\"this.blur()\" href=\"javascript:closeBigPicture();\"><img src=\""+url+"\" alt=\"\" /></a>";
	event_node.style.marginLeft='-'+(Math.round(x/2)+20)+'px';
	event_node.style.marginTop='-'+Math.round(y/2)+'px';
	event_node.style.display='block';
	
	if(!document.getElementById('bigPhoto'))
		body_node.appendChild(event_node);
	
}
function closeEvent(){
	document.getElementById('Event').style.display='none';
	document.getElementById('darkdiv').style.display='none';
}
function closeBigPicture(){
	document.getElementById('bigPhoto').style.display='none';
	document.getElementById('darkdiv').style.display='none';
	document.getElementsByTagName("body")[0].style.overflow="auto";
}
function file(fichier){
	if(window.XMLHttpRequest) // FIREFOX
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // IE
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return(false);
	xhr_object.open("GET", fichier, false);
	xhr_object.send(null);
	if(xhr_object.readyState == 4) return(xhr_object.responseText);
	else return(false);
}
