//GENERACTION // Sébastien Goffin
//attributions des fonctions selon les actions
window.onload = resizeFlash;
window.onresize = resizeFlash;

//taille du flash en fonction de la taille de la fenetre
function resizeFlash() 
{
    var conteneur = document.getElementById('flashcontent');
    function largeur_fenetre(){
        if (window.innerWidth) return window.innerWidth;
        else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
        else return 0;
    }

    function hauteur_fenetre(){
        if (window.innerHeight) return window.innerHeight  ;
        else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
        else return 0;
    }
	
	if(largeur_fenetre() <= 1210){
		//alert('moins large');
		conteneur.style.width = '1210px';
	} else {
		//alert('plus large');
		conteneur.style.width = '100%';
	}
	
	if(hauteur_fenetre() <= 680) {
		//alert('moins haut');
		conteneur.style.height = '680px';
	} else {
		//alert('plus haut');
		conteneur.style.height = '100%';
	}
}

