//%attributes = {}
#DECLARE()->$thumbnail : Picture


$thumwidth:=80
$thumheight:=80

$picture:=Form:C1466.Picture
PICTURE PROPERTIES:C457($picture; $width; $height)

If ($width>$height)
	CREATE THUMBNAIL:C679($picture; $thumbnail; $thumwidth*($width/$height); $thumheight)
Else 
	CREATE THUMBNAIL:C679($picture; $thumbnail; $thumwidth; $thumheight*($height/$width))
End if 