

// FONCTION POUR IMAGE PLEIN ECRAN
function scaleImage(monImage){
	// LARGEUR ET HAUTEUR DE LA FENETRE SELON LE NAVIGATEUR
    var LargeurWin = 0, HauteurWin = 0;
  	if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    LargeurWin = window.innerWidth;
    HauteurWin = window.innerHeight;
  		} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    LargeurWin = document.documentElement.clientWidth;
    HauteurWin = document.documentElement.clientHeight;
  		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    LargeurWin = document.body.clientWidth;
    HauteurWin = document.body.clientHeight;
  	}

	if (LargeurWin > HauteurWin + 150) {
	var MyWidth = LargeurWin;
	var MyHeight = Math.round((LargeurWin*900)/1200);
	}
	else {	
	var MyHeight = HauteurWin + 50;
	var MyWidth = Math.round((HauteurWin*1200)/900)+ 50;
	}
	
	document.getElementById(monImage).style.width=MyWidth+'px';
	document.getElementById(monImage).style.height=MyHeight+'px';

}





// ON DOMREADY
	
window.addEvent('domready', function() {
	scaleImage('picture');
	 }
);


// ON RESIZE
window.addEvent('resize',function(e){
		
		scaleImage('picture');
		
	}
);




