//masquer la bar de l'url au lancement du site
if (navigator.userAgent.indexOf('iPhone') != -1) {
        addEventListener("load", function() {
                setTimeout(hideURLbar, 0);
        }, false);
}

//fonction qui va forcer le navigateur de l'iphone à scroller d'un cran
function hideURLbar() {
        window.scrollTo(0, 1);
}

/**********************************************************************************************/

//Gestion de la css en fonction de la position de l'iphone
function orient(){  
	switch(window.orientation){    
		case 0: document.getElementById("orient_css").href = "_css/iphone_portrait.css";
		break;  
		case -90: document.getElementById("orient_css").href = "_css/iphone_landscape.css";  
		break;  
		case 90: document.getElementById("orient_css").href = "_css/iphone_landscape.css";  
		break;  
	}
}  
window.onload = orient();  

