function openImage(imageName,imageWidth,imageHeight,alt)
{
    //alert("imageName: \"" + imageName + "\"\nSize: " +
    //  imageWidth + "x" + imageHeight + "\nTitle: \"" + alt + "\"");
    Params = "width=" + (imageWidth * 1 + 34) + ",height=" +
	(imageHeight * 1 + 62) + ",left=0,top=0," + "title='" + alt + "'";
    //alert("Params: " + Params);
    newWindow = window.open("", "newWindow", Params);
    newWindow.document.open();
    newWindow.document.write('<html>\n' +
      '<head>\n' +
      '<title>' + alt + '</title>\n' +
      '<link rel="stylesheet" type="text/css" href="stylesheet.css">' +
      '</head>\n' +
      '<body bgcolor=white leftmargin=0 topmargin=0 ' +
      'marginheight=0 marginwidth=0 vspace=7 ' +
      'onClick="self.close()">\n' + 
      '<center>\n' +
      '<div style=\"font-size:12pt; font-weight:bold; margin-bottom:3px\">' +
      alt + '</div>\n' +
      '<img style=\"border:solid black 1px\" src="' + imageName+'" ' +
      'width=' + imageWidth +
      ' height=' + imageHeight +
      ' alt=\"' + alt + '\" ' +
      'title=\"Click on this image to close this window\">' +
      '</center>\n' +
      '</body>\n' +
      '</html>');
    newWindow.document.close();
    newWindow.focus();
}

/////////////////////////////////////////////////////////////////////////////
function openImageWithClass(imageName,imageWidth,imageHeight,alt,
			    CSS,bodyClass,textClass,imgClass)
{
    //alert("imageName: \"" + imageName + "\"\nSize: " +
    //  imageWidth + "x" + imageHeight + "\nTitle: \"" + alt + "\"");
    //dHeight = 0;
    TitleLength = alt.length;
    //alert("TitleLength: " + TitleLength);
    dHeight = parseInt(TitleLength / 50) * 25;
    //alert("dHeight: " + dHeight);
    Params = "width=" + (imageWidth * 1 + 40) + ",height=" +
    	(imageHeight * 1 + dHeight + 70) + ",left=0,top=0," + "title='" +
    	alt + "'";
    //alert("Params: " + Params);
    newWindow = window.open("", "newWindow", Params);
    newWindow.document.open();
    newWindow.document.write('<html>\n' +
      '<head>\n' +
      '<title>' + alt + '</title>\n' +
      '<link rel="stylesheet" type="text/css" href="' + CSS + '">\n' +
      '</head>\n' +
      '<body class="' + bodyClass + '" ' +
      'onClick="self.close()">\n' + 
      '<center>\n' +
      '<div class="' + textClass + '">' + alt + '</div>\n' +
      '<img class="' + imgClass + '" src="' + imageName+'" ' +
      'width=' + imageWidth + ' height=' + imageHeight +
      ' alt=\"' + alt + '\" ' +
      'title=\"Click on this image to close this window\">' +
      '</center>\n' +
      '</body>\n' +
      '</html>');
    newWindow.document.close();
    newWindow.focus();
}

//////////////////////////////////////////////////////////////////////////////
function openImage2(imageName,imageWidth,imageHeight,title,caption)
{
    //alert("imageName: \"" + imageName + "\"\nSize: " +
    //  imageWidth + "x" + imageHeight + "\nTitle: \"" + alt + "\"");
    Params = "width=" + (imageWidth * 1 + 34) + ",height=" +
	(imageHeight * 1 + 62) + ",left=0,top=0," + "title='" + title + "'";
    //alert("Params: " + Params);
    newWindow = window.open("", "newWindow", Params);
    newWindow.document.open();
    newWindow.document.write('<html>\n' +
      '<head>\n' +
      '<title>' + title + '</title>\n' +
      '<link rel="stylesheet" type="text/css" href="stylesheet.css">' +
      '</head>\n' +
      '<body bgcolor=white leftmargin=0 topmargin=0 ' +
      'marginheight=0 marginwidth=0 vspace=7 ' +
      'onClick="self.close()">\n' + 
      '<center>\n' +
      '<div style=\"font-size:12pt; font-weight:bold; margin-bottom:3px\">' +
      caption + '</div>\n' +
      '<img style=\"border:solid black 1px\" src="' + imageName+'" ' +
      'width=' + imageWidth +
      ' height=' + imageHeight +
      ' alt=\"' + caption + '\" ' +
      'title=\"Click on this image to close this window\">' +
      '</center>\n' +
      '</body>\n' +
      '</html>');
    newWindow.document.close();
    newWindow.focus();
}

//////////////////////////////////////////////////////////////////////////////
function openText(Title, Text, windowWidth, windowHeight)
{
    //alert("Got to openText.");
    newWindow = window.open("", "newWindow", "width=" + windowWidth +
      ",height=" + windowHeight + ",left=0,top=0");
    newWindow.document.open();
    newWindow.document.write('<html>\n' +
			     '<head>\n' +
			     '<link rel="stylesheet" type="text/css" ' +
			     'href="../stylesheet.css">\n' +
                             '<title>' + Title + '</title>\n' +
			     '</head>\n' +
			     '<body bgcolor=white leftmargin=0 topmargin=0 ' +
			     'marginheight=10 marginwidth=10 ' +
			     'onClick="self.close()">\n' + 
			     Text +
			     '</body>\n' +
			     '</html>');
    newWindow.document.close();
    newWindow.focus();
}


//////////////////////////////////////////////////////////////////////////////
function openBio(Title, Image, Text, windowWidth, windowHeight)
{
    //alert("Title: " + Title);
    newWindow = window.open("", "newWindow", "width=" + windowWidth +
      ",height=" + windowHeight + ",left=0,top=0");
    newWindow.document.open();
    newWindow.document.write('<html>\n' +
			     '<head>\n' +
			     '<link rel="stylesheet" type="text/css" ' +
			     'href="../stylesheet.css">\n' +
                             '<title>' + Title + '</title>\n' +
			     '</head>\n' +
			     '<body bgcolor=white leftmargin=0 topmargin=0 ' +
			     'marginheight=10 marginwidth=10 ' +
			     'onClick="self.close()">\n' + 
			     '<img src="' + Image + '" border=1 align=left ' +
			     'hspace=7>\n' +
			     Text +
			     '<p align=center>\n' +
			     '<font size=-1><i>(click this window to dismiss ' +
			     'it)</i></font>\n' +
			     '</body>\n' +
			     '</html>');
    newWindow.document.close();
    newWindow.focus();
}

