var infoWindow;

function openInfoWindow(){
infoWindow = window.open("", "info", "width=600, height=400, top=200, left=200, toolbar=0, status=0, scrollbars=1, location=0, menubar=0, resizable=1");
}

function closeInfo()
{
infoWindow.close();
}

var childWindow="";
var t;
var x;
var y;
var id;
var lastid;

function openDotmapWindow(zmap, xoff, yoff, trail)
{
id = 'overlay' + zmap;
t = "SELECTED TRAIL = " + trail;
x = xoff;
y = yoff;
if (!childWindow.closed && childWindow.location)
  {
  childWindow.focus();
  childWindow.document.getElementById(lastid).style.visibility = "hidden";
  childWindow.document.childForm.cf1.value = "";
  childWindow.document.getElementById(id).style.left = x;
  childWindow.document.getElementById(id).style.top = y;
  childWindow.document.getElementById(id).style.visibility = "";
  childWindow.document.childForm.cf1.value = t;
  lastid = id;
  return;
  }

childWindow = window.open("", "info", "width=725, height=680, top=100, left=400, toolbar=0, status=0, scrollbars=1, location=0, menubar=0, resizable=1");
}

function PutDotMap()
{
childWindow.document.getElementById(id).style.left = x;
childWindow.document.getElementById(id).style.top = y;
childWindow.document.getElementById(id).style.visibility = "";
childWindow.document.childForm.cf1.value = t;
lastid = id;
}

function specialDotmapWindow(zmap, xoff, yoff, trail)
{
id = 'overlay' + zmap;
t = "SELECTED TRAIL = " + trail;
x = xoff;
y = yoff;
childWindow.document.getElementById(lastid).style.visibility = "hidden";
childWindow.document.childForm.cf1.value = "";
childWindow.document.getElementById(id).style.left = x;
childWindow.document.getElementById(id).style.top = y;
childWindow.document.getElementById(id).style.visibility = "";
childWindow.document.childForm.cf1.value = t;
lastid = id;
}
