// Funzioni Javascript for System Enterprise ( gdmcomeback.net )
// Developed by Davide Gullo  -->>> gullo@m4ss.net
// /////////////////////////////////////////////////////////////
// /////////////////////// FUNZIONI GENERALI ///////////////////
// /////////////////////////////////////////////////////////////

// Apre una nuova finestra
	function ApriFinestra( nome, urlpagina, w, h )
	{
		window.open( urlpagina, nome, 'left=50,top=50,width=' + w + ',height=' + h + ', menubar=no, scrollbars=yes, toolbar=no, screenX=0, screenY=0, status=1');
	}


// Expandable content script
	function toggleDisplay(id){
		
		if(this.document.getElementById(id).style.display=='none'){
			this.document.getElementById(id).style.display='inline'
			this.document.getElementById(id+"link").style.display='none';
		}else{
			this.document.getElementById(id).style.display='none'
			this.document.getElementById(id+"link").style.display='inline';
		}
	}

// Controllo campi obbligatori del form Job Opportunities e restituisce testo in lingua
	function ControlloFormContatti()
	{
		var msg='';
		if(document.contatti.nominativo.value == ''){ msg = msg + 'Il campo Nome/Cognome è obbligatorio\n'; }
		if(document.contatti.email.value == ''){ msg = msg + 'Il campo email è obbligatorio\n'; }
		if(!document.contatti.privacy.checked){ msg = msg + 'Il consenso al trattamento dei dati per la Privacy è obbligatorio\n'; }
		if(msg != "")
		{
			alert(msg);
			return false;
		} else {
			return true;
		}
	}