Chrome does not react on Javascript
===

I'm making a Javascript program which is supposed to make one element invisible when it's clicked and make another one visible.
It works perfectly in IE ( about what I really wonder, as Javascript rarely works there properly ), but in Chrome it doesn't react at all. Even when I'm just trying to make ordinary alert, it just doesn't display when I place it below the hideDisplay() function in code.

Here is the code:

Clicking on the image will make it invisible and display div background2 instead.
In IE it works, in Chrome it just 'selects' image - makes it with blue overlay.

    <img src="screenxp.jpg" id="background1" onclick="hideDisplay(); window.setTimeout(failedto,1500);">
<div id="background2" onmousemove="failedto2();"></div>


<script type="text/javascript">

        // Getting the elements
	var background1 = document.getElementById('background1');
	var background2 = document.getElementById('background2');
	var win = document.getElementById('win');

      // This is the function triggered when background1 ( image ) is clicked
	function hideDisplay() {
	
		background1.style.display = 'none';
		background2.style.display = 'block';
		window.setTimeout(dispwin,2000);
	}
    
Note: The background1 image is 100% width and height and absolute position, I don't know, it probably doesn't matter in JS code, but just noticing if it could be the reason of problems.

Thanks in advance.

