function cambiaapici(form)
{
	var re = /'/gi; // apice
	str = form.cercatesto.value.replace(re, "´");
	form.cercatesto.value = str;
	re = /’/gi;	// apostrofo
	str = form.cercatesto.value.replace(re, "´");
	form.cercatesto.value = str;
}

function contrCampoRicerca(stringa)
{

	var lunghezza;
	lunghezza = stringa.length;

	if(lunghezza<4) 
		{
		return false;
		}
	for(var i=1;i<lunghezza;i++)
		{
		if(stringa.charCodeAt(i)==34)
			{
			return false;
			}
		}
	
}

function controlla(form)
{
	if	(contrCampoRicerca(form.cercatesto.value)==false || form.cercatesto.value=='Parola non valida')	
		{
		form.cercatesto.value='Parola non valida';
		form.cercatesto.focus();
		return false;
		}
	else 
		{
		return true;
		}
}
