// build pop-up thank you window -- kf 6/26/01 -- rev: 07/03/01

var newWindow;
var displayName = "";
var location ="";
function displayPic(picName, picW, picH, displayName, location)
	{
	if (arguments.length == 4) location = "cc";
	if (newWindow) {
		if (!newWindow.closed) { newWindow.close(); }
		}
	var pad = 10;
	var closeH = 12;
	picH = picH+closeH+(2*pad);
	picW = picW+(2*pad);
	var aw = screen.availWidth;
  var ah = screen.availHeight;
	var centerW = .5; var centerH = .5;
	var rightW = .75; var rightH = .5;
	var leftW = .25; var leftH = .5;
	newWindow = window.open("","","status,height="+picH+",width="+picW+",left="+aw)
	newWindow.blur()
	// move the newWindow to the center of the screen
	if (window.screen)
		{
		switch (location)
			{
			case "rc":					// right-center
				{
				ah = (ah-picH)*rightH;
				aw = (aw-picW)*rightW;
				break;
				}
			case "lc":					// left-center
				{
				ah = (ah-picH)*leftH;
				aw = (aw-picW)*leftW;
				break;
				}
			case "cc":					// center-center
			default: 
				{
				ah = (ah-picH)*centerH;
				aw = (aw-picW)*centerW;
				break;
				}
			}
	  newWindow.moveTo(aw, ah); // move it (behind the parent window)
		}
	newWindow.focus() //pop it to the front		
	if (!newWindow.opener) { newWindow.opener = window	}
	// content for the new window
	var newContent = "<HTML><HEAD><TITLE>"+displayName+"</TITLE></HEAD><BODY LINK=\"#eeeeee\" ALINK=\"#eeeeee\" VLINK=\"#eeeeee\" bgcolor=\"#000066\"><a href=\"javascript:window.close()\" ONMOUSEOVER=\"window.status=''; return true;\"><img alt=\" Close \" src=\""+picName+"\" border=\"0\"></a>"
	newContent += "<CENTER><font face=\"Verdana, Arial, Helvetica\" size=\"-1\" color=\"eeeeee\">&#151; <a href=\"javascript:window.close()\" ONMOUSEOVER=\"window.status=''; return true;\">Close</a> &#151;</font></CENTER></BODY></HTML>"
	// write HTML to new window
	newWindow.document.write(newContent)
	newWindow.document.close() // close layout stream
	newWindow.defaultStatus = '';
	}

