<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
/*apertura popUp*/

function popUp(url){
	var w = 600;
	var h = 500;
	var pw = Math.floor((screen.width-w)/2);
	var ph = Math.floor((screen.height-h)/2);
	window.open(url,"","width=" + w + ",height=" + h + ",top=" + ph + ",left=" + pw);	
}

///////////////////////////////////////////////COLORE RIGA/////////////////////////////////////
var savClass  = "";
var savClass2 = "";
var lastTR    = null;
var trBG      = new Array();
var trCO      = new Array();
<!--
function rOver(aTR) {
savClass      = aTR.className;
aTR.className = "overTR";
} // function rOver(aTR)

function rOut(aTR) {
if (aTR.className == "clicked") return;
aTR.className = savClass;
} // rOut(aTR)

//-->
///////////////////////////////////////////////COLORE RIGA/////////////////////////////////////

function lingua(lng){
	var w = 1;
	var h = 1;
	var pw = Math.floor((screen.width-w));
	var ph = Math.floor((screen.height-h));
	window.open("lingua.asp?lng="+lng,"","width=" + w + ",height=" + h + ",top=" + ph + ",left=" + pw);	
	document.location.reload();
}



function VerificaCampi(){

	var nome = document.recruiting.nome.value;
	var cognome =	document.recruiting.cognome.value;
	var data = document.recruiting.data_nascita.value;
	var residenza = document.recruiting.residenza.value;
	var telefono = document.recruiting.telefono.value;	
	var email = document.recruiting.email.value;	
	var privacysi = document.recruiting.privacy[0].checked;
	var privacyno = document.recruiting.privacy[1].checked;
	var nfuno = document.recruiting.uploadFileUNO.value

	var error = "";
	var count = 0;
	
	if (nome == "") {
		count++;
		error = error + count + " nome (first name)\n "; }
	
	if (cognome == "") {
		count++;
		error = error + count + " cognome (last name)\n "; }
	
	if (data == "") {
		count++;
		error = error + count + " data di nascita (birthdate)\n "; }

	if (residenza == "") {
		count++;
		error = error + count + " cittā di residenza (residence city)\n "; }

	if (telefono == "") {
		count++;
		error = error + count + " telefono (telephone)\n "; }
	
	if (email == "") {
		count++;
		error = error + count + " e-mail\n "; }	
	
	
	
	
	
	//inserisci	
	//estensione file	
	var ext_nfuno = nfuno.substring(nfuno.lastIndexOf("."),nfuno.length)
	ext_nfuno = ext_nfuno.toLowerCase()
	//nome file
	var nfuno = nfuno.substring(nfuno.lastIndexOf("\\")+1,nfuno.length)
				
	var suf = cognome + nome
	
	adesso = new Date()
	adesso = Math.floor(adesso)
	document.recruiting.NomeFileUNO.value = suf + "_" + adesso + ext_nfuno
	
	
	if (ext_nfuno!=""){ 
		if (ext_nfuno!=".pdf" && ext_nfuno!=".doc" && ext_nfuno!=".rtf" && ext_nfuno!=".txt") {
			count++;
			error = error + count + " Formato file non permesso (Sorry, wrong file format) - [PDF, DOC, RTF, TXT]\n"
		}
	}
	
	if (privacysi == false && privacyno == false) {
		count++;
		error = error + count + " Tutela della privacy (Privacy law) "; }
		
	if (privacyno == true) {
		count++;
		error = error + count + " Non accettando i termini relativi al trattamento \n  dei dati personali non č possibile inserire i dati nel DataBase."; }
	
	
	if (error != "") {
		alert("Attenzione-Warning: \n " + error  );
	} else {
		document.recruiting.submit();
	}

}



function Allarga(){	
document.getElementById('fig_prof').style.width="200px";
document.getElementById('spazio').style.width="0px";

}

function Stringi(){	
document.getElementById('fig_prof').style.width="140px";
document.getElementById('spazio').style.width="12px";

document.getElementById('fig_prof').style.position="relative";
}

function RecuperaPsw(){
email = document.recupera.email.value;

if(email == ""){
	alert("Inserire indirizzo email.");
}else{ 
	document.recupera.submit();
}
}

function CancImg(ogg){
var nome = ogg.name;
ogg.style.backgroundImage="url()";
}

function CheckLogin(){
var user = document.area.user.value;
var password = document.area.password.value;

if (user != ""){
	document.area.user.style.backgroundImage="url()";
	}
if (password != ""){
	document.area.password.style.backgroundImage="url()";
	}
}



