function disableRightClick(e){if(!document.rightClickDisabled) // initialize
{if(document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown = disableRightClick;}
else document.oncontextmenu = disableRightClick;return document.rightClickDisabled = true;}
if(document.layers || (document.getElementById && !document.all)){
if (e.which==2||e.which==3){return false;}}else{return false;}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}//v3.0
function MM_preloadImages(){var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}//v3.0
function MM_findObj(n, d) {var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;}//v4.01
function MM_swapImage() {var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}} //v3.0
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function popPicture(theURL,winName,imgWidth,imgHeight,winText){
var imgTag, newWindow, winContent, winHeight, winWidth;
winHeight=imgHeight+50;winWidth=imgWidth+10;
imgTag='<a href="javascript:self.close();"><img border="0" src="'+theURL+'"'+(imgWidth? ' width="'+imgWidth+'"':"")+(imgHeight? ' height="'+imgHeight+'"':"")+' hspace="0" vspace="0"></a>';
newWindow=window.open('',null,'height='+winHeight+',width='+winWidth+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,left=100,top=100');
if (newWindow && !newWindow.closed) newWindow.resizeTo(winWidth,winHeight); 
winContent='<html><head><title>Tahoeraa Huiraatira</title></head><body leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">';
winContent+=imgTag+(winText? '<div style=" background-color:#FFFFFF; text-align:left; font-family:Verdana, Arial; font-size:11px; position:absolute; left:0; top:0; width:'+imgWidth+'; height:11; padding:5; z-index: 1;float:left;filter:alpha(opacity=80, style=0);-moz-opacity:.80; opacity:.80;"><b>'+winText+'</b></div>':"")+'</body></html>';
newWindow.document.write(winContent);newWindow.document.close();
if (newWindow && !newWindow.closed) newWindow.focus(); 
} //v2.0

function popDspLayer(dspURL,dspName,dspWidth,dspHeight,dspContent) {
	var x=0; var y=0;
	var el_prinLayer=document.body;
	var el_dspMediaLayer=document.getElementById('dspMediaLayer');
	var el_dspMediaContent=document.getElementById('dspMediaContent');
	
	if(!document.getElementById('dspMediaLayer')){
		var tmpMediaLayer = document.createElement('div');
		tmpMediaLayer.id='dspMediaLayer'; tmpMediaLayer.style.display='none';
		tmpMediaLayer.style.position='relative'; tmpMediaLayer.style.align='center'; tmpMediaLayer.style.zIndex='100';
		el_prinLayer.insertBefore(tmpMediaLayer, el_prinLayer.firstChild);
		el_dspMediaLayer=document.getElementById('dspMediaLayer');
	};

	if(!document.getElementById('dspNameContent')){
		var tmpNameContent = document.createElement('div');
		tmpNameContent.id='dspNameContent';
		el_dspMediaLayer.insertBefore(tmpNameContent, el_dspMediaLayer.firstChild);
		el_dspNameContent=document.getElementById('dspNameContent');
	};

	if(!document.getElementById('dspMediaContent')){
		var tmpMediaContent=document.createElement('div'); tmpMediaContent.id='dspMediaContent';
		el_dspMediaLayer.appendChild(tmpMediaContent);
		el_dspMediaContent=document.getElementById('dspMediaContent');
		dspMediaContent.style.align='center';
	};

	if (dspURL.toLowerCase().indexOf('.jpg') > 0) {
		el_dspMediaLayer.style.display='';
		el_dspMediaContent.style.display='';
		el_dspMediaLayer.style.top=document.body.scrollTop+30;
		el_dspMediaLayer.style.left=document.body.scrollLeft+40;
		el_dspMediaLayer.style.border='#FF9966 1px solid';
		el_dspMediaLayer.style.width=dspWidth+2;
		el_dspMediaContent.style.border='#333333 1px solid';
		el_dspMediaContent.style.width=dspWidth;
		el_dspMediaContent.innerHTML = '<img onclick="hideDspLayer();" id="dspPicture" width="'+dspWidth+'" height="'+dspHeight+'" src="'+dspURL+'" alt="'+dspName+'" />';
		if(dspContent){el_dspNameContent.innerHTML='<table width="100%" border="0" cellpadding="0" cellspacing="2"><tr><td id=infosCat width=90%>'+dspName+'</td><td id=infosMore align=right><a href="javascript:hideDspLayer();"><b>Fermer<b></a></td></tr><tr><td colspan=2 bgcolor=#FFF8EC>'+dspContent+'</td></tr></table>'}
		else {el_dspNameContent.innerHTML='<table width="100%" border="0" cellpadding="0" cellspacing="2"><tr><td id=infosCat width=90%>'+dspName+'</td><td id=infosMore align=right><a href="javascript:hideDspLayer();"><b>Fermer<b></a></td></tr></table>'}
	}
}

function hideDspLayer(){
	if(document.getElementById('dspMediaLayer')){
		if(document.getElementById('dspMediaContent')){
		document.getElementById('dspMediaLayer').removeChild(document.getElementById('dspMediaContent'))};
		if(document.getElementById('dspNameContent')){
		document.getElementById('dspMediaLayer').removeChild(document.getElementById('dspNameContent'))};
	document.getElementById('dspMediaLayer').style.display='none';}
}

function printIt(printUrl){
printWindow=window.open(printUrl,"Impression","directories=0,location=0,menubar=0,status=0,toolbar=0,width=800,height=600");
printTimer=setTimeout('printWindow.print();',4000);
printTimer=setTimeout('printWindow.close();',10000);
}

fadeObjects=new Object();fadeTimers=new Object();
function fadeIt(object, destOp, rate, delta){if (!document.all){return;};if (object != "[object]"){setTimeout("fade("+object+","+destOp+","+rate+","+delta+")",0);return;};clearTimeout(fadeTimers[object.sourceIndex]);diff=destOp-object.filters.alpha.opacity;direction = 1;if (object.filters.alpha.opacity > destOp){direction = -1;};delta=Math.min(direction*diff,delta);object.filters.alpha.opacity+=direction*delta;if (object.filters.alpha.opacity != destOp){fadeObjects[object.sourceIndex]=object;fadeTimers[object.sourceIndex]=setTimeout("fadeIt(fadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);}} // Gradual-Highlight Image II-By J. Mark Birenbaum (birenbau@ugrad.cs.ualberta.ca - http://dynamicdrive.com */
