function WriteThumb(img,url,alt,blank,highlight)
{
	if (blank==null)
		blank=false;
	if (highlight==null)
		highlight=false;

	var str="<table class='thumbnail'>";
	str+="<tr><td>";
	if(url!="")
	{
		str+="<a href='";
		str+=url;
		if (blank)
			str+="' target='_blank'>";
		else
			str+="'>";
	}
	if(img.substr(img.length-3).toLowerCase()=="swf")
	{
		str+="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'";
		if(thumbHWidth>0)
		{
			str+=" width='" + thumbHWidth + "'";
		}
		if(thumbHHeight>0)
		{
			str+=" height='" + thumbHHeight + "'";
		}
		str+=">";
		str+="<param name='movie' value='"+ img +"'/>";
		str+="<param name='quality' value='high'/>";
		str+="<param name='play' value='-1'>";
		str+="<embed src='"+ img +"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' quality='high'";
		if(thumbHWidth>0)
		{
			str+=" width='" + thumbHWidth + "'";
		}
		if(thumbHHeight>0)
		{
			str+=" height='" + thumbHHeight + "'";
		}
		str+=">";
		str+="</embed></object>";
	}
	else
	{
		str+="<img src='";
		str+=img;
		str+="' alt='";
		str+=alt;
		str+="' ";
		if (highlight){
			if (thumbHWidth>0){
				str+=" width='";
				str+=thumbHWidth;
				str+="' ";
			}
			if (thumbHHeight>0){
				str+=" height='";
				str+=thumbHHeight;
				str+="' ";
			}
		}else{
			if (thumbWidth>0){
				str+=" width='";
				str+=thumbWidth;
				str+="' ";
			}
			if (thumbHeight>0){
				str+=" height='";
				str+=thumbHeight;
				str+="'>";
			}
		}
	}
	if(url!="")
	{
		str+="</a>";
	}
	str+="</td></tr></table>";
	document.write(str);

}

