
function hideObject(Selez){
	divSel = document.getElementById(Selez);
	divSel.innerHTML='';
	divSel.style.display='none';
}

function cambiaColore(Selez){
	document.getElementById(Selez).className="cambiaColore";
}

function ripColore(Selez){
	document.getElementById(Selez).className="bg_campi";
}

function cambiaColoreOr(Selez){
	document.getElementById(Selez).className="cambiaColore";
}

function ripColoreOR(Selez){
	document.getElementById(Selez).className="bg_campi";
}

function hoverDiv(target){
	document.getElementById(target).className="titPannHover";
}

function outDiv(target){
	document.getElementById(target).className="titPann";
}

function hoverDivB(target){
	document.getElementById(target).className="DivPannColl";
}

function outDivB(target){
	document.getElementById(target).className="artPann";
}

function hoverDivC(target){
	document.getElementById(target).className="ConCat1B";
}

function outDivC(target){
	document.getElementById(target).className="ConCat1";
}

function apriForm(){
	var divSelA = document.getElementById('formCommenti');
	var divSelC = document.getElementById('CloseForm');

	if(divSelA.style.display=='none'){

		divSelA.style.display='block';
		divSelC.innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%"><div align="center"><a href="javascript:void(0)" onclick="apriForm()"><strong>Commenta</strong></a></div></td><td width="98%"><hr align="center" size="2" style="color:#E0E0E0"/></td><td width="1%"><div align="right"><a href="javascript:void(0)" onclick="apriForm()"><img src="../images/chiudiDiv.gif" alt="Apri form" border="0"/></a></div></td></tr></table>';

	}else{

		divSelA.style.display='none';
		divSelC.innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%"><div align="center"><a href="javascript:void(0)" onclick="apriForm()"><strong>Commenta</strong></a></div></td><td width="98%"><hr align="center" size="2" style="color:#E0E0E0"/></td><td width="1%"><div align="right"><a href="javascript:void(0)" onclick="apriForm()"><img src="../images/apriDiv.gif" alt="Apri form" border="0"/></a></div></td></tr></table>';

	}


}


//  Controlli  //
function controlloMAIL(){

	var nomecont = document.getElementById('nome_cont').value;
	var email = document.getElementById('email').value;
	var testoTXT = document.getElementById('testoTXT').value;

	if(nomecont==''||email==''||testoTXT==''){

		alert('I campi con l\' asterisco (*) sono obbligatori');
		return false
		
	}

}
//  Controlli  //
function controlloCOLLABORA(){

	var nomecont = document.getElementById('nome_cont').value;
	var cognome  = document.getElementById('cognome').value;
	var nick     = document.getElementById('nick').value;
	var email    = document.getElementById('email').value;
	var testoTXT = document.getElementById('testoTXT').value;

	if(nomecont==''||cognome==''||testoTXT==''){

		alert('I campi con l\' asterisco (*) sono obbligatori');
		return false
		
	}

}
// Popup curriclulum
function curriculum(ID){
	open('curriculum.php?id='+ID,'','width=600, height=400, resizable=no, status=no, scrollbars=yes, location=no')
}


function apriArticolo(ID){
	open('anteprima_articolo.php?id='+ID,'','width=800, height=600, resizable=no, status=no, scrollbars=yes, location=no')
}


function conferma(){
	risposta = confirm("Se hai scelto di NON pubblicare questo articolo, verrą eliminato!\nProcedere?");

	if(risposta){
		return true;
	}else{
		return false;
	}
}
//  Controlli  //
function controlloLOGIN(){

	var nome = document.getElementById('ulogin').value;
	var pass = document.getElementById('upass').value;

	if(nome==''||pass==''){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}
//  Controlli  //
function controlloLOGINbis(){

	var nome = document.getElementById('ulogin2').value;
	var pass = document.getElementById('upass2').value;

	if(nome==''||pass==''){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}
//  Controlli  //
function controlloNL(){

	var email = document.getElementById('newsmail').value;

	if(email==''||email=='la tua email'){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}
//  Controlli  //
function controlloSEGNALA(){

	var emailss = document.getElementById('emailss').value;

	if(emailss==''||emailss=='email tuo amico'){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}
//  Controlli  //
function controlloISCRIZIONE(){

	var user  = document.getElementById('username2').value;
	var pass  = document.getElementById('passwordN').value;
	var passr = document.getElementById('passwordR').value;
	var nome  = document.getElementById('nome2').value;
	var citta = document.getElementById('citta').value;
	var email = document.getElementById('email').value;

	if(user==''||pass==''||passr==''||nome==''||citta==''||email==''){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}
//  Controlli  //
function contIns(){

	var InsCommText = document.getElementById('InsCommText').value;
	var codcaptcha  = document.getElementById('codcaptcha').value;

	if(InsCommText==''||codcaptcha==''){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}
//  Controlli  //
function contCONTATTI(){

	var InsCommText = document.getElementById('InsCommText').value;
	var codcaptcha  = document.getElementById('codcaptcha').value;

	if(InsCommText==''||codcaptcha==''){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}
//  Controlli  //
function controlloRECUPERO(){

	var recpass = document.getElementById('recpass').value;

	if(recpass==''){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}

// CONTOLLO ARTICOLI
function controlloINSART(){

	var ctitolo    = document.getElementById('ctitolo').value;
	var ccategoria = document.getElementById('ccategoria').value;
	var elm3       = document.getElementById('elm3').value;

	if(ctitolo==''||ccategoria==''||elm3==''){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}

//  Controlli  //
function controlloSEARCH(){

	var valore = document.getElementById('cerca').value;

	if(valore==''||valore==' inserisci termine'){

		alert('Tutti i campi sono obbligatori');
		return false
		
	}

}
function inserisciTag(tag,tagMod){

	var newTag    = tag+', ';
	var newTagMod = tagMod+', ';

	var ValoreCampoTag    = document.getElementById('campoTAG').value;
	var ValoreCampoTagMod = document.getElementById('campoTAGMod').value;

	document.formArt.listaTag.value = ValoreCampoTag+newTag;
	document.formArt.listaTagMod.value = ValoreCampoTagMod+newTagMod;

}