//D�finit la variable d'acces aux fichiers
var ROOT_URL='http://www.pichet.com/';


//Actions over/out sur le menu g�n�ral
$(document).ready(function(){
		$('#menu_links li:not(.selected)').hover(function(){
			$(this).addClass("selected");
		},function(){
			$(this).removeClass("selected");
		});
		
});


//fonction d'ouverture de popup
function openfenetre(mypage,myname,w,h,scroll,pos){
    if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
    if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
    else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
    settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
    win=window.open(mypage,myname,settings);
}


//Creation d'une popup avec image
function PopupImage(img,wi,hi) {
	var leftPosition=(screen.width)?(screen.width)/2:100;
	var topPosition=(screen.height)?(screen.height)/2:100;

    var w=open("",'image','width='+wi+',height='+hi+',toolbar=no,scrollbars=no,menubar=no,status=no,location=no,resizable=yes,top='+(topPosition-200)+',left='+(leftPosition-200));
    w.document.write("<html><head><title>Groupe Patrice Pichet</title></head>");
   //	w.document.write("<script language=\"javascript\">function checksize()  { if (document.images[0].complete) {var wi=document.images[0].width;var h=document.images[0].height;window.resizeTo(wi,h);var l=(screen.width)?(screen.width-wi)/2:100;var t=(screen.height)?(screen.height-h)/2:100;window.moveTo(l,t);window.focus();} else { setTimeout('checksize()',250) } }</"+"script>");
    w.document.write('<body oncontextmenu="return true" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0"><img src="'+img+'" border="0" />');
    w.document.write("</body></html>");
    w.document.close();

}


function displayInfosJS(titre,lieu,region,accroche,contenu){
	document.getElementById('coverflow_titre').innerHTML=titre;
	document.getElementById('coverflow_lieu_region').innerHTML="<strong>"+lieu+"</strong> - "+region;
	document.getElementById('coverflow_accroche').innerHTML=accroche;
	document.getElementById('coverflow_contenu').innerHTML=contenu;
}