// JavaScript Document
function Is() {
agent = navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.ns = ((agent.indexOf("mozilla") != -1) && (agent.indexOf("spoofer") == -1) && (agent.indexOf("compatible") == -1) && (agent.indexOf("opera") == -1) && (agent.indexOf("webtv") == -1) && (agent.indexOf("hotjava") == -1));
this.ns2 = (this.ns && (this.major == 2));
this.ns3 = (this.ns && (this.major == 3));
this.ns4 = (this.ns && (this.major == 4));
this.ns6 = (this.ns && (this.major >= 5));
this.ie = ((agent.indexOf("msie") != -1) && (agent.indexOf("opera") == -1));
this.ie3 = (this.ie && (this.major < 4));
this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 4") != -1));
this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.") != -1) && (agent.indexOf("msie 5.5") == -1) && (agent.indexOf("mac") == -1));
this.iem5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.") != -1) && (agent.indexOf("mac") != -1));
this.ie55 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.5") != -1));
this.ie6 = (this.ie && (this.major == 4) && (agent.indexOf("msie 6.") != -1));
this.ie7 = (this.ie && (this.major == 4) && (agent.indexOf("msie 7.0b") != -1));
this.nsdom = (this.ns4 || this.ns6);
this.ie5dom = (this.ie5 || this.iem5 || this.ie55);
this.iedom = (this.ie4 || this.ie5dom || this.ie6);
this.w3dom = (this.ns6 || this.ie6 ||this.ie7);
}

var is = new Is();
//============================================================================================================================================
function afficheMaxi(chemin,ha,la)
    {
    //Déclaration des variables 
    var largeur = 0;
    var hauteur = 0;
    var Left = 0;
    var Top = 0;
 
    //Main
    i1 = new Image();
    i1.src = chemin;
    largeur = i1.width+100;
    hauteur = i1.height+100;
	if(largeur<=100) largeur=580;
	if(hauteur<=100) hauteur=530;
	
    Left=(screen.width-largeur)/2;
    Top=(screen.height-hauteur)/2;
	if(la!=0) L = la; else L = largeur;
	if(ha!=0) H = ha; else H = hauteur+80;
 
    html = '<html><head><title>Photo</title></head><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0 bgcolor="#333333" onload="window.resizeTo('+L+','+H+');self.focus()" onblur="self.close()"><left><img name="image" src="'+chemin+'"  width="'+largeur+'" height="'+hauteur+'" border="0" style="display:block" ></left></body></html>';
    popupImage = window.open('about:blank','','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0, width='+L+', height='+H+', left='+Left+', top='+Top+'');
    //popupImage.document.open();
    popupImage.document.write(html);
    popupImage.document.close();
    }
//============================================================================================================================================

PositionX = (screen.width-400)/2;//150;
PositionY = (screen.height-400)/2;//10;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 1100;
defaultHeight = 900;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["peche"].width;');writeln('window.innerHeight=document.images["peche"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="peche" src='+imageURL+' style="display:block"></body></html>');
close();		
}}

