hello, i have this functions in a asp.net page:
function localizaElemento(name)
{
var elemento;
if(document.getElementById)
elemento=document.getElementById(name);
else if (document.all)
elemento=document.all[name];
else if (document.layers)
{
for(var i=0;i<document.forms[0].length;i++){

if(document.forms[0].elements[i].name==name){

elemento=document.forms[0].elements[i];

break;

}

}

}
return elemento;
}


function addEvent(obj, evType, fn){
if (obj.addEventListener)
obj.addEventListener(evType, fn, true)
if (obj.attachEvent)
obj.attachEvent("on"+evType, fn)


}
function setEvent(evt,func){
var mapa=localizaElemento("inmap");
addEvent(mapa, evt, func);
}


function ferramenta(f){
var tool=localizaElemento("tool");
tool.value=f;
}


then i have this:
<td class="tool" ><img src="images/ToolCenter.png" onclick="setEvent('click',ferramenta('centrar'))" /></td>

this will add an event to an input tag named mapa, this works fine but one javascript erro appears : Type Mismatch i think in this line function setEvent(evt,func)..
this only occurs in IE in firefox no

Can anyone help me??
Thanks a lot