
/* FUNZIONE POP UP GENERICA */
// chiamata javascript:popVirgix('/Virgilio Ferrini - Virgix/popUpGeneric.asp?TITOLO=Titolo della  pagina &POS=prcorso e nome file',450,500)

function popVirgix(nomefile,larghezza,altezza) {
var pathToRemove = "/Virgilio Ferrini - Virgix/";
var lenPathToRemove = pathToRemove.length;
if (nomefile.indexOf(pathToRemove) > -1) nomefile = nomefile.substring(lenPathToRemove);
if (nomefile.indexOf(".xml") > -1)  nomefile = nomefile.substring(0, nomefile.indexOf(".xml")) + ".asp";
	parametri="menubar=no,location=no,toolbar=no,status=no,scrollbars=no,resizable=yes,width="
	parametri=parametri+larghezza+",height="+altezza
	newWin=open('','',parametri)
	newWin.location.href=nomefile
}



function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}






	function getHTML(sTesto)
	{
		var sModifica = "Cambiami..";
		var sFixed = "Prova";
		var sMessage = "Non hai cambiato il testo:" + "\nvuoi proseguire comunque?";
		if (sTesto==sFixed)
		{
		var answer = confirm(sMessage);
		
		if (answer)  
		     {
			 //alert(pars + " - " + url);
			 }
			 else
		     {			 
			 document.forms['Figlet'].elements['T'].value = sModifica;
			 document.forms['Figlet'].elements['T'].focus();
			 }
		
		}

 if (answer || sTesto != sFixed)
 			{
			var url = 'http://www.virgilio.org/aaa.asp';		
			var pars = 'T=' + sTesto;
			var myAjax = new Ajax.Updater( {success: 'tgtEle'}, url, { method: 'get', parameters: pars, onFailure: reportError });
			}

	}
	function reportError(request)
	{
	alert('Sorry. There was an error.');
	}

	var myGlobalHandlers = {
		onCreate: function(){
			Element.show('systemWorking');
		},

		onComplete: function() {
			if(Ajax.activeRequestCount == 0){
				Element.hide('systemWorking');
				init();
			}
		}
	};
	Ajax.Responders.register(myGlobalHandlers);



