layer_ativa="";

function mostralayer(x){
	
	if(layer_ativa!=x){

		if(layer_ativa!="") Effect.Fade(layer_ativa);
	
//alert((getClientWidth()-498)/2);
		setLeft(x, ((getClientWidth()-498)/2)-(getClientWidth()-750)/2);
		setTop(x, ((getClientHeight()-398)/2));
	
		Effect.Appear(x);
		
		layer_ativa=x;
		
	} else {
		
		Effect.Fade(layer_ativa);
		layer_ativa="";
	}

	
}

function getClientWidth()
{
  var x = window.innerWidth ||
          document.documentElement.clientWidth ||
          document.body.clientWidth;

  return x ? x : 0;
};

function getClientHeight()
{
  var x = window.innerHeight ||
          document.documentElement.clientHeight ||
          document.body.clientHeight;


  return x ? x : 0;
};

function setTop(obj, x)
{
  obj = $(obj);
  obj.style ? obj.style.top = x + "px" : obj.top = x;
};

function setLeft(obj, x)
{
  obj = $(obj);
  obj.style ? obj.style.left = x + "px" : obj.left = x;
};