// V1.11
// 21/08/02

parent.document.title = document.title;

function sniffer() {
    var 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)));
    this.ns2 = (this.ns && (this.major == 2));
    this.ns3 = (this.ns && (this.major == 3));
    this.ns4b = (this.ns && (this.minor < 4.04));
    this.ns4 = (this.ns && (this.major == 4));
    this.ns6 = (this.ns && (this.major >= 5));
    this.ie   = (agent.indexOf("msie") != -1);
    this.ie3  = (this.ie && (this.major == 2));
    this.ie5  = (this.ie && (this.major >= 4) && (document.getElementById) ) ? true : false ;
    this.ie6  = (this.ie5 && (agent.indexOf('msie 6')!=-1) ) ? true : false ;
    this.ie4  = (this.ie && (this.major >= 4) && !(this.ie5));
    this.op3 = (agent.indexOf("opera") != -1);
    this.win   = (agent.indexOf("win")!=-1);
    this.mac   = (agent.indexOf("mac")!=-1);
    this.unix  = (agent.indexOf("x11")!=-1);
    this.dom = (this.ns6 || this.ie5 );
}

var clientIs = new sniffer();

/********************************************************************
*                   Open Window					                    *
********************************************************************/
//document.open();

function openWin(URL)
{
var lar=screen.width/2;
var hau=screen.height/2;
var lo=lar-274;
var ho=hau-210;
lAttributes = '';
lAttributes += 'toolbar=0,';
lAttributes += 'Location=0,';
lAttributes += 'directory=0,';
lAttributes += 'status=0,';
lAttributes += 'menubar=0,';
lAttributes += 'scrollbars=1,';
lAttributes += 'resizable=1,';
lAttributes += 'top='+ho+',';
lAttributes += 'left='+lo+',';
lAttributes += 'width=548,';
lAttributes += 'height=420';
winId = window.open(URL,"_blank",lAttributes);
}
function openWinbis(URL)
{
var lar=screen.width/2;
var hau=screen.height/2;
var lo=lar-274;
var ho=hau-210;
lAttributes = '';
lAttributes += 'toolbar=0,';
lAttributes += 'Location=0,';
lAttributes += 'directory=0,';
lAttributes += 'status=0,';
lAttributes += 'menubar=0,';
lAttributes += 'scrollbars=1,';
lAttributes += 'resizable=1,';
lAttributes += 'top='+ho+',';
lAttributes += 'left='+lo+',';
lAttributes += 'width=448,';
lAttributes += 'height=380';
winId = window.open(URL,"_blank",lAttributes);
}

function openMap(URL)
{
var lar=screen.width/2;
var hau=screen.height/2;
var lo=lar-274;
var ho=hau-210;
lAttributes = '';
lAttributes += 'toolbar=0,';
lAttributes += 'Location=0,';
lAttributes += 'directory=0,';
lAttributes += 'status=0,';
lAttributes += 'menubar=0,';
lAttributes += 'scrollbars=1,';
lAttributes += 'resizable=1,';
lAttributes += 'top='+ho+',';
lAttributes += 'left='+lo+',';
lAttributes += 'width=548,';
lAttributes += 'height=470';
winId = window.open(URL,"_blank",lAttributes);
}
function BW_reload() {location.reload();}


function BW_initGestionResize() 
{ //v4.1.1

if (clientIs.ns && !clientIs.ns6) 
{
	captureEvents(Event.RESIZE );	
}
window.onresize = BW_resize;



return true; 
}

nshw = (document.layers)? true:false
iehw = (document.all)? true:false

var fen
function pop_up(sURL, iWidth, iHeight, X0, Y0, bScrollbar){
	var sName, sFeatures;
	sName = 'pop_up';
	if(iehw){if((fen)&&(!fen.closed)){fen.close();}}
	sFeatures =
'toolbar=no,location=no,directories=no,status=no,menubar=no';
	if ( bScrollbar == false )
		sFeatures += ',scrollbars=no';
	else
		sFeatures += ',scrollbars=yes';
	sFeatures +=
',resizable=yes,screenY='+Y0+',screenX='+X0+',top='+Y0+',left='+X0+',width='
+iWidth+',height='+iHeight;
	fen=window.open(sURL, sName, sFeatures);
	}

function pop_up_plus(sURL, iWidth, iHeight, X0, Y0){
	var sName, sFeatures;
	var lo=(screen.width-iWidth)/2;
	var ho=(screen.height-iHeight)/2;

	sName = 'pop_up';
	if(iehw){if((fen)&&(!fen.closed)){fen.close();}}
	sFeatures =
'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes';
	sFeatures +=
',resizable=yes,screenY='+Y0+',screenX='+X0+',top='+ho+',left='+lo+',width='
+iWidth+',height='+iHeight;
	fen=window.open(sURL, sName, sFeatures);
	}



function BW_resize()
{

if (clientIs.ns && !clientIs.ns6) 
{
BW_reload()
}
positionnement();
}
function positionnement()
{
for (i=0; i<31; i++)
{
if(clientIs.ns && !clientIs.ns6)
{
posObj = eval("document.layer"+i)
}
else if(clientIs.ie && !clientIs.ie5)
{
posObj = eval("document.all.layer"+i)
}
else if(clientIs.ie5 || clientIs.ns6)
{

posObj2 = document.getElementById("layer"+i);
posObj = posObj2.style;
}

 
posDansFenetre = Math.max(193,(document.body.offsetWidth-740)/2+193);
posObj.left = posDansFenetre;

}

}


function createLayerAgence(nomlayer,ville,dpt,adresse,tel,fax)
{
str ="";
l=screen.width;
layerw=(l-740)/2+193;


str+='<div id="'+nomlayer+'" style="position:absolute; width:200px; height:115px; z-index:1; left: '+layerw+'px; top: 240px; visibility:hidden;">';
str+='<table width="180" border="0" cellspacing="0" cellpadding="0">';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="8" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="155" height="1"></td>';
str+='<td bgcolor="#f7f7f7" valign="top" colspan="2" rowspan="2"><img src="img/coin.gif" width="15" height="15"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="14"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="90"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td valign="top" bgcolor="#f7f7f7"><table width="155" border="0" cellspacing="0" cellpadding="0">';
str+='<tr>';
str+='<td><img src="img/fleche_rouge.gif" width="9" height="9"></td>';
str+='<td class="droitegras">'+ville+'</td>';
str+='</tr>';
str+='<tr>';
str+='<td><img src="img/spacer.gif" width="20" height="10"></td>';
str+='<td><img src="img/spacer.gif" width="135" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td colspan="2" class="droite"><span class="dts">Dpts : '+dpt+'</span><br>'+adresse+'</td>';
str+='</tr>';
str+='<tr><td colspan="2">';
str+='<table width="155" border="0" cellspacing="0" cellpadding="0">';
str+='<tr><td class="droite" width="35">T&eacute;l. : </td><td width="120" class="droite">'+tel+'</td><tr>';
str+='<tr><td class="droite">Fax : </td><td class="droite">'+fax+'</td><tr>';
str+='</table>';
str+='</td></tr>';
str+='</table></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="15"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="8" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="156" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="14" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='</table>';
str+='</div>';
document.write(str);

}

function createLayerEurope(nomlayer,ville,adresse)
{
str ="";

str+='<div id="'+nomlayer+'" style="position:absolute; width:220px; height:120px; z-index:1; left: 310px; top: 115px; visibility:hidden;">';
str+='<table width="180" border="0" cellspacing="0" cellpadding="0">';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="8" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="155" height="1"></td>';
str+='<td  valign="top" colspan="2" rowspan="2"><img src="img/coin.gif" width="15" height="15"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="14"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="90"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td valign="top" bgcolor="#f7f7f7"><table width="155" border="0" cellspacing="0" cellpadding="0">';
str+='<tr>';
str+='<td valign="baseline"><img src="img/fleche_rouge.gif" width="9" height="9"></td>';
str+='<td class="droitegras">'+ville+'</td>';
str+='</tr>';
str+='<tr>';
str+='<td><img src="img/spacer.gif" width="20" height="5"></td>';
str+='<td><img src="img/spacer.gif" width="135" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td colspan="2" class="droite">'+adresse+'</td>';
str+='</tr>';
str+='</table></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="15"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="8" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="156" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="14" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='</table>';
str+='</div>';
document.write(str);

}


function createLayerFrance(nomlayer,ville,adresse)
{
str ="";




str+='<div id="'+nomlayer+'" style="position:absolute; width:200px; height:115px; z-index:1; left: 30px; top: 100px; visibility:hidden;">';
str+='<table width="180" border="0" cellspacing="0" cellpadding="0">';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="8" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="155" height="1"></td>';
str+='<td bgcolor="#f7f7f7" valign="top" colspan="2" rowspan="2"><img src="img/points/reseau/coin.gif" width="15" height="15"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="14"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="90"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td valign="top" bgcolor="#f7f7f7"><table width="155" border="0" cellspacing="0" cellpadding="0">';
str+='<tr>';
str+='<td valign="baseline"><img src="img/fleche_rouge.gif" width="9" height="9"></td>';
str+='<td class="droitegras">'+ville+'</td>';
str+='</tr>';
str+='<tr>';
str+='<td><img src="img/spacer.gif" width="20" height="5"></td>';
str+='<td><img src="img/spacer.gif" width="135" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td colspan="2" class="droite">'+adresse+'</td>';
str+='</tr>';
str+='</table></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="15"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#f7f7f7"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='<tr>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="8" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="156" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="14" height="1"></td>';
str+='<td bgcolor="#828282"><img src="img/spacer.gif" width="1" height="1"></td>';
str+='</tr>';
str+='</table>';
str+='</div>';
document.write(str);

}

function switchLanguage()
{
	var lPath = top.document.location.href;
	var langue = (lPath.indexOf('/fr/')>=0) ? "fr" : "en" ;
	var newLanguage = "";
	if (langue=="fr")
		{
			lPos = lPath.indexOf('/fr/');
			newLanguage = "/en/";
		}
		else
		{
			lPos = lPath.indexOf('/en/');
			newLanguage = "/fr/";
		}
    var startPath = lPath.substring(0,lPos);
	var endPath = lPath.substring(lPos+4,lPath.length);
	
	/* traitement spécial csr */
	/*	lPos2 = lPath.indexOf('/csr/');	*/
	/*	if(lPos2>=0) {				*/
	/*		top.document.location.href = startPath+newLanguage+"csr/index.htm";	*/
	/*		return ;				*/
	/*	}						*/
	/************************/
	top.document.location.href = startPath+newLanguage+endPath;	

}

