function hideLayer(whichLayer) {
if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "hidden";
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "hidden";
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "hidden";
}
}

function showLayer(whichLayer) {
if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "visible";
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "visible";
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "visible";
}
moveLayer(whichLayer);
} 

 function writeLayer(toThis)
  {
  if (document.getElementById)
    {
    document.getElementById("textDiv").innerHTML = toThis;
	
    }
  else if (document.all)
    {
    document.all["textDiv"].innerHTML = toThis;
	
    }
  }

function moveLayer(whichLayer)
{
	if (document.body)
	{
		var larg = (document.documentElement.clientWidth) /2;
		var haut = (document.documentElement.clientHeight)/2 ;
		//alert('larg='+larg+'haut='+haut);
	}
	else
	{
		var larg = (window.innerWidth)/2 ;
		var haut = (window.innerHeight)/2;
		
	}
	 
	
	if (document.getElementById)
	{
		
		var t = haut - (parseInt(document.getElementById(whichLayer).style.height) /2);
		var l = larg - (parseInt(document.getElementById(whichLayer).style.width) /2);
		
		document.getElementById(whichLayer).style.top =  t+'px';
		document.getElementById(whichLayer).style.left = l+'px';
		
		//alert('larg='+larg+'  haut='+haut+'  l='+l+'  t='+t);
	}
	else if (document.all)
	{
		var t = haut - (parseInt(document.all[whichlayer].style.height) /2);
		var l = larg - (parseInt(document.all[whichlayer].style.width) /2);
		
		document.all[whichlayer].style.top =   t+'px';
		document.all[whichlayer].style.left =  l+'px';
		
		
	}
	else if (document.layers)
	{
		var t = haut - (parseInt(document.layers[whichLayer].height) /2);
		var l = larg - (parseInt(document.layers[whichLayer].width) /2);
		
		document.layers[whichLayer].top =   t+'px';
		document.layers[whichLayer].left =  l+'px';
		
		
	}
	
	
}