// safemailto 0.2 - generate email address - antispam measure
// developed by Stuart Udall stu@cyberdelix.net (based on source from authors unknown)
function safemailto(email1, email2) {
 document.write("<a h" + "ref=" + "mail" + "to:" + email1 + "@" + email2 + ">" + email1 + "@" + email2 + "</a>");
}

// writeimgdata 0.2 - open popup and write image data directly into it
// ensure to call with the parameters populated - there's no error checking! :)
// developed by Stuart Udall stu@cyberdelix.net
function writeimgdata(contentURL, width, height, title, caption) {
 var defaulttitle="utopianviolet.com";
 var imgwin = window.open('about:blank','','width=' + width + ',height=' + height);
 // set the title to appear if none is supplied
 if (!title) {
  title=defaulttitle;
 }
 imgwin.document.open('text/html');
 imgwin.document.write('<HTML><HEAD><TITLE>' + title + '</TITLE></HEAD>');
 imgwin.document.write('<body bgcolor=black text=white vlink=white link=white alink=black leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginwidth=0 marginheight=0>');
 imgwin.document.write('<table border=0 cellpadding=0 cellspacing=0 width=100%>');
 imgwin.document.write('<tr><td height=20 width=20>&nbsp;</td><td>&nbsp;</td><td height=20 width=20>&nbsp;</td>');
 imgwin.document.write('<tr><td>&nbsp;</td><td valign=top align=center>');
 imgwin.document.write('<a href=# onClick=window.self.close(); onFocus="if(this.blur)this.blur()"><img src=' + contentURL + ' class=popuppicborder alt=" click to close " border=0 hspace=0 vspace=0></a>');
 imgwin.document.write('</td><td>&nbsp;</td></tr>');
 imgwin.document.write('<tr><td>&nbsp;</td><td><!-- start of text area --><br>');
 imgwin.document.write('<table border=0 cellpadding=2 cellspacing=0 width=100%>');
 imgwin.document.write('<tr><td valign=top align=left>');
 if (caption) {
  imgwin.document.write('<div class=pagenote><b>' + caption + '</b></div>');
 }
 imgwin.document.write('</td><td valign=top align=right>');
 imgwin.document.write('<a href=# onClick=window.self.close();>close</a>');
 imgwin.document.write('</td></tr></table><!-- end of text area -->');
 imgwin.document.write('</td><td>&nbsp;</td></tr></table>');
 imgwin.document.write('</BODY></HTML>');
 imgwin.document.close();
}
