var image="";

function Launch(url)
{
  var win = window.open(url,'win','left=20,top=20,width=550,height=415,toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes');
  win.focus();
}

function Entry(title, modifiers)
{
  var url = imageServer + "/" + image + modifiers;
  document.write('<br><font face="Arial" size="2" color="#E97517">' + title + '</font><br>');
  //document.write('<br><font face="Arial" size="1" color="#003399">' + modifiers + '</font><br>');
  document.write('<a href="javascript:Launch(\'' + url.replace(/\\/g, "\\\\") + '\')">');
  document.write('<img src="' + url + '" border="0"></a>');
}

function Link(title, modifiers)
{
  var url = imageServer + "/" + image + modifiers;
  document.write("<br>" + title + ": ");
  document.write('<a href="javascript:Launch(\'' + url.replace(/\\/g, "\\\\") + '\')">');
  document.write('<font face="Arial" size="2">' + url + '</font></a>');
}

function Header(flag)
{
  document.write('<p>');
  if (!unixRelease && (flag == "applet"))
    document.write('Click <a href=demoTrouble.htm target="_self">here</a> if the applet does not start or no image shows.</p>');
  else
  {
    if (flag != "nolinks")
      document.write('Click on an image to launch into a separate window, then change the url to experiment mit the values.');
    if (!unixRelease) {
	document.write('Click <a href=demoTrouble.htm target="_self">here</a> if the image(s) are broken.</p>');
    }
  }
  if (flag == "catalog")
    document.write("<p>The examples on this page use the 'sample' image catalog (normally in the <i>server_root</i>/catalog folder).</p>");
}

function createPopup(url, name, optionString) {
	if (url.length == 0){
		var url = "#";
	}
	if (name.length == 0){
		var name = "newwnd";
	}
	if (optionString.length == 0){
		var optionString = "toolbar=yes,location=yes,directories=no,scrollbars=yes,resizable=yes,height=700,width=800,screenX=4,screenY=4,top=4,left=4";
	}
	win = window.open(url, name, optionString);
	win.focus();
}

function openPopup(url, name, optionString) {
	if (url.length == 0){
		var url = "#";
	}
	if (name.length == 0){
		var name = "newwnd";
	}
	if (optionString.length == 0){
		var optionString = "toolbar=yes,location=yes,directories=no,scrollbars=yes,resizable=yes,height=700,width=800,screenX=4,screenY=4,top=4,left=4";
	}
	win = window.open(url, name, optionString);
	win.focus();
}