// JavaScript Document

function checkPass(form)
	 {
	  var obj=document.all.form;
          var ip   = (obj.urlFtp.value);
          var user = (obj.user.value);
          var pass = (obj.pass.value);
          var uspass = (user + ":" + pass)
          var url = ("ftp://" +uspass+ "@" +ip)
          if((obj.user.value == "") && (obj.pass.value == "")) 
	    {
             alert('La USER ID e la PASSWORD sono obbligatorie!');
             obj.user.focus();
	    }
          if((obj.user.value == "") && (obj.pass.value != "")) 
	    {
             alert('La USER ID è obbligatoria!');
             obj.user.focus();
	    }
          if((obj.pass.value == "") && (obj.user.value != "")) 
	    {
             alert('La PASSWORD è obbligatoria!');
             obj.pass.focus();
	    }
          if((obj.pass.value != "") && (obj.user.value != ""))
	    {
             window.open(url, "", "")
	    }
	}

function ripulisciForm()
	{
	  var obj=document.all.form;
	  obj.user.value = "";
	  obj.pass.value = "";
	}

function checkNewsletter(lg)
	{
	var obj=document.info;
	var x= obj.email.value;
    	var al="";
	if (lg==1){al="Inserisci un indirizzo e-mail corretto!"};
	if (lg==2){al="Enter a correct e-mail adress!"};
	if (lg==3){al="Introduire adresse e-mail correcte!"};
	if (lg==5){al="Enter a correct e-mail adress!"};
         if ( x.indexOf('@')==-1 || x.indexOf('.')==-1 || x.indexOf(' ')!=-1 || x.length<7 || !x)
              {
               alert(al);
	       return false;
              }
          else
             {
             openIt("iscrizioneNewsletter.asp?email="+x,"",300,200);
             return false;
             }
	}

	function controls(lg){
		var ok=true;
		var al="";
		if (lg==1){al="Immettere un dato per la ricerca"};
		if (lg==2){al="Enter a key word to search for"};
		if (lg==3){al="écrivez une ou plus mots pour rechercher"};
		if (lg==5){al="Enter a key word to search for"};
		if(document.search.fieldSearch.value.length==0){
			alert(al);
			ok=false;
		}
		if(ok){
			document.search.action="search.asp";
			document.search.submit();
		}
	}

	function viewGlox(strVoce){
			glox=window.open("glossario.html",'Glossario','width=600,height=450,scrollbars=yes');
			eval('glox.location.href="glossario.html' + strVoce + '"');
	}
	function openWinImg(theURL,winName,features) { 
  		winImg=window.open(theURL,winName,features);
	}
	
	function openPop(theURL,winName,features) { 
  		winPop=window.open(theURL,winName,features);
	}
	
	function openNews(newID){
			strURLCV='showNew.asp?newID=' + newID;
			//alert('strURLCV->' + strURLCV);
			res=window.open(strURLCV,'News','width=600,height=450,scrollbars=yes');
			//res=window.open("contentView.asp?pageID=1010&subcontentID=0&strWord=Amoco",'Content wiever','width=600,height=450,scrollbars=yes');
	}



