function vis(nr)
{
	if (document.layers)
	{
		document.layers[nr].visibility = 'inline';
	}
	else if (document.all)
	{
		document.all[nr].style.display = 'inline';
	}
	else if (document.getElementById)
	{
		document.getElementById(nr).style.display = 'inline';
	}
}

function hide(nr)
{
	if (document.layers)
	{
		document.layers[nr].visibility = 'none';
	}
	else if (document.all)
	{
		document.all[nr].style.display = 'none';
	}
	else if (document.getElementById)
	{
		document.getElementById(nr).style.display = 'none';
	}
}

function showAndHideOthers(elId) {
	for (var i=0; i < document.getElementById(elId).parentNode.childNodes.length; i++) {
		if (document.getElementById(elId).parentNode.childNodes[i].nodeType == 1) {
			if (document.getElementById(elId).parentNode.childNodes[i].getAttribute('id') == elId) {
				vis(elId);
			} else {
				hide(document.getElementById(elId).parentNode.childNodes[i].getAttribute('id'));
			}
		}
	}
}

var loadedMapId;
function showMap(id, title) {
  	if (loadedMapId && loadedMapId == id) {
			Element.remove('attraction-rank-'+id+'-map');
			loadedMapId = 0;
			return false;
  	}
  
  	loadedMapId = id;
	
	new Ajax.Updater('attraction-rank-'+id+'-map-area', '/map_data/map_data_'+id+'.php',
 	{
	  evalScripts: true
	});
	
	return false;

}

function showMapParis(id, title) {
  	if (loadedMapId && loadedMapId == id) {
			Element.remove('attraction-rank-'+id+'-map');
			loadedMapId = 0;
			return false;
  	}
  
  	loadedMapId = id;
	
	new Ajax.Updater('attraction-rank-'+id+'-map-area', '/map_data/paryz/map_data_'+id+'.php',
 	{
	  evalScripts: true
	});
	
	return false;

}

