così mi funziona :master:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Pagina senza titolo</title>
<script type="text/javascript" src="../js/libreria.comp.js"></script>
<script language="javascript" type="text/javascript">
// <!CDATA[
function Button1_onclick()
{
resize();
}
var stop = 0;
var wid = 0;
var top = 0;
var le = 0;
var comp = 0;
function resize()
{
if(stop == 0)
{
img.style.width = wid++ + "px";
if(comp == 2)
if(le != -400)
img.style.marginLeft = le-- + "px";
if(wid == 700)
stop = 1;
setInterval("resize()",250);
}
else
if(stop == 1)
{
img.style.width = wid-- + "px";
if(top != -200)
img.style.top = top-- + "px";
if(wid == 300)
{
stop = 2;
}
setInterval("resize()",250);
}
}
// ]]>
</script>
</head>
<body>
<input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
[img]../immagini/f1-arenas.jpg[/img]
<script>var img = $("img1");</script>
</body>
</html>