// Tool per rimpiazzare l'attributo html "target", non piť valido in xhtml
// per ottenere target="_new" usare rel="external"
function externalLinks() {
	if( !document.getElementsByTagName ) 
		return;
	var anchors = document.getElementsByTagName("a");
	for( var i=0; i<anchors.length; i++ ) {
		var anchor = anchors[i];
		if( anchor.getAttribute("href") && anchor.getAttribute("rel") == "external" )
			anchor.target = "_blank";
	}
}

function mostra_regione( nome ) {
	document.getElementById('titoloMappa').innerHTML = nome;
}

// mostra e nasconde i value di default negli inputbox di login
// TODO: IE non permette il cambio dell'attributo type tramite js
function hideLabel( el, defaultValue ) {
	if( el.value == defaultValue )
		el.value = '';
	
	if( el.name == 'password' ) 
		el.type = 'password';
	
	el.style.color = '#000000';
}

function showLabel( el, defaultValue ) {
	if( el.value == '' ) {
		el.value = defaultValue;
		el.style.color = '#666666';
		if( el.name == 'password' )
			el.type = 'text';
	}
}