var ns = (navigator.appName == 'Netscape');
//var ie = (navigator.appName == 'Microsoft Internet Explorer');
var ie = (document.all) ? 1 : 0;

var ns4 = (ns && parseInt(navigator.appVersion) >= 4 && parseInt(navigator.appVersion) < 5);
var ie4 = (ie && parseInt(navigator.appVersion) >= 4);
function AreaWidth()
{
 if(ie4)
  return document.body.clientWidth;
 else
  if(ns4)
   return window.innerWidth;
}
function LMoveTo(ly,X,Y)
{
 if(ie4)
 {
  document.all[ly].style.pixelLeft=X;
  document.all[ly].style.pixelTop=Y;
 }
 else
  if(ns4)
  {
   document.layers[ly].left=X;
   document.layers[ly].top=Y;
  }
}
function LSetVis(l,StrIE, StrNN)
{
 if(ie4)
  document.all[l].style.visibility=StrIE;
  else
   if(ns4)
    document.layers[l].visibility=StrNN;
}
function LShow(ly)
{
 LSetVis(ly,'visible','show');
}
function LHide(ly)
{
 LSetVis(ly,'hidden','hide')
}
function LGetVis(ly)
{
 return ((ie4 && document.all[ly].style.visibility=='visible')||(ns4 && document.layers[ly].visibility=='show'))?1:0;
}
