// LAYER FUNCTIONALITY
function MoveLayer(LayerName) {
  LayerName.style.left=event.clientX;
  LayerName.style.top=event.clientY;
  LayerName.style.visibility = "visible";
}

function MoveLayerEx(LayerName, MinusX, MinusY) {
  LayerName.style.left=event.clientX - MinusX;
  LayerName.style.top=event.clientY - MinusY;
}

function ShowLayer(LayerName) {
 LayerName.style.visibility = "visible";
}
function HideLayer(LayerName) {
 LayerName.style.visibility = "hidden";
}

// OPEN NEW WINDOWS
function openwin(URL,Name, Width, Height) {
   var lPos = screen.availWidth / 3.5;
   var tPos = screen.availHeight / 3.5;
   window.open(URL, Name, 'width=' + Width + ', height=' + Height + ', left='+lPos+', top='+tPos+', scrollbars=1,resizable=0');
}

// REFRESH PAGE / NAVIGATE TO PAGE
function GoTo(URL) {
  document.location.href=URL;
}

function BeginRefresh(URL,rTime) {
  if ((rTime=="") || (rTime==0)) { rTime=5000; }
  setTimeout("GoTo(URL);",rTime);
}
