var imageroot = "/imagebank/";

var glossaryLocation = "/goose/tools/glossary.js";
var imagePageLocation = "/goose/tools/largeImage.cgi";


/*
function getImage(code,size,align,fullMode){

   var sz = size.substring(0,1);
   var al = align.toLowerCase();
   
   if (fullMode.toLowerCase().indexOf("t")!= -1){ 
   document.write("<table border=0 cellpadding=3 cellspacing=0 align=\"" + al + "\">"); 
   document.write("<tr valign=\"top\" align=\"middle\">");
   document.write("<td>");
   document.write("<img src=\"" + imageroot + code + sz + ".jpg\" hspace=0 vspace=0 alt=\"" + code + "\">");
   document.write("</td>");
   document.write("</tr>");
   document.write("<tr valign=\"top\" align=\"center\">");
   document.write("<td>");
   document.write("<a href=\"/shared/image.jsp?iid=" + code + "\" class=\"imagebox\">" + "Large Version and Citation" + "</a>");
   document.write("</td>");
   document.write("</tr>");
   document.write("</table>");   
   }
   else
   {
      document.write("<img src=\"" + imageroot + code + sz + "." + type + "\" hspace=2 vspace=2 alt=\"" + code + "\" align=\"" + al + "\">");
   }
}
*/

function getImage(code,size,align,fullMode){

   var sz = size.substring(0,1);
   var al = align.toLowerCase();

	document.write("<span class=\"eclipse_image\">");
	document.write("<a href=\"/shared/image.jsp?iid=" + code + "\">");
	document.write("<img src=\"/imagebank/" + code + sz + ".jpg\" alt=\"ECLIPSE Image Number " + code + "\" name=\"i_" + code + "\" hspace=\"5\" vspace=\"5\" border=\"0\" id=\"i_" + code + "\" ");
	if (al != "") {
		document.write("align=\"" + al + "\" ");
	}
	document.write("/>");
	document.write("</a>");
	document.write("</span>");

}

//function getFramedImage(){}



function getTerm(term){

    //document.write("<a href=\"JavaScript: popTerm(\'" + term.toLowerCase() + "\')\" class=\"term\">" + "<img src=\"/shared/book.gif\" alt=\"New Window\" border=0 align=\"middle\" vspace=\"0\" hspace=\"2\"> " + term + "</a>");
    document.write("<a href=\"JavaScript: popTerm(\'" + term.toLowerCase() + "\')\" class=\"term\">" + term + "</a>");
}


function popTerm(term) {

    glosswin = window.open(glossaryLocation + '?term=' + term,
    'glosswin',
    'width=250,height=150,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0'); 
    glosswin.focus();
} 

//function popImage(code,size) {
//
//   window.open(imageroot + code + size.substring(0,1) + '.jpg',
//    'imagewin',
//    'toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1'); 
//    imagewin.focus();
//} 








