var divOnShow = null, hideClass=" hide";

function attachMouseEvents() {
	if(document.getElementsByTagName){
		var links = document.getElementsByTagName("a");
		for(var i=0;i<links.length; i++){
			if(links[i].parentNode.parentNode.className == "map"){						
				links[i].onmouseover = function() { switchMapDiv(this.href, 0); };
				
				var Styles = document.getElementsByTagName('style');
				if(!Styles[0].disabled)
					links[i].onclick = function() { return false; };
				
				if(divOnShow==null) switchMapDiv( links[i].href , 0);
				else switchMapDiv( links[i].href, 1 );

			}
			else if(links[i].className == "mapTop") links[i].className += hideClass;
		}
	}
	return false;
}

function switchMapDiv( obj, mode ){
	if( document.getElementById ){
		var div = obj.substring( obj.indexOf( "#" ) + 1 );
		if( mode == 0 ) {
			if( divOnShow != div ) {
				if( divOnShow != null )
					document.getElementById( divOnShow ).className = "mapHide";
				
				document.getElementById( div ).className = "mapShow";
				divOnShow = div;
			}
		}
		else 
			document.getElementById( div ).className = "mapHide";
	}
}