/*
Filename: user_images.js
Version: 1
Date: 12/28/2001
Notes: This document will add images below the "What's New" box for the GEMS Home Page.
*/

//Set ui_totalrecs = 0 to disable this area from printing
if (ui_totalrecs > 0) 
{
	/*
	Assign general variables here		
	*/
	var ui_maxwidth = 171;  //Maximum width of table
	var ui_itemwidth = 163;
		
	//Begin writing HTML
	var a = ""; 	
	a+="<table cellspacing=\"0\" cellpadding=\"0\" width=\"" + ui_maxwidth + "\" border=\"0\">\n";
	a+="<tbody>\n";
	a+="	<tr>\n";
	a+="		<td width=\"4\"><img src=\""+ir+"/images/spacer.gif\" width=\"4\" alt=\"\"></td>\n";
	a+="		<td valign=\"bottom\" align=\"left\" width=\"" + ui_itemwidth + "\">\n";
	a+="			<table cellspacing=\"0\" cellpadding=\"0\" width=\"" + ui_itemwidth + "\" border=\"0\">\n";
	a+="			<tbody>\n";
	a+="				<tr>\n";
	a+="					<td><img src=\""+ir+"/images/spacer.gif\" width=\"1\" height=\"8\" alt=\"\"   border=\"0\"></td>\n";
	a+="				</tr>\n";

	//Begin loop of items
	for (ui_counter = 0; (ui_counter < ui_totalrecs); ui_counter++) 
	{
		//Verify that all arrays have items
		var ui_frimg = "<img src=\"" + ui_itemarray_frimg[ui_counter] + "\" width=\"144\" height=\"" + ui_itemarray_imght[ui_counter] + "\" border=\"0\" alt=\""+ ui_itemarray_imgdesc[ui_counter] +"\">"		//Write out text item row					
		a+="				<tr>\n";
		a+="					<td><img src=\""+ir+"/images/spacer.gif\" width=\"1\" height=\"8\" alt=\"\"   border=\"0\"></td>\n";
		a+="				</tr>\n";
		a+="				<tr>\n";
		a+="					<td align=\"center\" valign=\"top\">"; 
		if (ui_itemarray_imgurl[ui_counter] != "")
		{
			a+="<a href=\"" + ui_itemarray_imgurl[ui_counter] + "\">" + ui_frimg +"</a>";
		}
		else
		{
			a+= ui_frimg;
		}
		a+="				</td>\n</tr>\n";
	}
	a+="			</tbody>\n";
	a+="			</table>\n";
	a+="		</td>\n";
	a+="		</tr>\n";
	a+="</tbody>\n";
	a+="</table>\n";
	//Stop writing HTML
	document.write(a);
	document.close();
	var a = null;
}
