<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1479" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Tahoma size=2><B>From:</B> SkyScanner<BR><B>Sent:</B> Monday, 
September 26, 2005 4:31 AM<BR></FONT></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
  <DIV><FONT face=Arial color=#000080>From: "Peter-Paul Koch" &lt;</FONT><A 
  href="mailto:pp.koch@gmail.com"><FONT face=Arial 
  color=#000080>pp.koch@gmail.com</FONT></A><FONT face=Arial><FONT 
  color=#000080>&gt;<BR>&gt; Most browsers (except Opera) change the visible 
  display of the page<BR>&gt; only when all scripts have exited completely. 
  Solution: use a timeout:<BR><BR>function show()<BR>{<BR>&nbsp; gif.src = 
  'pleasewait.gif'; // or whatever<BR>&nbsp; 
  setTimeout('slow_routine()',10);<BR>}<BR><BR>&gt; Now the script exits after 
  the gif has been set and the browsers show<BR>&gt; it. Then the slow routine 
  kicks in. Result: user sees Please Wait.<BR></FONT><BR></FONT></DIV>
  <DIV><FONT face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial>Hi - I got it working after a bit of experimentation. I 
  found that it would only work properly if I placed a timeout around the slow 
  routine *and* the hide routine.</FONT></DIV>
  <DIV><FONT face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT 
  face=Arial>showGif('icon_5');<BR>setTimeout("slowRoutine()",10);<BR>setTimeout("hideGif('icon_5')",10);</FONT></DIV>
  <DIV><FONT face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial><BR></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>