var showLayer = function(layerName, scrollRelative) {
	if ($(layerName)) {
		var layer = $(layerName);
		if (!layer.orgY) {
			layer.orgY = layer.getCoordinates().top;
		}
		if (scrollRelative != null) {
			layer.orgY = window.getScrollTop()+scrollRelative;
		}
		if (layer.fx) {
			layer.fx.cancel();
		}else {
			layer.fx = new Fx.Morph(layerName, {
				duration: 500,
				transition: Fx.Transitions.linear
			});
		}
		layer.fx.start({
			"opacity": [0, 1],
			"top": [layer.orgY+20, layer.orgY]
		});
		//
		if (window.ie && !window.ie7 && $("maskIframe")) {
			var container = $$("body")[0].getChildren()[0];
			$("maskIframe").setStyles({
				top: layer.orgY,
				left: layer.getCoordinates().left-container.getPosition().x,
				width: layer.getCoordinates().width,
				height: layer.getCoordinates().height
			});
		}
	}
	ifrlayer.make(layer);
}
//
//-----------------------------------------------------------------------------------------------
var hideLayer = function(layerName, scrollRelative) {
	if ($(layerName)) {
		var layer = $(layerName);
		if (!layer.orgY) {
			layer.orgY = layer.getCoordinates().top;
		}
		if (scrollRelative != null) {
			layer.orgY = window.getScrollTop()+scrollRelative;
		}
		if (layer.fx) {
			layer.fx.cancel();
		} else {
			layer.fx = new Fx.Morph(layerName, {
				duration: 500,
				transition: Fx.Transitions.linear
			});
		}
		layer.fx.start({
			"opacity": [1, 0],
			"top": [layer.orgY-20, layer.orgY]
		});
		//
		if (window.ie && !window.ie7 && $("maskIframe")) {
			$("maskIframe").setStyles({
				top: "-1000px",
				left: 0
			});
		}
		
	}
}


var initPizza = function() {
	if ($("illusPizza")) {
		$("illusPizza").setStyles({
			top: -200,
			right: -180
		});
	}
}
var showPizza = function(){
	var layer = $("illusPizza");
	layer.fx = new Fx.Morph("illusPizza", {
				duration: 500,
				transition: Fx.Transitions.linear
			});
	layer.fx.start({
			"top": [-200, -5],
			"right": [-180, 0]
		});

}

function displayPassword(){
	if ($('password1').style.display=='none')
	{
		$('password1').setStyles({'display': 'block'});
		$('confirmNewPassword').setStyles({'display': 'block'});
		$('ptitPolice').setStyles({'display': 'block'});
	} else {
		$('password1').setStyles({'display': 'none'});
		$('confirmNewPassword').setStyles({'display': 'none'});
		$('ptitPolice').setStyles({'display': 'none'});
	}
}