Hi, i just cant make work the upload progress bar. So i want to show an UPLOADING gif image when i submit the upload form.

I can do it in normal pages, but this script works with templates, and i just cant make it work. Show me error when i put this code in the <head>tag (in header.tpl).

Code:
 <div ID="waitDiv" style="position:absolute;left:300;top:300;visibility:hidden">
<table cellpadding="6" cellspacing="0" border="1" bgcolor="#000000" bordercolor="#FFFFFF">
<tr><td align=center>
<font color="#ffffff" face="Verdana" size="4">Cargando página...</font>
[img]/images/cargando.gif[/img]
</td>
</tr></table>
</div>

<SCRIPT>
<!--
var DHTML = (document.getElementById || document.all || document.layers);
function ap_getObj(name) {
if (document.getElementById)
{ return document.getElementById(name).style; }
else if (document.all)
{ return document.all[name].style; }
else if (document.layers)
{ return document.layers[name]; }
}
function ap_showWaitMessage(div,flag) {
if (!DHTML) return;
var x = ap_getObj(div); x.visibility = (flag) ? 'visible':'hidden'
if(! document.getElementById) if(document.layers) x.left=280/2; return true; } ap_showWaitMessage('waitDiv', 3);
//-->
</SCRIPT>
THIS IS THE ERROR MESSAGE

Fatal error: Smarty error: [in header.tpl line 16]: syntax error: unbalanced parenthesis in if statement (Smarty_Compiler.class.php, line 925) in /home/ecuacana/public_html/include/smarty/libs/Smarty.class.php on line 362

PLEASE HELP ME..

I tried with (onsubmit) Javascript code and the same problem...