

function menu(_m1,_mO){var _=this,i;_._m1=_m1;_._mO=_mO;_._mS='';_.id=menus.length;_._m0=[];_._m2=[];_._m4=[0,0];_._mO[-1]={'firstX':20,'firstY':20,'nextX':15,'nextY':15,'width':100,'height':22,'hideAfter':200,'target':'_self','trace':0,'css':''};for(i=0;i<_._m1.length;i++){if(_._m1[i]){new _mE(0,_,_,_._m1[i]);}}
for(i=0;i<_._m2.length;i++){_mA(_._m2[i],1);}
menus[_.id]=_;}
function _mD(_mK){var i,a=menus[_mK]._m0;for(i=0;i<a.length;i++){_mA(a[i],0);_mB(a[i],'norm');}}
function _mF(_mK,_mI){var m=menus[_mK],_=m._m0[_mI]._m1[1];_mB(m._m0[_mI],'clck');if(_)
open(_,_m9(m._m0[_mI]._m8,m._mO,'target'));}
function _mG(_mK,_mI){var m=menus[_mK];m._mL=setTimeout('_mD('+_mK+')',_m9(m._mN._m8,m._mO,'hideAfter'));if(m._mN.id==_mI)
m._mN=null;}
function _mH(_mK,_mI){var m=menus[_mK],_,_m7,i;m._mN=_=m._m0[_mI];if(m._mL)
clearTimeout(m._mL);for(i=0;i<m._m0.length;i++){_=m._m0[i];_m7=!m._mN._mS.indexOf(_._mT);if(_m7)_mB(_,_==m._mN?'over':'norm');_mA(_,_m7);}
if(m._mN._m6)
for(i=m._mN;i&&i._m5;i=i._mP)
_mB(i,'over');}
function _mE(l,p,m,_m1){var _=this,i,c=p._m2.length,_mO=m._mO;_._m1=_m1;_._mP=p;_._mT=p._mS;_._mS=p._mS+c+':';_._m8=l;_.id=m._m0.length;m._m0[_.id]=_;p._m2[c]=_;var id=m.id+','+_.id,nX,nY;_._m6=_m9(l,_mO,'trace');for(i=l;i>=-1;i--){if(_mO[i]&&_mO[i]['nextX']!=null)
nX=_mO[i]['nextX'];if(_mO[i]&&_mO[i]['nextY']!=null)
nY=_mO[i]['nextY'];if(nX!=null||nY!=null)break;}
_._m4=[p._m4[0]+_m9(l,_mO,'firstX')+(nX!=null?nX*c+_m9(l,_mO,'width')*c:0),p._m4[1]+_m9(l,_mO,'firstY')+(nY!=null?nY*c+_m9(l,_mO,'height')*c:0)];document.write('<',_m3[1],'_mF(',id,')" id="me',id,'" style="position:absolute;top:',_._m4[1],'px;left:',_._m4[0],'px;width:',_m9(l,_mO,'width'),'px;height:',_m9(l,_mO,'height'),'px;visibility:hidden;z-index:',l+10,';text-decoration:none" onmouseout="_mG(',id,')" onmouseover="_mH(',id,')"><div',_m3[0],' id="mi',id,'" class="',_m9(l,_mO,'css'),'norm">',_m1[0],'</div></',_m3[2],'>');_._m5=[_mC('me'+m.id+','+_.id),_mC('mi'+m.id+','+_.id),_m9(l,_mO,'css')];if(_m1.length>2){_._m2=[];for(i=2;i<_m1.length;i++)
if(_m1[i])
new _mE(l+1,_,m,_m1[i]);}}
function _mA(_,_mJ){if(_._mQ==_mJ)return;_._mQ=_mJ;if(_mJ)
_._m5[0].style.visibility='visible';else if(_._m8)
_._m5[0].style.visibility='hidden';}
function _mB(_,_mM){if(_._m5[3]==_mM)return;_._m5[3]=_mM;_._m5[1].className=_._m5[2]+_mM}
function _m9(l,_mO,k){for(var i=l;i>=-1;i--)if(_mO[i]&&_mO[i][k]!=null)return _mO[i][k];}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
function trova(){document.forms._ServerForm.submit();}
function lingua(){var indirizzo=location.href;var x=document.getElementById("linguaggio");if(indirizzo.indexOf("lang=")>0){location.href=indirizzo.substr(0,indirizzo.indexOf("lang="))+"lang="+x[x.selectedIndex].value+indirizzo.substr(indirizzo.indexOf("lang=")+8,indirizzo.length);}else{if(indirizzo.indexOf("?")>0)
location.href=indirizzo+"&lang="+x[x.selectedIndex].value
else
location.href=indirizzo+"?lang="+x[x.selectedIndex].value}}
function setLingua(){var indirizzo=location.href;var x=document.getElementById("linguaggio");if((indirizzo.indexOf("=ENG")>0)||(indirizzo.indexOf("=eng")>0)){x.value="ENG";}
if((indirizzo.indexOf("lang=ITA")>0)||(indirizzo.indexOf("=ita")>0)){x.value="ITA";}
if((indirizzo.indexOf("lang=POL")>0)||(indirizzo.indexOf("=pol")>0)){x.value="POL";}}
/*function getMouseX(e){if(IE){tempX=event.clientX+document.body.scrollLeft}else{tempX=e.pageX}
if(tempX<0){tempX=0}
return tempX;}
function getMouseY(e){if(IE){tempY=event.clientY+document.body.scrollTop}else{tempY=e.pageY}
if(tempY<0){tempY=0}
return tempY;}*/
function ger_area(area){var sito='getarea.asp?id='+document.getElementById(area).value;var v=window.open(sito,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=500,height=210');}
function mostra_news(inizio,fine,anno){
	for(var i=inizio;i<=fine;i++){
		if(anno==i){
			document.getElementById(i).style.visibility='visible';
			document.getElementById("F"+i).style.visibility='visible';
			document.getElementById("T"+i).style.background='url(http://www.fagioli.com/MULTIMEDIA/IMG/tabulaOn.jpg)';
		}
		else{
			document.getElementById(i).style.visibility='hidden';
			document.getElementById("F"+i).style.visibility='hidden';
			document.getElementById("T"+i).style.background='url(http://www.fagioli.com/MULTIMEDIA/IMG/tabulaOff.jpg)';
		}
	}
}
function mostra_search(inizio,fine,valore){fine=inizio+fine-1;for(var i=inizio;i<=fine;i++){if(valore==i){document.getElementById("FF"+i).style.visibility='visible';document.getElementById("K"+i).style.background='url(http://www.fagioli.com/MULTIMEDIA/IMG/searchOn.jpg)';}else{document.getElementById("FF"+i).style.visibility='hidden';document.getElementById("K"+i).style.background='url(http://www.fagioli.com/MULTIMEDIA/IMG/searchOff.jpg)';}}}
function mostra_mappa(inizio,fine,valore){
	for(var i=inizio;i<=fine;i++){
		if(valore==i){
			document.getElementById("mp"+i).style.visibility='visible';
		}
		else{
			document.getElementById("mp"+i).style.visibility='hidden';
		}
	}
	for(var i=1;i<=23;i++)
		document.getElementById("cart"+i).style.visibility='hidden';
}
function mostra_mappa_detail(valore){
	/*for(var i=1;i<=23;i++){
		if(valore==i){
			document.getElementById("cart"+i).style.visibility='visible';
		}
		else{
			document.getElementById("cart"+i).style.visibility='hidden';
		}
	}*/
	location.href = "?"+valore
	
}
function tuttichk(){
	//alert(document.getElementById("tutti").checked);
	if (document.getElementById("tutti").checked==false) {
		
		document.getElementById("latest").checked=false;
		document.getElementById("fase1").checked=false;
		document.getElementById("fase2").checked=false;
		document.getElementById("archivio").checked=false;
	} 
	if (document.getElementById("tutti").checked==true){
		
		document.getElementById("latest").checked=true;
		document.getElementById("fase1").checked=true;
		document.getElementById("fase2").checked=true;
		document.getElementById("archivio").checked=true;
	}
	
}
function evidenzia(valore){
	document.getElementById(valore).style.color='#FF0000';
	document.getElementById(valore).style.fontStyle="italic";
	document.getElementById(valore).style.cursor="pointer";
}
function evidenziaIMG(id){
	document.getElementById(id).style.borderLeft='5px solid red';
	
}
function ripristinaIMG(id){
	document.getElementById(id).style.borderLeft='0px solid red';
	
}
function deevidenzia(valore){document.getElementById(valore).style.color='#666666';document.getElementById(valore).style.fontStyle="normal";}
function deevidenzia2(valore){document.getElementById(valore).style.color='#990000';document.getElementById(valore).style.fontStyle="italic";}
function OpenNewsLetterFile(FiledaAprire){msgWindow=window.open(FiledaAprire,"_blank");}
function CheckDate(){var G=document.forms._ServerForm.DD.value;var M=document.forms._ServerForm.MM.value;var A=document.forms._ServerForm.YYYY.value;var Data=new Date(A,M-1,G);if((G=='')||(M=='')||(A=='')){return false;}
if(G!=Data.getDate()||(M-1)!=Data.getMonth()||A!=Data.getFullYear()){return false;}else{return true;}}
function checkEmail(entered){with(entered){apos=value.indexOf('@');dotpos=value.lastIndexOf('.');lastpos=value.length-1;if(apos<1||dotpos-apos<2||lastpos-dotpos>3||lastpos-dotpos<2){return false;}else{return true;}}}
function controlla(invia){if(document.forms._ServerForm.nome.value==''){document.getElementById("divnome").style.border='2px solid red';document.forms._ServerForm.nome.focus();return;}else{document.getElementById("divnome").style.border='0px solid red';}
if(document.forms._ServerForm.cognome.value==''){document.getElementById("divcognome").style.border='2px solid red';document.forms._ServerForm.cognome.focus();return;}else{document.getElementById("divcognome").style.border='0px solid red';}
if(!CheckDate()){document.getElementById("divdatanascita").style.border='2px solid red';document.forms._ServerForm.DD.focus();return;}else{document.getElementById("divdatanascita").style.border='0px solid red';}
if(document.forms._ServerForm.citta.value==''){document.getElementById("divcitta").style.border='2px solid red';document.forms._ServerForm.citta.focus();return;}else{document.getElementById("divcitta").style.border='0px solid red';}
if(document.forms._ServerForm.mail.value!=''){if(!checkEmail(document.forms._ServerForm.mail)){document.getElementById("divmail").style.border='2px solid red';document.forms._ServerForm.mail.focus();return;}else{document.getElementById("divmail").style.border='0px solid red';}}
if(document.forms._ServerForm.telefono.value==''){document.getElementById("divtelefono").style.border='2px solid red';document.forms._ServerForm.telefono.focus();return;}else{document.getElementById("divtelefono").style.border='0px solid red';}
if(document.forms._ServerForm.Education.value==''){document.getElementById("divEducation").style.border='2px solid red';document.forms._ServerForm.Education.focus();return;}else{document.getElementById("divEducation").style.border='0px solid red';}
if(document.forms._ServerForm.Specializzazione.value==''){document.getElementById("divSpecializzazione").style.border='2px solid red';document.forms._ServerForm.Specializzazione.focus();return;}else{document.getElementById("divSpecializzazione").style.border='0px solid red';}
//if(document.forms._ServerForm.Expectations.value==''){document.getElementById("divExpectations").style.border='2px solid red';document.forms._ServerForm.Expectations.focus//();return;}else{document.getElementById("divExpectations").style.border='0px solid red';}
var tot=document.forms._ServerForm.lang.length;var trovato=-1;for(cont=0;cont<tot;cont++){if(document.forms._ServerForm.lang[cont].checked==true){var valore=eval("document.forms._ServerForm.Clang"+cont+".value");if(valore==0){trovato=-1;document.getElementById("divClang"+cont).style.border='2px solid red';break;}else{document.getElementById("divClang"+cont).style.border='0px solid red';if(cont==tot-1){if(document.forms._ServerForm.other.value==''){trovato=-1;document.getElementById("divother").style.border='2px solid red';break;}else{document.getElementById("divother").style.border='0px solid red';document.getElementById("divClang"+cont).style.border='0px solid gray';trovato=cont;}}else{trovato=cont;document.getElementById("divClang"+cont).style.border='0px solid gray';}}}else{var valore=eval("document.forms._ServerForm.Clang"+cont+".value");if(valore>0){document.forms._ServerForm.lang[cont].checked=true;if(cont==document.forms._ServerForm.lang.length-1){if(document.forms._ServerForm.other.value==''){trovato=-1;document.getElementById("divother").style.border='2px solid red';}else{document.getElementById("divother").style.border='0px solid red';}}else{trovato=cont;}}else{document.getElementById("divClang"+cont).style.border='0px solid red';}}}
if(trovato>-1){document.getElementById("tabella1").style.border='0px solid red';}else{document.getElementById("tabella1").style.border='2px solid red';return;}
if(document.forms._ServerForm.area1.value==''){document.getElementById("divarea1").style.border='2px solid red';document.forms._ServerForm.area1.focus();return;}else{document.getElementById("divarea1").style.border='0px solid red';}
if(document.forms._ServerForm.area2.value==''){document.getElementById("divarea2").style.border='2px solid red';document.forms._ServerForm.area2.focus();return;}else{document.getElementById("divarea2").style.border='0px solid red';}
if(invia=='true'){if(document.forms._ServerForm.privacy.checked==false){document.getElementById("divprivacy").style.border='2px solid red';return;}else{document.getElementById("divprivacy").style.border='0px solid red';}}
document.forms._ServerForm.submit();return true;}
function Progress(){var ProgressURL;ProgressURL='uploadCV.asp';var v=window.open(ProgressURL,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=360,height=220');return true;}
function aprifile(file){
var ProgressURL;
if(file=="country"){ProgressURL=file+".asp";}
if(file=="region"){if(document.getElementById('countrycode').value==""){alert("selezionare prima Country");return;}else{ProgressURL=file+".asp?code="+document.getElementById('countrycode').value;}}
if(file=="city"){if((document.getElementById('countrycode').value=="")||(document.getElementById('regioncode').value=="")){alert("selezionare prima Country e Region ");return;}else{ProgressURL=file+".asp?code="+document.getElementById('countrycode').value+"&region="+document.getElementById('regioncode').value;}}
if(navigator.appName=="Microsoft Internet Explorer"){
var v=window.open(ProgressURL,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=200,left='+parseInt(800-200)+',top='+parseInt(600+120));
}else{
var v=window.open(ProgressURL,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=210,height=170,left='+parseInt(800-200)+',top='+parseInt(600+120));}}
