function showImage(name, align, space) {
	for (var i=0; i<imageNames.length; i++) {
		if (imageNames[i] == name) {   // This is the image to show
			var html = "<img src=\"/" + dbname + "/0/" + imageUNIDs[i] + "/$file/";
			html += imageAttachments[i] + "\" height=\"" + imageHeights[i];
			if (align != "") { html += "\" align=\"" + align; }
			if (space != "") { html += "\" vspace=\"" + space + "\" hspace=\"" + space; }
			html += "\" width=\"" + imageWidths[i] + "\" alt=\"" + name + "\">";
			document.write(html);
		}  // Ends the check to see if this is the image to show
	}  // Go on to the next image name
}   // Ends the "Show Image" function

function linkToImage(name) {
	for (var i=0; i<imageNames.length; i++) {
		if (imageNames[i] == name) {   // This is the image to show
			var winParms = "width=" + (parseFloat(imageWidths[i])+15) + ",height=" + (parseFloat(imageHeights[i])+20);
			winParms += "top=0,left=0";
			var winURL = "/" + dbname + "/0/" + imageUNIDs[i] + "/$file/" + imageAttachments[i];
			var win = window.open(winURL, "Figure", winParms);
		}  // Ends the check to see if this is the image to link to
	}  // Go on to the next image name
}   // Ends the "Link To Image" function

function linkToAttachment(name, title) {
	for (var i=0; i<attachmentNames.length; i++) {
		if (attachmentNames[i] == name) {   // This is the attachment to show
			var html = "<a href=\"/" + dbname + "/0/" + attachmentUNIDs[i];
			html += "/$file/" + attachmentAttachments[i] + "\">" + title + "</a>";
			document.write(html);
		}  // Ends the check to see if this is the image to link to
	}  // Go on to the next attachment name
}   // Ends the "Link To Attachment" function

function linkToDocument(name, ssl) {
	for (var i=0; i<linkNames.length; i++) {
		if (linkNames[i] == name) {   // This is the document to show
			if (ssl == "Yes") {
				var newURL = "https://secure.breakingpar.com/" + dbname;
				newURL += "/0/" + linkUNIDs[i];
			} else {
				var newURL = "/" + dbname + "/0/" + linkUNIDs[i];
			}
			document.location = newURL;
		}  // Ends the check to see if this is the document to link to
	}  // Go on to the next document name
}   // Ends the "Link To Document" function

