ï»¿function mouseOver(node){
	if($(node).attr("class")!="border-photo-selected"){
		$(node).removeAttr("class");
		$(node).addClass("border-photo-over");
	}
}

function mouseOut(node){
	if($(node).attr("class")!="border-photo-selected"){
		$(node).removeAttr("class");
		$(node).addClass("border-photo-out");
	}
}

function mouseClick(node,urlImg,linkImg,title,number){
	$(document.getElementById('document')).addClass("cache");//vire les videos
	$(document.getElementById('liste-photos')).removeClass("cache");
	clean(node);
	$(node).removeAttr("class");
	$(node).addClass("border-photo-selected");
	
	selectedOld=$(document.getElementById('liste-photos')).attr("title");
	$(document.getElementById('lien-'+selectedOld)).addClass("photo-cachee");
	$(document.getElementById('lien-photo'+number)).removeClass("photo-cachee");
	$(document.getElementById('liste-photos')).attr('title','photo'+number);
	
	
	//$(document.getElementById('lien-photo')).attr('href',linkImg);
	//$(document.getElementById('lien-photo')).attr('title',title);
}

//suppprime toutes les bordures
function clean(node){
	parentUl = node.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
	tabUl=parentUl.childNodes;
	for (i=0; i<tabUl.length; i++){
		if(!is_ignorable(tabUl[i])){
			tabImg=$(tabUl[i]).find("img");
			for (j=0; j<tabImg.length; j++){
				$(tabImg[j]).removeAttr("class");
				$(tabImg[j]).addClass("border-photo-out");
			}
		}
	}
}


//utilisé pour les vidéos ou les simulations 3D (o2c)
function clickDoc(type,url){
	tabUl2 = document.getElementById("list1").childNodes;
	for (i=0; i<$(tabUl2).length; i++){
			if(!is_ignorable($(tabUl2)[i])){
				tabImg2=$($(tabUl2)[i]).find("img");
				for (j=0; j<tabImg2.length; j++){
					$(tabImg2[j]).removeAttr("class");
					$(tabImg2[j]).addClass("border-photo-out");
				}
			}
	}

	tabNodes=$(document.getElementById('document').childNodes);
	if($(tabNodes)!=null){
		for (i=0; i<$(tabNodes).length; i++){
			if(!is_ignorable($(tabNodes)[i]) && $($(tabNodes)[i]).html()!=undefined){
				$($(tabNodes)[i]).remove();
			}
		}
	}
	$(document.getElementById('liste-photos')).addClass("cache");
	
	if(type=='o2c'){
		if($.browser.msie){
			$(document.getElementById('document')).append(
				'<OBJECT CLASSID="CLSID:B1953AD6-C50E-11d3-B020-00A0C9251384"'+
				'CODEBASE="http://www.o2c.de/download/o2cplayer.cab#version=2,0,0,35"'+
				'TITLE="Si vous ne pouvez pas visualiser le projet 3D, aller sur www.o2c.de et installer le plugin O2C-Player!"'+
				'ID=o2c height="200" width="300" >'+
				'<param name="BackColor" value="16777215">'+
				'<param name="Phi" value="115">'+
				'<param name="Psi" value="10">'+
				'<param name="KeepSpinning" value="0">'+
				'<param name="SpinPhi" value="20">'+
				'<PARAM NAME=Lights VALUE=15>'+
				'<PARAM NAME=ObjectURL VALUE="'+url+'">'+
				'</OBJECT>');
			$(document.getElementById('document')).append("<div align='center' style='font-style:italic;padding-top:10px;'>Si le projet en 3D n'appara&icirc;t pas. Veuillez t&eacute;l&eacute;charger le plug-in o2c sur le site <a href='http://www.o2c.de/cms/en/index.php?a=102' target='_blank'>www.o2c.de</a></div>");
		}
		else{
			$(document.getElementById('document')).append('<OBJECT TYPE="application/x-o2c-object" DATA="'+url+'" ID=o2c height="200" width="300" >'+
				' <PARAM NAME=Lights VALUE=15>'+
				'<param name="BackColor" value="16777215">'+
				'<param name="Phi" value="115">'+
				'<param name="Psi" value="10">'+
				'<param name="KeepSpinning" value="0">'+
				'<param name="SpinPhi" value="20">'+
				'</OBJECT>'
			);
			$(document.getElementById('document')).append("<div align='center' style='font-style:italic;padding-top:10px;'>Si le projet en 3D n'appara&icirc;t pas. Veuillez t&eacute;l&eacute;charger le plug-in o2c sur le site <a href='http://www.o2c.de/cms/en/index.php?a=102' target='_blank'>www.o2c.de</a></div>");
		}
	}
	if(type=='wmv'){
		$(document.getElementById('document')).append('<div>'+				
		'<object width="0" height="0">'+
		'<param name="FileName" value="'+url+'">'+
		'<param name="AutoStart" value="true">'+
		"<param name='width' value='320'>"+
		"<param name='height' value='286'>"+
		'<embed type="application/x-mplayer2"'+
		'pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"'+
		'src="'+url+'"'+
		'name="video1" width="320" height="286" AutoStart=true>'+
		'</embed>'+
		'</object></div>');
	}
	$(document.getElementById('document')).removeClass("cache");
}




function mouseOver2(node,urlImg){
	if($(node).attr("class")!="border-photo-selected"){
		$(document.getElementById('apercu')).attr('src',urlImg);
		$(document.getElementById('textApercu')).text($(node).attr('alt'));
		$(node).removeAttr("class");
		$(node).addClass("border-photo-over");
	}
	else {
		$(document.getElementById('apercu')).attr('src',urlImg);
		$(document.getElementById('textApercu')).text($(node).attr('alt'));
	}
}

function mouseOut2(node){
	if($(node).attr("class")!="border-photo-selected"){
		//$(document.getElementById('apercu')).removeAttr('src');
		$(node).removeAttr("class");
		$(node).addClass("border-photo-out");
	}
	else {
		//$(document.getElementById('apercu')).removeAttr('src');
	}
}

function showProjectName(node) {
	$(node).parent().parent().prepend('<div style="position:relative;"  height="100px" ><table style="position:absolute; left:0px; top:-50px; z-index:2;" width="190px" height="80px" ><tr><td style="vertical-align:middle;text-align: center;">'+$(node).attr('alt')+'</td></tr></table><a href="'+$(node).attr('link')+'"><img src="http://localhost/squelettes/rubon.gif" alt="'+$(node).attr('alt')+'" onMouseOut="showProjectImg(this);" realImg="'+$(node).attr('src')+'" link="'+$(node).attr('link')+'" style="position:absolute; left:0px; top:-50px; z-index:20;" border="0"/></a></div>');
	$(node).parent().remove();
}

function showProjectImg(node){
	$(node).parent().parent().parent().prepend('<div align="center"><img src="'+$(node).attr('realImg')+'" alt="'+$(node).attr('alt')+'"  link="'+$(node).attr('link')+'" onMouseOver="showProjectName(this);"/>  </div>');
	$(node).parent().parent().remove();
}
