var fenetreGAV = null;

$(document).ready(function() {
	
	// Peload des images en rollOver
	MM_preloadImages('img/b_400-over.gif','img/b_700-over.gif');
	
	// RollOvers boutons English/Francais
	$("img#i_400").hover(show400,hide400);
	$("img#i_700").hover(show700,hide700);
	
});

function show400 () {
	MM_swapImage('i_400','','img/b_400-over.gif',0);
}
function hide400 () {
	MM_swapImage('i_400','','img/b_400.gif',0);
}
function show700 () {
	MM_swapImage('i_700','','img/b_700-over.gif',0);
}
function hide700 () {
	MM_swapImage('i_700','','img/b_700.gif',0);
}


/** ouverture de la fenetre popup */
function ouvrirGAV (lang, kbps_, startSection) {
		
	var ww = 1024;
	var wh = 768;
	var px = 0;
	var py = 0;
	
	if (window.screen) {
		ww = screen.availWidth -px;
		wh = screen.availHeight;
	}
	var str = "left="+px+",screenX="+px+",top="+py+",screenY="+py+",width="+ww+",height="+wh;
	
	fenetreGAV = window.open("./main_"+kbps_+"_"+lang+".php?startSection="+startSection, "ReliabilityForRealLife", str+",scrollbars=0,resizable=1");
	if (!fenetreGAV.opener) fenetreGAV.opener = this; 
	fenetreGAV.focus();
}

// helpers.js

function geturl (arg) {
//alert("on ouvre une fenêtre: "+arg); return;

	var ww = 800;
	var wh = 768;
	var px = 0;
	var py = 0;
	
	if (window.screen) {
		px = screen.availWidth - ww;
		wh = screen.availHeight;
		
	}
	var str = "left="+px+",screenX="+px+",top="+py+",screenY="+py+",width="+ww+",height="+wh;
	
	q = window.open(arg, "otherWin", str+",scrollbars=1,resizable=1");
	try {
		if (q.focus != undefined) {
			q.focus();
		} else {
			throw lien;
		} 
	} catch(e){
		if (lang == "en")
			alert("Your browser have refused to open the popup window.\nGo to this location:\n"+arg);
		else
			alert("Votre fureteur a refusé l'ouverture d'une fenêtre popup.\nRendez-vous à cette adresse:\n"+arg);
			
		//document.location.href = lien;
	}
}


function closeMe () {
	self.opener.focus();
	self.close();
}


