function draw_image_2(){
	 if (product_image[1].scr=="PRODUCT" && product_image[1].image!="" ) { 
		if (product_image[1].image_show=="TARGET REG" || product_image[1].image_show=="TARGET" ){
			if (product_image[1].image_show=="TARGET REG"){
				if (user_guid==""){
					document.write("<A HREF=\"shopper_lookup.asp?target=" + product_image[1].target + "&\" onClick=return(visitargs('shopper_lookup.asp',\"target=" + product_image[1].target + "&\")); target=\"_top\" >");
				}else {
					document.write("<A HREF=\"" + product_image[1].target + "\" onClick=return(visitargs('" + product_image[1].target + "')); target=\"_top\" >");
				}
			}else {
				document.write("<a HREF=\"" + product_image[1].target + "\" target=\"_top\">");
			}
			document.write("<img name=\"mainimg\" id=\"mainimg\" ALIGN =" + product_image[1].align + " "); 
			if (product_image[1].width!=""){document.write("WIDTH =" + product_image[1].width + " ");}
			document.write(" BORDER=0  VSPACE=5  HSPACE=5 ALT=\"" + product_image[1].alt_text + "\" ");         
			document.write(" SRC=\"assets/product_images/" + product_image[1].image +"\"></a>");
		}else{
			document.write("<img name=\"mainimg\" id=\"mainimg\" ALIGN =\"" + product_image[1].align + "\" "); 
			if (product_image[1].width!=""){document.write("WIDTH =" + product_image[1].width + " ");}
			document.write(" BORDER=0  VSPACE=5  HSPACE=5 ALT=\"" + product_image[1].alt_text + "\" ");         
			document.write(" SRC=\"assets/product_images/" + product_image[1].image +"\">");
		}  		
	}
	else{
		document.write("<img src=\"assets/product_images/product.gif\">");
	}
}

function imgOn(imgName) {
        document.getElementById("mainimg").src="assets/images/swatches/" + pf_id + "_" + imgName + "_lg.jpg";
}

function display_thumbnails()
{
	var array_largeimage;
	if (typeof info_attributes!="undefined" && info_attributes != "")
	{
		var thumbnails_array = info_attributes.split(",");
		var image_array;
		if (thumbnails_array.length >= 1)
		{
			//the number below changes the number of columns for the swatches
			var columns=7;
			var atn;
			atn=0;
			var myImage;
			var counter=1;
			document.write("<br>Please place your cursor over the option(s) below to view a large image in that choice.");
			document.write("<br><table border=0><tr><td><div align=center width=100%><table border=0><tr valign=\"top\">");
			
			for (atn=0; atn<thumbnails_array.length; atn++)
			{
				if (thumbnails_array[atn]!="")
				{
					image_array = thumbnails_array[atn].split(":");
					document.write("<td align=center><table border=0><tr><td align=center class=\"ProductAttr\"><A HREF=\"#\" onClick=\"return false\" onmouseover=\"imgOn('"+image_array[1]+"')\" ><img NAME=\""+image_array[1]+"\" id=\""+image_array[1]+"\" src=\"assets/images/swatches/" + pf_id + "_" + image_array[1] + "_sm.jpg\" border=0></A>");
					document.write("<br>"+image_array[0]+"</td></tr></table></td>");
					if (counter==columns){document.write("</tr><tr>");counter=0}
				}
			counter = counter+1;
			}
			document.write("</tr></table></div></td></tr></table>");
		}
	}
} //end display_thumbnails
