var explodeLayer = null;
window.addEvent('domready',function(){
	swfobject.embedSWF(
		'fileadmin/templates/accueil.swf',
		'animMaisonCnt',
		992,
		312,
		'10.0.0',
		'/fileadmin/templates/swfobject/expressInstall.swf',
		false,
		{allowFullScreen: true,wmode:'transparent'},
		{id:"animMaison",name:"animMaison"}
	);
		
});

function showBlock(){
	var size = $(document.body).getScrollSize();

	var offset = parseInt(1400 - size.x) / 2;
	offset = parseInt(-1 * offset);
	explodeLayer.setStyles({
		'top':0,
		'left': offset,
		'height': 826,
		'width': 1400
	});
}

function hideBlock(){
	explodeLayer.setStyles({
		'height': 1,
		'width': 1
	});
}

function explodeDiv(){
	if(!$('explodelayer'))
	{
		explodeLayer = new Element('div',{id:'explodelayer',style:'overflow:hidden;width:1px;height:1px;z-index:15000;top:0px;left:0px;position:absolute;'});

		$(document.body).adopt(
			explodeLayer.adopt(new Element('div',{id:'explode_swf'}))
		);

	
		swfobject.embedSWF(
			'fileadmin/templates/explode.swf',
			'explode_swf',
			1400,
			826,
			'10.0.0',
			false,
			false,
			{allowFullScreen: true,wmode:'transparent'},
			{id:"explode",name:"explode"}
		);
	}
}

function configDiv(configurateur){
	
	
	configLayer = new Element('div',{id:'configlayer',style:'width:1000px;height:610px;z-index:16000;top:56px;left:200px;position:absolute;'});
	$('explodelayer').adopt(
		configLayer.adopt(new Element('div',{id:'config_swf'}))
	);
	
	swfobject.embedSWF(
		'fileadmin/contributions/Produits/Configurateurs/CONFIGURATEUR_'+configurateur+'/configurateur_'+configurateur+'.swf',
		'config_swf',
		1000,
		610,
		'10.0.0',
		false,
		false,
		{allowFullScreen: true,wmode:'transparent', base: 'fileadmin/contributions/Produits/Configurateurs/CONFIGURATEUR_'+configurateur+'/'},
		{id:"explode",name:"explode"}
	);
}

function suppConfig(){
	$('configlayer').destroy();
}
