<!--
	// window.name = "new";
	function makePopup() {
		window.open( "", "popup", "width=500,height=450,toolbar,location,status,menubar,scrollbars,resizable");
	}
	
//  code by Alan Dix  © 2004   http://www.meandeviation.com/
//  you are free to use, copy, or distribute this code so long as this notice
//  is included in full and any modifications clearly indicated

function email_addr(name,host,isLink,otherName) { // ADDED otherName for
	                                          // when the link isn't the
                                                  // email address
    var email = name + "@" + host;
    if (otherName)  { // ADDED new case
         isLink = 1; // ADDED - link must be live  
         document.write("<a href=\"mailto:" + email + "\">");
         document.write(otherName); // ALTERED
         document.write("</a>");
         document.close();
   }  else  {  // UNMODIFIED from here
         if ( isLink ) document.write("<a href=\"mailto:" + email + "\">");
         document.write(email);
         if ( isLink ) document.write("</a>");
         document.close();
   }
}

var popup=0;

function openWindow(URL,winName,params) { //v2.0
  popup=window.open(URL,winName,params);
  if (!popup.opener)
   { popup.opener=self; }
  popup.focus();  
}

function openImageWindow(imgurl,imgwidth,imgheight,title,width,height,winname,artist,work,photo,comment) {
    if ( ! imgurl.match(/^\w+:/) ) {   // should never happen, link.href makes urls absolute
		var myurl = location.href;
		var baseurl = myurl.replace(/\/[^\/]+$/,"/");
		imgurl = baseurl + imgurl;
	}
	var url = BASEURL + "info/imagedisplay.php?imgurl=" + escape(imgurl) + "&imgwidth=" + escape(imgwidth) + "&imgheight=" + escape(imgheight) + "&title=" + escape(title) + "&artist=" + escape(artist) + "&work=" + escape(work) + "&photo=" + escape(photo) + "&comment=" + escape(comment);
	openWindow(url,winname,'scrollbars=yes,resizable=yes,width=' + width + ',height=' + height); 
}


//-->
