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,x,y) {

if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "visible";
document.getElementById(whichLayer).style.top=x;
document.getElementById(whichLayer).style.left=y;
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "visible";
document.all[whichlayer].style.top=x;
document.all[whichlayer].style.left=y;
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "visible";
document.layers[whichLayer].top=x;
document.layers[whichLayer].left=y;
}
}
// Hien thi layer ra ngoai
function hienthi(layer,w,h)
{
if (window.innerWidth || window.innerHeight){ 
docwidth = window.innerWidth; 
docheight = window.innerHeight; 
} 
//IE Mozilla 
if (document.body.clientWidth || document.body.clientHeight){ 
docwidth = document.body.clientWidth; 
docheight = document.body.clientHeight; 
}
posx=docheight/2-h;
posy=docwidth/2-w;
showLayer(layer,posx,posy);
}

