<div id="divchik" onclick="alert('Меня кто-то кликнул');"></div>
<script type="text/javascript">
var o, elem = document.getElementById( 'divchik' );
if ( document.createEvent ) {
o = document.createEvent( "MouseEvent" );
o.initMouseEvent( 'click', true, true, null, 0, 0, 0, 0, 0, false, false, false, false, 1, null );
elem.dispatchEvent( o );
} else {
o = document.createEventObject();
o.type = "click";
elem.fireEvent( 'onclick', o );
}
</script>