function getPageSize()
{
	//Permet de recupere tt les infos (taille..) de la page
	var xScroll, yScroll;

	if (window.innerHeight && window.scrollMaxY) 
	{
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	}
	else if (document.body.scrollHeight > document.body.offsetHeight)
	{ //tout sauf mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} 
	else 
	{ //mac
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}

	var windowWidth, windowHeight;
	if (self.innerHeight) 
	{ //firefox
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) 
	{ //ie
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} 
	else if (document.body) 
	{ //autres
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}

	if(yScroll < windowHeight)
	{
		pageHeight = windowHeight;
	} 
	else
	{
		pageHeight = yScroll;
	}

	if(xScroll < windowWidth)
	{
		pageWidth = windowWidth;
	} 
	else 
	{
		pageWidth = xScroll;
	}

	var pageX = 0, pageY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) 
	{ //ns
		pageY = window.pageYOffset;
		pageX = window.pageXOffset;
	}
	else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) 
	{ //firefox...
		pageY = document.body.scrollTop;
		pageX = document.body.scrollLeft;
	} 
	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) 
	{ //ie6
		pageY = document.documentElement.scrollTop;
		pageX = document.documentElement.scrollLeft;
	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight, pageX, pageY)
	return arrayPageSize;
}

function AlignFooter()
{
	/*	if (!document.body)
	return;
	var obj = document.getElementById('dPanier');
	obj.style.top = "0px";*/
}
function ProductHighLight(id)
{
	document.getElementById('ligne_produit_2_'+id).style.backgroundColor = "#fde6ff";
	document.getElementById('ligne_produit_3_'+id).style.backgroundColor = "#fde6ff";
	document.getElementById('ligne_produit_4_'+id).style.backgroundColor = "#fde6ff";
	document.getElementById('ligne_produit_5_'+id).style.backgroundColor = "#fde6ff";
	document.getElementById('ligne_produit_1_'+id).style.width = "96px";	
	document.getElementById('ligne_produit_1_'+id).style.height = "96px";	
	document.getElementById('ligne_produit_1_'+id).style.border = "2px solid #CC0066";	
}

function ProductUnLight(id)
{
	if (!(parseInt(id) % 2))
	color = "#FFFFFF";
	else
	color = "#F4F4F4" 
	for (i = 2; i  < 6; i++)
	document.getElementById('ligne_produit_'+i+'_'+id).style.backgroundColor = color;
	document.getElementById('ligne_produit_1_'+id).style.width = "100px";	
	document.getElementById('ligne_produit_1_'+id).style.height = "100px";	
	document.getElementById('ligne_produit_1_'+id).style.border = "0px solid #FFFFFF";	
}

function set_swf_in_acceuil()
{
	name = navigator.appName;
	if (name == "Microsoft Internet Explorer")
	document.getElementById("flash_is_good").innerHTML = '<object id="id_swf" onmouseover="tell_flash_mouse_is_in()" onmouseout="tell_flash_mouse_is_out()" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="507" height="350"><param name="movie" value="img/site.swf" /><param name="quality" value="high" /><embed src="img/site.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="507" height="350"></embed></object>';
	else
	document.getElementById("flash_is_good").innerHTML = '<div onMouseOver="tell_flash_mouse_is_in()"><object onMouseOut="tell_flash_mouse_is_out()" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="507" height="350"><param name="movie" value="img/site.swf" /><param name="quality" value="high" /><embed id="id_swf" src="img/site.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="507" height="350"></embed></object></div>';
}

function tell_flash_mouse_is_out()
{
	document.getElementById("id_swf").unset_flag();
}

function tell_flash_mouse_is_in()
{
	document.getElementById("id_swf").set_flag();
}

function tell_flash_set_maison()
{
	document.getElementById("id_swf").set_maison();
	document.getElementById("rpm").style.color = "#cc0066";
	document.getElementById("rpt").style.color = "#666";
}

function tell_flash_set_pro()
{
	document.getElementById("id_swf").set_pro();
	document.getElementById("rpm").style.color = "#666";
	document.getElementById("rpt").style.color = "#cc0066";
}

function switchCompany()
{
	var id = document.getElementById("i_type");
	var company = document.getElementById("i_company");

	if (id.options[id.selectedIndex].value == '0')
	company.style.visibility = 'visible';
	else
	company.style.visibility = 'hidden';							
}

function blink()
{
	spans=document.getElementsByTagName('span');
	x = spans.length;
	for(var i=0; i<x; i++)
	{
		if(spans[i].getAttribute('class')=='blink')
		{
			if(spans[i].style.visibility=="hidden")
				spans[i].style.visibility="visible";
			else
				spans[i].style.visibility="hidden";
		}
	}
	setTimeout("blink()",1000);
}
