function openWin(URL,w,h,resize,scroll,windowName)
{
lAttributes = '';
lAttributes += 'toolbar=0,';
lAttributes += 'Location=0,';
lAttributes += 'directory=0,';
lAttributes += 'status=0,';
lAttributes += 'menubar=0,';
lAttributes += 'scrollbars='+scroll+',';
lAttributes += 'resizable='+resize+',';
lAttributes += 'width='+w+',';
lAttributes += 'height='+h+'';
if(!windowName) windowName="";
winId = window.open(URL,windowName,lAttributes);
}
function findLanguagePath()
{
	var lPath = top.document.location.href;
	var langue = (lPath.indexOf('/en/')>=0) ? "en" : "fr" ;
	var endPath
	var newLanguage = "";
	if (langue=="en") lPos = lPath.indexOf('/en/');
		else lPos = lPath.indexOf('/fr/');

	if(lPos<0) {
		lPos = lPath.lastIndexOf('/');
		endPath = lPath.substring(0,lPos);
	}
	else{
	endPath = lPath.substring(0,lPos+4);
	}
	return endPath;
}

function checkForSlash(URL)
{	

	if(URL.substring(URL.length-1,URL.length)!="/") URL+="/";
	return URL;
}
function showPersonnalData(relativePath)
{
	if(!relativePath) relativePath ="";
	relativePath=checkForSlash(relativePath);
	openWin(relativePath+"ow/mentions_legales.htm#personnal",468,422,0,1,"_blank");
}

function openContact(langue)
{
	//openWin("/"+langue+"/ow/contact.htm",487,400,0,1,"");
}
function openMap(relativePath)
{
	if(!relativePath) relativePath ="../";
		relativePath=checkForSlash(relativePath);
	openWin(relativePath+"ow/carte.htm",468,432,0,1,"");
}
function openConduite(relativePath)
{
	if(!relativePath) relativePath ="../";
		relativePath=checkForSlash(relativePath);
	openWin(relativePath+"ow/code_conduite.htm",468,422,0,1,"");
}
function openLegals(relativePath)
{
	if(!relativePath) relativePath ="../";
		relativePath=checkForSlash(relativePath);
	openWin(relativePath+"ow/mentions_legales.htm",468,422,0,1,"");
}
function openPublications(relativePath)
{
	if(!relativePath) relativePath ="../";
	relativePath=checkForSlash(relativePath);
	openWin(relativePath+"ow/publications.htm",468,422,0,1,"");
}
function openLinks(relativePath)
{
	if(!relativePath) relativePath ="../";
	relativePath=checkForSlash(relativePath);
	openWin(relativePath+"ow/liensutiles.htm",468,422,0,1,"");
}
function showCode(URL)
{

	openWin(URL,468,422,0,1,"");
}
function openFAQ(relativePath)
{
	if(!relativePath) relativePath ="../";
	relativePath=checkForSlash(relativePath);
	openWin(relativePath+"ow/faq.htm",468,422,0,1,"");
}
function openMailingList(relativePath,lang)
{	
	if(!lang) lang="fr";
	if(!relativePath) relativePath ="../";
	var url=relativePath+"saisie.php?lang="+lang;
//	openWin(relativePath+"saisie.php?lang=fr",468,422,0,1,"");
openWin(url,468,422,0,1,"");

}
function openGlossary(relativePath)
{
	if(!relativePath) relativePath ="../";
	relativePath=checkForSlash(relativePath);
	showCode(relativePath+"ow/glossaire.htm");
}

function openVideofr()
{
URL='fr/ow/video.html';	
var lar=screen.width/2;
var hau=screen.height/2;
var lo=lar-240;
var ho=hau-210;
lAttributes = '';
lAttributes += 'toolbar=0,';
lAttributes += 'Location=0,';
lAttributes += 'directory=0,';
lAttributes += 'status=0,';
lAttributes += 'menubar=0,';
lAttributes += 'scrollbars=0,';
lAttributes += 'resizable=0,';
lAttributes += 'top='+ho+',';
lAttributes += 'left='+lo+',';
lAttributes += 'width=370,';
lAttributes += 'height=390';
winId = window.open(URL,"_blank",lAttributes);
}
function openVideoen()
{
URL='en/ow/video.html';	
var lar=screen.width/2;
var hau=screen.height/2;
var lo=lar-240;
var ho=hau-210;
lAttributes = '';
lAttributes += 'toolbar=0,';
lAttributes += 'Location=0,';
lAttributes += 'directory=0,';
lAttributes += 'status=0,';
lAttributes += 'menubar=0,';
lAttributes += 'scrollbars=0,';
lAttributes += 'resizable=0,';
lAttributes += 'top='+ho+',';
lAttributes += 'left='+lo+',';
lAttributes += 'width=370,';
lAttributes += 'height=376';
winId = window.open(URL,"_blank",lAttributes);
}

function openVideofr2()
{
URL='../../fr/ow/video.html';	
var lar=screen.width/2;
var hau=screen.height/2;
var lo=lar-240;
var ho=hau-210;
lAttributes = '';
lAttributes += 'toolbar=0,';
lAttributes += 'Location=0,';
lAttributes += 'directory=0,';
lAttributes += 'status=0,';
lAttributes += 'menubar=0,';
lAttributes += 'scrollbars=0,';
lAttributes += 'resizable=0,';
lAttributes += 'top='+ho+',';
lAttributes += 'left='+lo+',';
lAttributes += 'width=370,';
lAttributes += 'height=390';
winId = window.open(URL,"_blank",lAttributes);
}
function openVideoen2()
{
URL='../../en/ow/video.html';	
var lar=screen.width/2;
var hau=screen.height/2;
var lo=lar-240;
var ho=hau-210;
lAttributes = '';
lAttributes += 'toolbar=0,';
lAttributes += 'Location=0,';
lAttributes += 'directory=0,';
lAttributes += 'status=0,';
lAttributes += 'menubar=0,';
lAttributes += 'scrollbars=0,';
lAttributes += 'resizable=0,';
lAttributes += 'top='+ho+',';
lAttributes += 'left='+lo+',';
lAttributes += 'width=370,';
lAttributes += 'height=376';
winId = window.open(URL,"_blank",lAttributes);
}


function openSitesList(langue)
{
if(langue!='en')
{
	langue='fr';
}

lAttributes = '';
lAttributes += 'toolbar=1,';
lAttributes += 'Location=1,';
lAttributes += 'directory=1,';
lAttributes += 'status=1,';
lAttributes += 'menubar=1,';
lAttributes += 'scrollbars=1,';
lAttributes += 'resizable=1,';
lAttributes += 'width=790,';
lAttributes += 'height=500';
//winId = window.open('http://www.total.com/ho/'+langue+'/transverse/siteswebdugroupe.htm','',lAttributes);
winId = window.open('http://www.total.com/'+langue+'/common/group_websites/','',lAttributes);

}