	function validaForm(){
		if (document.oForm.destinazione.value == '' && document.oForm.tipo.value == '' && document.oForm.durata.value == ''){
			alert("Devi scegliere almeno un campo");
			return false;
		} else {
					
			//document.oForm.getElementByID('destinazione').options[document.oForm.getElementByID('destinazione').selectedIndex].value == 37
			return true;
		}
	}
	
	function openPop(urlPop,popWidth,popHeight){
		leftPos = (screen.width - popWidth)/2;
		topPos  = (screen.height - popHeight)/2
		win = window.open(urlPop,"",'width='+popWidth+',height='+popHeight+',top='+topPos+',left='+leftPos+',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no')
	}
	
	
	function redirectURL(){
		var links = document.getElementsByTagName('A');
		for (var i=0;i<links.length;i++){
			if (links[i].href=='http://www.trenitalia.com/it/nazionali.shtml'){
				links[i].href='http://www.trenitalia.com/trenitalia.html';
			}
		}
	}
	  Object.prototype.nextObject = function() {
		 var n = this;
		 do n = n.nextSibling;
		  while (n && n.nodeType != 1);
		  return n;
		 }
	function changeMenu(){
		/*if(document.location.href.indexOf('preview')==-1){
			var links = document.getElementsByTagName('A');
			for (var i=0;i<links.length;i++){
				if (links[i].className == 'menusx'){
					if(links[i].href.indexOf('mete/index.html')!=-1){
						
						if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
							links[i].parentNode.parentNode.parentNode.removeChild(links[i].parentNode.parentNode.nextSibling);
						}
						else{
							links[i].parentNode.parentNode.parentNode.removeChild(links[i].parentNode.parentNode.nextObject());
						}
						links[i].parentNode.parentNode.parentNode.removeChild(links[i].parentNode.parentNode);
					}				
				}
			}
			
		}
		document.body.style.display='block';
		*/
	}
	window.onload = function(){
		redirectURL();	
		changeMenu();
	}
	
