// Open the specified URL in a named window at the spedified height/width
function viewImage(sURL, nWidth, nHeight) {
	var aFeat = Array();

	aFeat[0] = "width=" + nWidth;
	aFeat[1] = "height=" + nHeight;
	aFeat[2] = "directories=0";
	aFeat[3] = "location=0";
	aFeat[4] = "menubar=0";
	aFeat[5] = "resizable=1";
	aFeat[6] = "scrollbars=0";
	aFeat[7] = "status=0";
	aFeat[8] = "toolbar=0";

	if (window.altWindow) { window.altWindow.close(); }	
	window.altWindow = window.open(sURL, 'imgView', aFeat.join(","));
	window.altWindow.focus();

	return false;
}

// Write a mailto: link and hide from harvesters.
// the sDom argument is the domain name with '%23' in place of '.'
function setLink(sDom, sUser, sText) {
	document.write("<a href=\"");
	document.write("ma");
	document.write("ilt");
	document.write("o:" + sUser);
	document.write("@");
	document.write(sDom.replace(/%23/g, ".") + "\">");
	if ( sText ) {
		document.write(sText);
	} else {
		document.write(sUser);
		document.write("@");
		document.write(sDom.replace(/%23/g, "."));
	}
	document.write("</a>");
  return;
}
