/*function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('nofooter').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'relative';
				footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}
window.onload = function() { setFooter(); }
window.onresize = function() { setFooter(); }
*/
function popSkyscanner() {
	var w = 350;
	var h = getWindowHeight() * 2 / 3;
	if (screen.width) {
		x = (screen.width - w) / 2;
		y = (screen.height - h) / 2 - 20;
		posText = ",top=" + y + ",left=" + x;
	}
	else posText = "";

	window.open("http://mini.skyscanner.net/en/gbp/browse/flights/uk/mars/cheap-flights.ashx?css=http://navettesblanches.mp2.aeroport.fr/styles/nb_skyscanner.css", "Best Airfare", "resizable,width=" + w + ",height=" + h + posText);
}

function loadIframe(iframeName, url) {
  if ( window.frames[iframeName] ) {
    window.frames[iframeName].location = url;   
    return false;
  }
  else return true;
 }
 
///////////////////// focus du champs de saisie newsletters //////////////////////////
function changeVal(id, param)
{
	if(param == '')
	{	// on focus
		document.getElementById(id).value = param;
	}
	else
	{	// on blur
		if(document.getElementById(id).value == '')
			document.getElementById(id).value = param;
	}
}

//////////////////// ouverture d'un popup //////////////////////////
function ouvrir(l,h,url) {
	hauteur=Math.round((screen.availHeight-h)/2);
	largeur=Math.round((screen.availWidth-l)/2);
	window.open(url, "nbpopup", "toolbar=0,location=0,directories=0,status=0, scrollbars=1,resizable=1,menubar=0,top="+hauteur+",left="+largeur+",width="+l+",height="+h);
}
