// Affichage popup alert
function alertViewCustom(type, lang) {
	$("#alert").page({reqSend:'&type='+type+'&id_var='+lang,urlTarget:'_content/_ajax/alert.php'});
	enabledScroolBar();
	
	$('#alert').fadeIn('10');
}

function enabledScroolBar() {
	$("html, body").css("overflow", "visible");
	$("html, body").css("overflow-x", "visible");
	$("html, body").css("height", "100%");
	$("html, body").css("overflow", "hidden");	
}

// Reaffichage scroolbar
function disableScroolBar() {
	$("html, body").css("height", "auto");
	$("html, body").css("overflow", "auto");
	$("html, body").css("overflow-x", "hidden");
	
	$('#alert').fadeOut('10');
}

// Reaffichage à retardement
function FinAlertViewCustom() {
	$('#alert').fadeOut('10');
	
	setTimeout('disableScroolBar()',1000);	
}

// ouverture d'une popup
function ouverturePopUp(url, name, width, height) {
	//$(document).
	var x = (screen.width - width) / 2;
	var y = ((screen.height - height) / 2) - 450;
	
	if(width == '') { var width = screen.width - 50; }
	if(height == '') { var height = screen.height - 150; }

	window.open(url, name, 'width='+width+',height='+height+',left='+x+',top='+y+',screenX='+x+',screenY='+y+'');
}
