{*
//// NATYS ////
TEMPLATE FOR VIEWING PNG IMAGE WITH TRANSPARENCY
params:
		imgsrc (the image !!)	
	optional:
		border
		width
		height
		ahref (0/1 -> indicate if the cursor must be an hand)
		
*}

{if $border==""} 
	{assign var="border" value=0} 
{/if}

{if $width==""} 
	{php}
	$a = $this->get_template_vars();
	$size = getimagesize($a['imgsrc']);
	$width= $size[0];
	$this->assign("width",$width);
	{/php} 
{/if}

{if $height==""} 
	{php}
	$a = $this->get_template_vars();
	$size = getimagesize($a['imgsrc']);
	$height = $size[1];
	$this->assign("height",$height);
	{/php} 
{/if}


{if $ahref==1}
	{assign var="cursor" value="hand"}
{else}
 	{assign var="cursor" value=""}
{/if}

<SCRIPT LANGUAGE="javascript">
{literal}
var V=navigator.appVersion;
if(document.all && document.getElementById) { // it's ie5+ but which version ?
	ver=V.substring(V.indexOf("MSIE",0)+5,V.indexOf(";",V.indexOf("MSIE",0)));
}
else ver="";
//sorry : for ie 5.01, there's NO solution for displaying PNG correctly
if(document.all && document.getElementById && ver!="5.01" ) { //it's ie5.5+
<!-- damn you MSFT and your incompatible hacks!! :( -->
{/literal}
document.write("<div title=\"{$alt}\" align=\"{$align}\" style=\"cursor:{$cursor}; border-style:solid;  border-width: {$border}px; width: {$width}px; height: {$height}px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'{$imgsrc}\', sizingMethod=\'scale\');\"></div>");
{literal}
}
else{ //all other browsers
{/literal}
document.write("<img src=\"{$imgsrc}\" width=\"{$width}\" height=\"{$height}\" alt=\"{$alt}\" title=\"{$alt}\" border=\"{$border}\" >");
{literal}
}
{/literal}
</SCRIPT>