Hi,
I have the following code:
[code=php]
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=windows-1252″>
<meta name=”GENERATOR” content=”Microsoft FrontPage 4.0″>
<meta name=”ProgId” content=”FrontPage.Editor.Document”>
<title>New Page 2</title>
<base target=”main”>
<script language=’javascript’>
function resize(idpic, srcs, capt){
var fh=parent.main.document.body.clientHeight;
var fw=parent.main.document.body.clientWidth;
var ph=document.getElementById(idpic).height;
var pw=document.getElementById(idpic).width;
var fr=fw/fh;
var pr=pw/ph;
if(fr<pr){parent.main.document.getElementById(“picdis”).innerHTML='<a href=”‘+srcs+'” target=”_blank”><image src=”‘+srcs+'” width=”‘+fw*0.85+'” border=”0″ id=”bigypic”></a>’; }
else{parent.main.document.getElementById(“picdis”).innerHTML='<a href=”‘+srcs+'” target=”_blank”><image src=”‘+srcs+'” height=”‘+fh*0.85+'” border=”0″ id=”bigypic”></a>’; }
parent.capti.document.getElementById(“cap”).innerHTML='<p align=”center”><font size=”2″>’+capt+'</font>’;
winresize(fr, pr, fw, fh);
}
function winresize(fr, pr, fw, fh){
clearTimeout();
var fr=fr;
var pr=pr;
var fw=fw;
var fh=fh;
if(fr<pr){parent.main.document.getElementById(“bigypic”).width=fw*0.85}
else{parent.main.document.getElementById(“bigypic”).height=fh*0.85}
var fr=fr;
var pr=pr;
var fw=fw;
var fh=fh;
setTimeout(“winresize(fr, pr, fw, fh)”,”2000″)
}
</script>
</head>
<body bgcolor=”#000000″ text=”#FFFFFF” vlink=”#0000FF”>
<p><a href=”” onclick=”window.open(‘menu.htm’,”,’toolbar=no,menubar=no,location=no,height=300,width=200,top=100,left=100′); return false”>Menu</a></p>
<p><a href=”javascript:parent.window.close()”>Close</a></p>
<table border=”0″ width=”95″ cellspacing=”0″ cellpadding=”0″ style=”text-align: Center”>
<!–put code here–>
<!–Start picture ID ‘cam’–><tr><td width=”95″ height=”95″><p align=”center”><img border=”0″ src=”chameleon1.bmp” width=”90″ id=”cam” onclick=”resize(‘cam’, ‘chameleon1.bmp’, ‘Chameleon’)”></p></td></tr><!–End picture ID ‘cam’–>
<!–Start picture ID ‘cam2’–><tr><td width=”95″ height=”95″><p align=”center”><img border=”0″ src=”chameleon2.bmp” width=”90″ id=”cam2″ onclick=”resize(‘cam2’, ‘chameleon2.bmp’, ‘Another chameleon’)”></p></td></tr><!–End picture ID ‘cam2’–>
</table>
</body>
</html>
The problem is, when [B]setTimeout(“winresize(fr, pr, fw, fh)”,”2000″)
Thanks in advance,
Neil