The code below hides and shows the layer when you click the link, it works fine in IE and ns6, does anyone know why it doesn't work in opera 6, thanks for any suggestions.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
var layerOn = 1;

function removeLayer() {
	if (layerOn){
		document.getElementById('layer1').style.display = 'none';
		layerOn = null;
	} else {
		document.getElementById('layer1').style.display = 'block';
		layerOn = 1;
	}
}
</script>

<style type="text/css">
<!--
#layer1 {
	position:relative;
	left:50px;
	width:150px;
	height:150px;
	background-color:#ff0000;
	display:block;
	color:#ffffff;
	padding:15px;
}
body {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #666666;
	margin-left:40px;
}
-->
</style>
</head>
<body>

<br /><br />
<a href="#" onclick="removeLayer();return false">click here to show or hide the layer</a>
<br /><br /><br />
<div id="layer1">My Layer</div>

</body>
</html>