Onclick not working in IE

Hello

I have a page that loads 3 image via xml file. These images are buttons.

Now, before the </body> tag i have following code:


<script language="javascript">

var r_butt = document.getElementById('random_button');
	r_butt.onclick = function() {getName("random")};
	r_butt.onmouseover = function() {this.style.cursor="pointer";};


var n_butt = document.getElementById('next_button');
	n_butt.onclick = function() {getName("next");};
	n_butt.onmouseover = function() {this.style.cursor="pointer";}; 

var a_butt = document.getElementById('add_button');
	a_butt.onclick = function() {putName();}; 
	a_butt.onmouseover = function() {this.style.cursor="pointer";};
</script>

This works PERFECT in FF and IE8. But not working at all in IE6.

Please let me know how to solve this problem.

Thanks
Zeeshan

Any one, please help !