I use the below script to display a map inside a hidden div. It works in safari and firefox but not in IE8. Need some help solving this. thx.

Code:
if(hiddendiv=="location"){
var currCenter = map.getCenter();
google.maps.event.trigger(map, 'resize');
map.setCenter(currCenter);
}
this.parentNode.className+=" current"; 
return false;
}}