//FONCTION DE LOIC HORELLOU http://lohic.free.fr
//MERCI A EMMANUEL GAILLE http://blanc.blanc.free.fr/ pour les tests de versions

function tailleImage(type)
{
	var marge;
	if(type == "fullscreen")
	{
		marge = 0;
	}
	else
	{
		marge = 420;
	}
	
	var screenW = 0;
	var screenH = 0;
	
	if(typeof(window.innerWidth) == "number" )
	{
		//Non-IE
		screenW = window.innerWidth - marge;
		screenH = window.innerHeight;
	}
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
	{
		//IE 6+ in 'standards compliant mode'
		screenW = document.documentElement.clientWidth - marge;
		screenH = document.documentElement.clientHeight;
	}
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{
		//IE 4 compatible
		screenW = document.body.clientWidth - marge;
		screenH = document.body.clientHeight;
	}
	
	if(type == "fullscreen")
	{
		if((screenH / screenW) <= (3 / 4))
		{
			//100% largeur
			document.getElementById("img_fond").style.width = screenW + "px";
			document.getElementById("img_fond").style.height = (screenW * (3 / 4 ))+ "px";
		}
		else if((screenH / screenW) > (3 / 4))
		{
			//100% hauteur
			document.getElementById("img_fond").style.width  = (screenH * (4 / 3)) + "px";
			document.getElementById("img_fond").style.height = screenH + "px";
		}
	}
	else
	{
		if((screenH / screenW) <= 1)
		{
			//100% largeur
			document.getElementById("img_fond").style.width = screenW + "px";
			document.getElementById("img_fond").style.height = screenW + "px";
		}
		else if (screenH/screenW > 1)
		{
			//100% hauteur
			if(screenW > screenH)
				document.getElementById("img_fond").style.width = screenW + "px";
			else
				document.getElementById("img_fond").style.width = screenH + "px";
			
			document.getElementById("img_fond").style.height = screenH + "px";
		}
	}
}

function tailleBloc()
{
	var screenW = 0;
	var screenH = 0;
	
	if(typeof(window.innerWidth) == "number")
	{
		//Non-IE
		screenW = window.innerWidth;
		screenH = window.innerHeight;
	}
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
	{
		//IE 6+ in 'standards compliant mode'
		screenW = document.documentElement.clientWidth;
		screenH = document.documentElement.clientHeight;
	}
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{
		//IE 4 compatible
		screenW = document.body.clientWidth;
		screenH = document.body.clientHeight;
	}
}

function initScrollLayer()
{

}

