		
	
	// POPUP
    function popup(URL,NOME,WIDTH,HEIGHT,PROPRIETA) 
    {
    	
    	//alert(PROPRIETA);
    	if(PROPRIETA == ''){
    		PROPRIETA = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0';
    	}
    	win = window.open(URL,NOME,PROPRIETA + ',width=' + WIDTH + ',height=' + HEIGHT + '');
    	
    	//qui ridimensiono il popup...così se lo stesso popup è già aperto gli cambio le dimensioni...
    	
    	// correggo l'altezza del popup in IE7
    	if (navigator.appVersion.indexOf('MSIE 7') != -1) {
    		H = parseInt(HEIGHT) + 81;
    	} else {
    		H = parseInt(HEIGHT) + 59;
    	}
    				 
    	W = parseInt(WIDTH) + 10;
    	win.resizeTo(W,H);
    	win.focus();
    }
	
	// IMPOSTA IL FOCUS SU UN ELEMENTO
	function getFocus(elem)
	{
	
		var elem = document.getElementById(elem);
		elem.focus();
	
	}
	
	
	// MOSTRA-NASCONDI CONTENUTO BOX HOME PAGE
	function menu2(elem)
	{
	
		var boxes = new Array('ultimiPost','inEvidenza','preferiti');
				
		for (var i = 0; i < boxes.length; i++) {
			document.getElementById(boxes[i]).style.display = 'none';
			document.getElementById('p_' + boxes[i]).className = ''				
		}						
				
		document.getElementById(elem).style.display = 'block';
		document.getElementById('p_' + elem).className = 'current'	
		document.getElementById('p_' + elem).blur();	
					
	}
	
	// MOSTRA-NASCONDI
	function showHide(elem)
	{
	
		var elem = document.getElementById(elem);
		var label = document.getElementById('labelCommenti');		
		var tuttiCommenti = document.getElementById('tuttiCommenti');											
	
		if (elem.style.display == 'none') {
		
			elem.style.display = 'block';
			tuttiCommenti.style.backgroundImage = 'url("../img/nascondi_commenti.gif")';				
		
		} else if (elem.style.display == 'block') {
		
			elem.style.display = 'none';
			tuttiCommenti.style.backgroundImage = 'url("../img/tutti_commenti.gif")';		
					
		}
	
	}
	
	function cambioNazione(selNazione, selProvincia, inputProvincia){
		
		var nazione = document.getElementById(selNazione);				
		var provincia = document.getElementById(selProvincia);
		var provincia2 = document.getElementById(inputProvincia);
		
		if(nazione[nazione.selectedIndex].value == 106){
		
			provincia.style.display = 'inline';
			provincia2.style.display = 'none';
			
		} else {
		
			provincia2.style.display = 'inline';
			provincia.style.display = 'none';
			
		}
	
	}
