// javascript functions for Wright Experience project.
// Cognitive Applications, 2001.

<!--
if (document.images) {
  image1on = new Image();
  image1on.src = "../images/nav/past_on.gif";

  image1off = new Image();
  image1off.src = "../images/nav/past_off.gif";
  
  image2on = new Image();
  image2on.src = "../images/nav/demo_on.gif";

  image2off = new Image();
  image2off.src = "../images/nav/demo_off.gif";
  
  image3on = new Image();
  image3on.src = "../images/nav/legacy_on.gif";

  image3off = new Image();
  image3off.src = "../images/nav/legacy_off.gif";

}


function changeImages() {
  if (document.images) {
    for (var i=0; i < changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

function launchInPopup(ref, w, h)
{
	// in case forgot to specify w & h
	if (isNaN(w)) w = 500;
	if (isNaN(h)) h = 500;
	
	// set up the winfeatures string
	winfeatures = "height=" + h + ",width=" + w;
	winfeatures += ",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0";

	// open the window/load the document
	popup = open(ref, "WRpopup", winfeatures);
	
	// if the window was already open with a different size, it won't have changed - resize it explicitly
	popup.resizeTo(w, h);
	
	// if the window was already open, some browsers won't have brought it to the front
	popup.focus();
}
function launchInMain(ref)
    {
        if (self.opener == null)
            self.location = ref;
        else {
            self.opener.location = ref;
            self.opener.focus();
        }
    }
