function DetecteNavigateur()
{ 
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom &&!this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom &&!this.opera5)?1:0;
	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom &&!this.opera5)?1:0;
	this.ie8=(this.ver.indexOf("MSIE 8")>-1 && this.dom &&!this.opera5)?1:0;
	this.ie4=(document.all &&!this.dom &&!this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6||this.ie7||this.ie8
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5)?1:0; 
	this.ns4=(document.layers &&!this.dom)?1:0;
	this.bw=(this.ie8 ||this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new DetecteNavigateur()
// Texte à afficher

Affichage=new Array()

Affichage[0] = "<table style='border-collapse: collapse'><tr><td><img border='0' src='images/Vignettes/Plage.jpg' width='370' height='200'></td></tr></table>"
Affichage[1] = "<table width='340'><tr><td><p align='justify'>En 1981, après plus de <b>quinze ans passés sur le terrain et bureau d’études</b> en bâtiment et construction de piscines, avec de solides formations techniques et d’architecture, <b>Jean Claude Poirier</b> crée son entreprise.</p><p align='justify'>En 20 ans, ce sont <b>plus de 1000 bassins qui ont été réalisés</b>, dont <b>des dizaines ont fait l’objet de reportages dans la presse spécialisée.</b></p></td></tr></table>"
Affichage[2] = "<table width='340'><tr><td valign='top'><p align='justify'>Les éléments naturels, des matériaux nobles, une mise en œuvre traditionnelle, l’application de techniques actuelles et notre savoir-faire feront de votre projet <b>une réalisation de prestige unique</b> que nous concevrons avec passion, en accord avec vos attentes.</td></tr></table>"
Affichage[3] = "<img border='0' src='images/JCPoirier.jpg' width='300' height='217'>"

Affichage[4] = "<table style='border-collapse: collapse'><tr><td><img border='0' src='../images/Vignettes/Plage.jpg' width='370' height='200'></td></tr></table>"
Affichage[5] = "<table width='340'><tr><td><p align='justify'>In 1981, with excellent technical and architectural qualifications under his belt, and <b>after more than fifteen years spent in the field and research departments</b>, JC Poirier formed his own company.</p><p align='justify'>Over the last 20 years, <b>he has built more than 1000 pools, many of which have featured in specialist press reviews.</b></p></td></tr></table>"
Affichage[6] = "<table width='340'><tr><td valign='top'><p align='justify'>Our expertise and enthusiasm will make your project a uniquely prestigious creation. We use natural elements, 	noble materials, <b>a traditional approach and the latest techniques</b> to meet your needs.</td></tr></table>"
Affichage[7] = "<img border='0' src='../images/JCPoirier.jpg' width='300' height='217'>"

Affichage[8] = "<table style='border-collapse: collapse'><tr><td><img border='0' src='../images/Vignettes/Plage.jpg' width='370' height='200'></td></tr></table>"
Affichage[9] = "<table width='340'><tr><td><p align='justify'>En 1981, tras más de <b>15 años pasados sobre el terreno</b> y en una consultoría de obras y construcciones de piscinas, con sólidas formaciones técnicas y en arquitectura, <b>Jean-Claude Poirier</b> crea su propia empresa.</p><p align='justify'>Durante 20 años, se han realizado <b>más de 1000 estanques de los que algunas decenas fueron objeto de reportajes en la prensa especializada.</b></p></td></tr></table>"
Affichage[10] = "<table width='340'><tr><td valign='top'><p align='justify'>Los elementos naturales, materiales nobles, una puesta en marcha tradicional, la aplicación de las técnicas actuales y nuestros conocimientos harán que su proyecto sea <b>una realización única de prestigio</b> que concebiremos con pasión, de acuerdo con sus esperanzas.</td></tr></table>"
Affichage[11] = "<img border='0' src='../images/JCPoirier.jpg' width='300' height='217'>"

Affichage[12] = "<table style='border-collapse: collapse'><tr><td align='center'><img border='0' src='images/PlageMer.jpg' width='370' height='200'><br><b><font face='Verdana' size='1' color='#000080'>&quot; La nature nous inspire ce qu/'il y a de plus beau. &quot;</font></b></td></tr></table>"
Affichage[13] = "<table style='border-collapse: collapse'><tr><td align='center'><img border='0' src='../images/PlageMer.jpg' width='370' height='200'><br><b><font face='Verdana' size='1' color='#000080'>&quot;Nature inspires our most beautiful creations.&quot;</font></b></td></tr></table>"
Affichage[14] = "<table style='border-collapse: collapse'><tr><td align='center'><img border='0' src='../images/PlageMer.jpg' width='370' height='200'><br><b><font face='Verdana' size='1' color='#000080'>&quot; La naturaleza nos inspira lo más bello. &quot;</font></b></td></tr></table>"
Affichage[15] = "<img border='0' src='../images/DecoupeEsp/JCPoirier.jpg' width='300' height='217'>"
Affichage[16] = "<img border='0' src='../images/DecoupeAng/JCPoirier.jpg' width='300' height='217'>"
Affichage[17] = "<table width='340'><tr><td valign='top'><p align='justify'>We select <b>the finest natural elements and materials</b> and use traditional methods in conjunction with the latest state of the art techniques. <br>We combine these with our expertise and our passion for our work to create a <b>pool which is totally unique</b>, to your individual specification.</td></tr></table>"

// variables modifiables

//PGauche= -180   				// Gauche de la fenetre par rapport à la souris
//PHaut=-231  				// Haut de la fenetre par rapport à la souris
CentrerNS4= 0  				// Centrer sous NS 4
ApparitionProgressive= 1 	// 1 fait apparaitre la fenetre progressivement
Deplacement= 1  			// 1 La fenêtre se déplace avec la souris
DetectionType= 1 			// 1 for 'smooth' window size detection, 0 for 'flip' window size detection.
DelaisApparition= 1   		// temps d'apparition de la fenetre en ms

// ne jamais modifier ce qui suit

var px = bw.ns4||window.opera?"":"px";

if(document.layers)
{ 
 	scrX= innerWidth; 
	scrY= innerHeight;
 	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} };
}

function CreationFenetre(obj)
{								
 	this.elm= document.getElementById? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
 	this.css= bw.ns4?this.elm:this.elm.style;
 	this.wref= bw.ns4?this.elm.document:this.elm;
	this.obj= obj+'CreationFenetre'; eval(this.obj+'=this');
	this.w= bw.ns4? this.elm.clip.width: this.elm.offsetWidth;
	this.h= bw.ns4? this.elm.clip.height: this.elm.offsetHeight;
};

CreationFenetre.prototype.measureIt= function(){
	this.w= bw.ns4? this.elm.clip.width: this.elm.offsetWidth;
	this.h= bw.ns4? this.elm.clip.height: this.elm.offsetHeight;
};

CreationFenetre.prototype.writeIt= function(text){
	if (bw.ns4) {this.wref.write(text); this.wref.close()}
	else this.wref.innerHTML= text;
};

var GaucheSouris=0
var HautSouris=0
var PlaceGauche=0
var PlaceHaut=0

function DetecteMouvementSouris(e)
{
	GaucheSouris= (bw.ns4||bw.ns6)? e.pageX: bw.ie&&bw.win&&!bw.ie4? (event.clientX-2)+document.body.scrollLeft: event.clientX+document.body.scrollLeft;
	HautSouris= (bw.ns4||bw.ns6)? e.pageY: bw.ie&&bw.win&&!bw.ie4? (event.clientY-2)+document.body.scrollTop: event.clientY+document.body.scrollTop;
	if (EstInitialise && hovering && Deplacement) PositionneFenetre();
};

function PositionneFenetre()
{
	if (DetectionType==1) PlaceGauche= GaucheSouris+PGauche+tooltip.w > screenWscrolled? screenWscrolled-tooltip.w: GaucheSouris+PGauche;
	if (DetectionType==1) PlaceHaut= HautSouris+PHaut+tooltip.h > screenHscrolled? screenHscrolled-tooltip.h: HautSouris+PHaut;
	if (DetectionType==0) PlaceGauche= GaucheSouris+PGauche+tooltip.w > screenWscrolled? GaucheSouris-PGauche-tooltip.w: GaucheSouris+PGauche;
	if (DetectionType==0) PlaceHaut= HautSouris+PHaut+tooltip.h > screenHscrolled? HautSouris-PHaut-tooltip.h: HautSouris+PHaut;
	if (PlaceGauche<0) PlaceGauche= 0;
	if (PlaceHaut<0) PlaceHaut= 0;
	tooltip.css.left= PlaceGauche+px;
	tooltip.css.top= PlaceHaut+px;
};

var hovering=false, screenWscrolled=0, screenHscrolled=0;
CreationFenetre.prototype.showTimer= null;


function AfficheTexte(num)
{
	if(EstInitialise)
	{
		clearTimeout(tooltip.popTimer);
		doCacheTexte();
		if (bw.ns4)
		{
			var text= '<span class="StyleNetscape4">' + (CentrerNS4?'<center>':"") + Affichage[num] + (CentrerNS4?'</center>':"") + '</span>';
			tooltip.writeIt(text);
		}
		if (!bw.ns4) tooltip.writeIt(Affichage[num]);
		screenWscrolled= screenW + (bw.ie?document.body.scrollLeft:pageXOffset);
		screenHscrolled= screenH + (bw.ie?document.body.scrollTop:pageYOffset);
		hovering= true;
		
		/* I'm using a timeout for ie4 here, because it doesn't store the measurements quickly enough. Does anybody know why this happens? */
		if (bw.ie4) setTimeout('tooltip.measureIt(); PositionneFenetre();', DelaisApparition/2);
		else { tooltip.measureIt(); PositionneFenetre(); }
		if (ApparitionProgressive) tooltip.showTimer= setTimeout('tooltip.blendIn()', DelaisApparition);
		if (!ApparitionProgressive) tooltip.showTimer= setTimeout('tooltip.css.visibility="visible"', DelaisApparition);
 }
};



CreationFenetre.prototype.popTimer= null;
function CacheTexte()
{
	if (EstInitialise) tooltip.popTimer= setTimeout('doCacheTexte()', 30)
};

function doCacheTexte()
{
	hovering= false;
	clearTimeout(tooltip.showTimer);
	tooltip.css.visibility= 'hidden';
	clearTimeout(tooltip.fadeTimer);
	tooltip.i= 0;
};

var scrollbarWidth= bw.ns6&&bw.win?14:bw.ns6&&!bw.win?16:bw.ns4?16:0;
function measureScreen() 
{
	tooltip.css.top= 0+px;
	tooltip.css.left= 0+px;
	screenW= (bw.ie?document.body.clientWidth:innerWidth) - scrollbarWidth;
	screenH= (bw.ie?document.body.clientHeight:innerHeight);
};


CreationFenetre.prototype.blendIn= function()
{
	if (bw.ie && bw.win &&!bw.ie4) {
		this.css.filter= 'blendTrans(duration=0.5)';
		this.elm.filters.blendTrans.apply();
		this.css.visibility= 'visible';
		this.elm.filters.blendTrans.play();
	}
	else {
		this.css.visibility= 'visible';
		if (!bw.ns4) this.fadeIt();
	}
};
CreationFenetre.prototype.step= 8;
CreationFenetre.prototype.i= 0;
CreationFenetre.prototype.fadeTimer= null;
CreationFenetre.prototype.fadeIt= function()
{
	this.i+= this.step;
	//this.css.filter= 'alpha(opacity='+this.i+')';
	this.css.MozOpacity= this.i/100;
	if (this.i<100) this.fadeTimer= setTimeout(this.obj+'.fadeIt()', 40);
	else this.i= 0;
};

// Init function...
var EstInitialise= false;
function InitialiseFenetre(){
	//Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
	bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
	if (bw.opera5) bw.ns6 = 0
	
	//Extending the browsercheck to add windows platform detection.
	bw.win= (navigator.userAgent.indexOf('Windows')>-1)

	tooltip= new CreationFenetre('DivFenetre');
	tooltip.elm.onmouseover= function(){ clearTimeout(tooltip.popTimer); if(bw.ns4){setTimeout('clearTimeout(tooltip.popTimer)',20)}; };
	tooltip.elm.onmouseout= doCacheTexte;
	if (bw.ns4) document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove= DetecteMouvementSouris;
	measureScreen();
	if (!bw.ns4) onresize= measureScreen;
	if (!bw.ns4) tooltip.elm.className= 'StyleNormal';
	if (bw.ie && bw.win &&!bw.ie4) tooltip.css.filter= 'alpha(opacity=100)'; 
	EstInitialise= true;
};

// Initialise la fenetre
if(bw.bw &&!EstInitialise) onload= InitialiseFenetre;preloadImages();
