//debugWin = window.open("","debugWin","height=500,width=400,resizable=yes,scrollbars=yes");

function println(str) {
  debugWin.document.writeln(str+"<br>");
}

function openPopupWindow(page, width, height) {
      features = "width="+width+","
               + "height="+height+","
               + "toolbar=no,"
               + "location=no,"
               + "status=no,"
               + "menubar=no,"
               + "scrollbars=no,"
               + "top="+(window.screen.height-height)/2+","
               + "left="+(window.screen.width-width)/2;
      window.open("/moonshine/"+page,"updWin",features);
    }
		
function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

  function toggleImageOn(name) {
    img = document.images[name+"Image"];
    if ( img ) {
      imgSrc = img.src;
      if (imgSrc.indexOf("off.gif") != -1) {
        imgName = imgSrc.substring(0,imgSrc.indexOf("off.gif"));
        img.src = imgName + "on.gif";
      }
    }
  }

  function toggleImageOff(name) {
    img = document.images[name+"Image"];
    if ( img ) {
      imgSrc = img.src;
      if (imgSrc.indexOf("on.gif") != -1) {
        imgName = imgSrc.substring(0,imgSrc.indexOf("on.gif"));
        img.src = imgName + "off.gif";
      }
    }
  }
function editWin(url){
top.document.editframe.window.location = url;
}