function getNavigator() 
{
	this.document.write("<div id='navigation'>");	
	this.document.write("<img src='immagini/header.png' ismap usemap=#homepage alt='Homepage' border='0' naturalsizeflag='0' align='CENTER'/>");
	this.document.write("<map name='homepage'>");
	this.document.write("<area shape='rect' coords='10,85 60,100' href='default.asp'>");
	this.document.write("<area shape='rect' coords='90,85 130,100' href='info_matchmenu.asp'>");
	this.document.write("<area shape='rect' coords='155,85 255,100' href='download.asp'>");
	this.document.write("<area shape='rect' coords='280,85 360,100' href='login.asp'>");
	this.document.write("<area shape='rect' coords='395,85 415,100' href='home.asp'>");
	this.document.write("<area shape='rect' coords='422,85 442,100' href='home.asp?lang=EN'>");
	this.document.write("</map>");
	this.document.write("</div>");
}

function getFooter() 
{
	this.document.write("<div id='footer'>");	
	this.document.write("<table><tr><td>");
	this.document.write("<a href='http://validator.w3.org/check?uri=referer'><img src='immagini/w3c.png' alt='Valida XHTML 1.0' /></a>");
	this.document.write("</td><td>");
	this.document.write("<a href='http://jigsaw.w3.org/css-validator/'><img src='immagini/css.gif' alt='Valida CSS' /></a>");		
	this.document.write("</td><td>");
	this.document.write("<p>Tutti i nomi, i loghi e i marchi registrati citati o riportati appartengono ai rispettivi proprietari.<br />Tutti gli articoli, le fotografie e gli elementi grafici presenti in questo sito sono soggetti alle norme vigenti sul diritto d'autore; &eacute; quindi severamente vietato riprodurre o utilizzare anche parzialmente ogni elemento delle pagine in questione senza l'autorizzazione del responsabile del sito.</p>");
	this.document.write("</td></tr></table>");
	this.document.write("</div>");
} 

function getFooterENG() 
{
	this.document.write("<div id='footer'>");	
	this.document.write("<table><tr><td>");
	this.document.write("<a href='http://validator.w3.org/check?uri=referer'><img src='immagini/w3c.png' alt='Valida XHTML 1.0' /></a>");
	this.document.write("</td><td>");
	this.document.write("<a href='http://jigsaw.w3.org/css-validator/'><img src='immagini/css.gif' alt='Valida CSS' /></a>");		
	this.document.write("</td><td>");
	this.document.write("<p>All names, logos and trademarks shown or mentioned belong to their respective owners. <br /> All articles, photographs and graphics on this site is subject to existing rules on copyright, is therefore severely forbidden to reproduce or use any part of the pages element in question without permission of the manager of the site.</p>");
	this.document.write("</td></tr></table>");
	this.document.write("</div>");
} 

function SKEY(event,obj)
{
	try
	{
		var testo = obj.value;
		var j;
		for (j=0;j<testo.length;j++)
		{
			var lettera = testo.substr(j,1);
			var caratteriValidi = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-@., ";
			var ris = caratteriValidi.indexOf(lettera);
			if (ris==-1 && lettera.charCodeAt(lettera)!=10)
			{
				obj.value="";
				alert("ATTENZIONE\nIl carattere speciale inserito non e' consentito.")
				obj.focus();
				break;
			}
		}
	}
	catch(e)
	{
		alert("Errore nella funzione: SKEY " + e);
	}		
}

function VKEY(event,obj)
{
	try
	{
		var testo = obj.value;
		var j;
		for (j=0;j<testo.length;j++)
		{
			var lettera = testo.substr(j,1);
			var caratteriValidi = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-@.,";
			var ris = caratteriValidi.indexOf(lettera);
			if (ris==-1 && lettera.charCodeAt(lettera)!=10)
			{
				obj.value="";
				alert("ATTENZIONE\nIl carattere speciale inserito non e' consentito.")
				obj.focus();
				break;
			}
		}
	}
	catch(e)
	{
		alert("Errore nella funzione: VKEY " + e);
	}		
}

function registraNuovoUtente()
{
	try
	{
		if (document.formRegistra.user.value=="" || document.formRegistra.pwd.value=="" || document.formRegistra.nome.value=="" || document.formRegistra.discipline.value=="" || document.formRegistra.mail.value=="")
		{
			alert("Tutti i campi devono essere compilati. Inserire i valori mancanti");
		}
		else
		{
			document.formRegistra.submit();
		}
	}
	catch(e)
	{
		alert("Errore nella funzione: registraNuovoUtente " + e);
	}
}

