function impostaValore(ilCampo){
	startPage = ilCampo.value
}
function goPage(pagina,parameters){
		laLocation = parameters+'&pageToShow='+pagina
		self.location = laLocation
		return true;
}
function openDirectory(physDoc,authfilenumber,superior,ilContesto,laTipologia){
	//alert("physDoc "+physDoc+"\nauthfilenumber "+authfilenumber+"\nsuperior "+superior+"\nilContesto "+ilContesto+"\nlaTipologia "+laTipologia)
	if(physDoc!='')document.navigationForm['physDoc'].value = physDoc;
	if(ilContesto!='')document.navigationForm['theTermToView'].value = ilContesto;
	if(superior!='')document.navigationForm['superior'].value = superior;
	if(ilContesto!='')document.navigationForm['ilContesto'].value = ilContesto;

	document.navigationForm['authfilenumber'].value = authfilenumber;
	document.navigationForm['laTipologia'].value = laTipologia;
	//document.navigationForm.submit();
	if(physDoc!='')
		document.navigationForm02['physDoc'].value = physDoc;
	if(ilContesto!='')
		document.navigationForm02['ilContesto'].value = ilContesto;
	if(superior!='')
		document.navigationForm02['superior'].value = superior;

	if(!openArchiveFromDirectory(authfilenumber,laTipologia,ilContesto)){
		//analisiInCorso(true);
	}

	return false;
}
function openArchiveFromDirectory(authfilenumber,laTipologia,theTermToView,parentCodes,theTermSuperior){
	//alert()
	document.navigationForm02.target = 'content_2';
	document.navigationForm02.action = '/archivio/jsp/directory/findFromDirectory.jsp';

	while(authfilenumber.indexOf("a")>0){
		authfilenumber = authfilenumber.replace("a"," or ")
	}

	if(parentCodes != null && parentCodes!='undefined'){
		document.navigationForm02['parentCodes'].value = parentCodes;
	}else{
		document.navigationForm02['parentCodes'].value = "";
	}

	if(theTermSuperior != null && theTermSuperior!='undefined'){
		document.navigationForm02['theTermSuperior'].value = theTermSuperior;
	}else{
		document.navigationForm02['theTermSuperior'].value = "";
	}
	document.navigationForm02['theTermToView'].value = theTermToView;
	document.navigationForm02['authfilenumber'].value = authfilenumber;

	document.navigationForm02['laTipologia'].value = laTipologia;
	parent.document.getElementById('content_2').src ="";
	document.navigationForm02.submit();
	ricercaInCorso(true);
	return false;
}
function changeVocPage(verso,thePage){
	laPagina = thePage+verso;
	document.theForm.thePage.value = laPagina;
	document.theForm.submit();
	return false;
}
function collectVocKeys(){
	voci ="";
	for(i=0;i<document.theForm.length;i++){
		if(document.theForm.elements[i].name.indexOf(".") == 0 && document.theForm.elements[i].type!="checkbox" && document.theForm.elements[i].name.indexOf("Qr")==-1){
			if(voci.indexOf(document.theForm.elements[i].value+"[@@]")==-1){
				voci += document.theForm.elements[i].value + "[@@]";
			}
		}
	}
	for(i=0;i<document.theForm.length;i++){
		if(document.theForm.elements[i].checked){
			if(voci.indexOf(document.theForm.elements[i].value+"[@@]")==-1)
				voci += document.theForm.elements[i].value + "[@@]";
		}
	}
	document.returnForm.leVoci.value = voci;
	document.returnForm.action = document.theForm.laLocation.value;
	document.returnForm.submit()
}