// ****************************************************************
// *** Code Javascript pour la gestion du fadding du centenu	***
// *** Administration CVOMarket V3.00.00						***
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// *** Version script	1.00.00									***
// *** Date				13/08/2008								***
// ****************************************************************

var TLibVar_TimerFadeOff = 0;

function doFadeContent(TLibVar_Height, TLibVar_Width){
	var scrOfX = 0, scrOfY = 0;

	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//Firefox compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//IE6
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	}

	// *** Mettre la frame du centenu en arrière plan ***
	document.getElementById('LayerMainFrame').style.zIndex = -1;
	// *** Mettre la frame opaque en avant plan ***
	document.getElementById('LayerFadeFrame').style.display = 'block';
	document.getElementById('LayerFadeFrame').style.width	= document.body.offsetWidth+'px';
	document.getElementById('LayerFadeFrame').style.height	= document.getElementById('LayerMainFrame').offsetHeight+'px';
	// *** Firefox ***
	document.getElementById('LayerFadeFrame').style.opacity	= '0.8';
	// *** IE ***
	document.getElementById('LayerFadeFrame').style.filter	= 'alpha(opacity:80);';
	// *** Afficher la frame Popup ***
	document.getElementById('LayerPopup').style.display = 'block';
	document.getElementById('LayerPopup').style.width	= TLibVar_Width+'px';
	document.getElementById('LayerPopup').style.height	= TLibVar_Height+'px';
	document.getElementById('LayerPopup').style.top		= scrOfY+10+'px';
	document.getElementById('LayerPopup').style.left	= parseInt((document.getElementById('LayerMainFrame').offsetWidth/2)-(TLibVar_Width/2))+'px';
}

function doUnFadeContent(){
	// *** Mettre la frame du centenu en avant plan ***
	document.getElementById('LayerMainFrame').style.zIndex = 3;
	// *** Mettre la frame opaque en arrière plan ***
	document.getElementById('LayerFadeFrame').style.width	= '0px';
	document.getElementById('LayerFadeFrame').style.height	= '0px';
	// *** Firefox ***
	document.getElementById('LayerFadeFrame').style.opacity	= '1';
	// *** IE ***
	document.getElementById('LayerFadeFrame').style.filter	= 'alpha(opacity:100);';
	document.getElementById('LayerFadeFrame').style.display = 'none';
	// *** Cacher la frame Popup ***
	document.getElementById('LayerPopup').style.width	= '0px';
	document.getElementById('LayerPopup').style.height	= '0px';
	document.getElementById('LayerPopup').style.top		= '0px';
	document.getElementById('LayerPopup').style.left	= '0px';
	document.getElementById('LayerPopup').style.display = 'none';
	document.getElementById('LayerPopup').innerHTML		= '';
}
