//Programming by Viaden Inc | www.viaden.com
function openimage(imagetitle, image, w, h)
{
	var max_w = 640;
	var max_h = 480;
	if (!w){
        win1 = open("", "_blank", "toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=1,resizeable=1");
		win1.document.open();
		win1.document.write("<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0><table width=100% height=100% cellpadding=0 cellspacing=0 border=0>");
		win1.document.write("<tr><td align=center><img src='"+image+"' border=0 id='open_im' width='250'></td></tr>\n");
		win1.document.write("<tr height='40'><td align=center valign='top'><a style='font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#000000' href=javascript:window.close()>Close Window</a></td></tr>");
		win1.document.write("</table></body>");        
	}else{
		if (w > max_w || h > max_h){
			if (w > h){
				r_w = max_w;
				r_h = h * r_w / w;
				win1 = window.open("", "_blank", "toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=0,resizeable=0,width="+(r_w + 40)+",height="+(r_h + 100));	    
			}else{
				r_h = max_h;
				r_w = w * r_h / h;
				win1 = window.open("", "_blank", "toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=0,resizeable=0,width="+(r_w + 40)+",height="+(r_h + 100));	    
			}
		}else{
	        r_w = parseInt(w);
	        r_h = parseInt(h);
			win1 = window.open("", "_blank", "toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=0,resizeable=0,width="+(r_w + 40)+",height="+(r_h + 100));	    
		}
		win1.document.open();
		win1.document.write("<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0><table width=100% height=100% cellpadding=0 cellspacing=0 border=0>");
		win1.document.write("<tr><td align=center><img src='"+image+"' border=0 id='open_im' width='"+r_w+"' height='"+r_h+"'></td></tr>\n");
		win1.document.write("<tr height='40'><td align=center valign='top'><a style='font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#000000' href=javascript:window.close()>Close Window</a></td></tr>");
		win1.document.write("</table></body>");
	}
	
}