function controllared()
	{
	if (document.formred.nome.value!="" && document.formred.organizzazione.value!="" && document.formred.specializzazione.value!="" && document.formred.crew.value!="" && document.formred.server.value!="" && document.formred.descrizione.value!="" && document.formred.immagine.value!="")
		{
		return(true);
		}
	else
		{
		alert("TUTTI i campi devono essere compilati!");
		return(false);
		}
	}

function disabilitato()
	{
	alert("Funzione temporaneamente disabilitata!");
	}

function vis_annuncio(id)
	{
	document.formadmin.id_ann.value=id;
	document.formadmin.submit();
	}

function controlla_annunci()
	{
	if (document.formann.titolo_ann.value=="" || document.formann.testo_ann.value=="" || document.formann.email_ann.value=="" || document.formann.utente_ann.value=="")
		{
		alert("E' necessario compilare TUTTI i campi!");
		return(false);
		}
	return(true);
	}

function apri_pg(val)
	{
	document.form1.da.value=val;
	apri('REDPILLS');
	}

function apri_an(val)
	{
	document.form1.da.value=val;
	apri('ANNUNCI');
	}

function azzera(val)
	{
	document.inschat.testo.value=val;
	document.inschat.riga.value="";
	}
	
function controlla_chat(val)
	{
	if (val=="")
		return(false);
	return(true);
	}
	
function cerca()
	{
	document.formcercahome.op.value="RICERCA";
	document.formcercahome.submit();
	}

function cityguide()
	{
	window.open("cityguide/index.htm","_blank");
	}
	
function sentinel(val)
	{
	window.open("sentinel/part"+val+"/index1.htm","_blank");
	}
	
function broken_link(id)
	{
	document.form1.action="index.php";
	document.form1.op.value="DOWNLOADS";
	document.form1.broken.value=id;
	document.form1.submit();
	}
	
function evento_seleziona(val)
	{
	document.formadmin.id_evento.value=val;
	document.formadmin.submit(val);
	}

function pg_seleziona(val)
	{
	document.formadmin.id_personaggio.value=val;
	document.formadmin.submit(val);
	}

function down_seleziona(val)
	{
	document.formadmin.id_down.value=val;
	document.formadmin.submit(val);
	}

function news_seleziona(val)
	{
	document.formadmin.id_news.value=val;
	document.formadmin.submit(val);
	}

function news_evento(id)
	{
	document.form1.action="index.php";
	document.form1.op.value="NEWS";
	document.form1.id_event.value=id;
	document.form1.submit();
	}

function editoriale(id)
	{
	document.form1.action="index.php";
	document.form1.op.value="EDITORIALE";
	document.form1.id_edit.value=id;
	document.form1.submit();
	}

function news(id,evento)
	{
	document.form1.action="index.php#"+id;
	document.form1.id_event.value=evento;
	document.form1.op.value="NEWS";
	document.form1.submit();
	}

function apri(val)
	{
	switch(val)
		{
		case "CHAT":
		case "MAILING":
		case "ANNUNCI":
		case "REBEL":
		case "ONE":
		case "ISHIKI":
		case "SERVERSTATUS":
		case "INTERVISTA":
		case "SONY":
		case "SERAPHDAKARI":
		case "CINEMATICS":
		case "CINEMATICS1":
		case "CINEMATICS2":
		case "CINEMATICS3":
		case "CINEMATICS4":
		case "SCREENSHOTS":
		case "CONTATTI":
		case "ADMIN":
		case "CONTROLLERS1":
		case "UNDERWORLD1":
		case "UNDERWORLD2":
		case "EVENTI1":
		case "EVENTI2":
		case "DOWNLOADS":
		case "CRONACHE1":
		case "CALENDARIO":
		case "REDPILLS":
		case "LINKS":
		case "ARCHIVIO_SENTINEL":
		case "ARCHIVIO_EDITORIALE":
		case "MISCELLANEUS":
		case "HOMEPAGE":
		case "NEWS":
		case "EDITORIALE":
		case "RICERCA_AVANZATA":
			document.form1.op.value=val;
			document.form1.submit();
		break;
		case "PATCH":
			window.open("miscellaneus/74515.htm","_blank","width=500,height=500,toolbar=0, location=0, directories=0, menubar=0, scrollbars=1,resizable=0,status=0");
		break;
		case "CRONACHE":
			val='<table width="130" border="0" cellspacing="0" cellpadding="0">';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left">Cronache</td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="center"><a href=javascript:apri("CRONACHE1")>&bull;&nbsp;Parte 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left" style="cursor:pointer;" onClick=apri("EDITORIALE")>Editoriale</td>';
			val+='</tr>';
			val+='</table>';
			if(document.getElementById("menu_cronache").innerHTML=="")
				document.getElementById("menu_cronache").innerHTML=val;
			else
				document.getElementById("menu_cronache").innerHTML="";
		break;
		case "EVENTI":
			val='<table width="130" border="0" cellspacing="0" cellpadding="0">';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left" style="cursor:pointer;" onClick=apri("EVENTI1")>Episodi</td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left" style="cursor:pointer;" onClick=apri("EVENTI2")>Voci dalla matrice</td>';
			val+='</tr>';
			val+='</table>';
			if(document.getElementById("menu_eventi").innerHTML=="")
				document.getElementById("menu_eventi").innerHTML=val;
			else
				document.getElementById("menu_eventi").innerHTML="";
		break;
		case "ARCHIVIO":
			val='<table width="130" border="0" cellspacing="0" cellpadding="0">';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left" style="cursor:pointer;" onClick=apri("ARCHIVIO_SENTINEL")>The Sentinel</td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left" style="cursor:pointer;" onClick=apri("ARCHIVIO_EDITORIALE")>Echi da Matrix</td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left" style="cursor:pointer;" onClick=apri("MISCELLANEUS")>Miscellaneus</td>';
			val+='</tr>';
			val+='</table>';
			if(document.getElementById("menu_archivio").innerHTML=="")
				document.getElementById("menu_archivio").innerHTML=val;
			else
				document.getElementById("menu_archivio").innerHTML="";
		break;
		case "HISTORY":
			val='<table width="130" border="0" cellspacing="0" cellpadding="0">';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left">Cinematics</td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="center"><a href=javascript:apri("CINEMATICS1")>&bull;&nbsp;Episodio 1.1</a></td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="center"><a href=javascript:apri("CINEMATICS2")>&bull;&nbsp;Episodio 1.2</a></td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="center"><a href=javascript:apri("CINEMATICS3")>&bull;&nbsp;Episodio 1.3</a></td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="center"><a href=javascript:apri("CINEMATICS4")>&bull;&nbsp;Episodio 2.1</a></td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left" style="cursor:pointer;" onClick=apri("CALENDARIO")>Calendario Eventi</td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left">Controllers</td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="center"><a href=javascript:apri("CONTROLLERS1")>&bull;&nbsp;Parte 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="left">Underworld</td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="center"><a href=javascript:apri("UNDERWORLD1")>&bull;&nbsp;Parte 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>';
			val+='</tr>';
			val+='<tr>';
			val+='<td height="15">&nbsp;</td>';
			val+='<td height="15" align="center"><a href=javascript:apri("UNDERWORLD2")>&bull;&nbsp;Parte 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>';
			val+='</tr>';
			val+='</table>';
			if(document.getElementById("menu_storia").innerHTML=="")
				document.getElementById("menu_storia").innerHTML=val;
			else
				document.getElementById("menu_storia").innerHTML="";
		break;
		}
	}

function chiudi()
	{
	document.getElementById("Layer1").style.visibility="hidden";
	}