Saludos,,,
Intentalo asi,,, :
<!-- Template file for JPG Files -->
<table style="background: url('{media_src}') no-repeat center; " cellpadding="{width_height}" cellspacing="{width_height}">
<tr>
<td>{link_back}<img src="{template_url}/images/spacer.gif" border="1" alt="{image_name}" id="imgid{image_id}"{width_height} /></a>{link_back_end}</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
function get_id(id)
{
if (document.getElementById) return document.getElementById(id);
if (document.all && !document.getElementById) return document.all[id];
if (document.layers) return document.layers[id];
}
function image_size(){
objImage = new Image();
objImage.onload = function ch(){resize(this.width, this.height)};
objImage.src = "{media_src}";
}
function resize(width, height)
{
var AspectRatio, FinalWidth, FinalHeight, DoResize;
DoResize=0;
FinalWidth = width;
FinalHeight = height;
if (screen.width < 1601)
{
FinalWidth = 768; DoResize=1;
}
if (screen.width < 800)
{
FinalWidth = 480; DoResize=1;
}
if (DoResize)
{
if (width > height)
{
AspectRatio = (width / height);
FinalHeight = FinalWidth/AspectRatio;
}
if (width < height)
{
AspectRatio = height / width;
FinalHeight = FinalWidth;
FinalWidth = FinalHeight/AspectRatio;
}
}
get_id("imgid{image_id}").width = FinalWidth;
get_id("imgid{image_id}").height = FinalHeight;
}
image_size();
</script>
excitex2