/**
* main.js
*
* Auteur: Nicolas JARRAUD
* Date de création: 31.07.2008
* Dernière modification: 03.08.2008
*/

function $(id){
	return document.getElementById(id);
}

/*********************************************************
/*	  			Orientation de l'iPhone
/********************************************************/
function updateOrientation() {
	if(window.orientation != undefined) {
    	switch(window.orientation) { 
    	case 0: 
        	orient = "portrait"; 
        	break; 
    	case -90: 
        	orient = "landscape"; 
        	break; 
    	case 90: 
        	orient = "landscape"; 
        	break; 
    	case 180: 
        	orient = "portrait"; 
        	break; 
    	} 
    	document.body.setAttribute("orient", orient);
    
    	if(orient == "portrait") document.getElementById("viewport").setAttribute("content", "width=device-width, maximum-scale=1.0;", false);
    	else document.getElementById("viewport").setAttribute("content", "width=device-width, maximum-scale=1.0;", false);
    }
}
