function CntrlCerca(f,mx) {
var vl=f.cercaprodotto.value;
vl=vl.replace(/ /g,'');
	if (vl=="") {
	alert(mx);
	f.cercaprodotto.value="";
	f.cercaprodotto.focus();
	return false;
	}
return true;
}


 

function CntrLog(f) {
var vl=f.noer.value;
vl=vl.replace(/ /g,'');
	if (vl=="") {
	alert("Inserire l'indirizzo email, grazie.");
	f.noer.focus();
	return false;
	}
	
var vl=f.pw.value;
vl=vl.replace(/ /g,'');
	if (vl=="" || vl.length < 4 || vl.length > 16) {
	alert("La password e' mancante o non corretta.");
	f.pw.focus();
	return false;
	}
return true;	
}


function noCommLang(v) {
document.getElementById('comLan').innerHTML=v; 
}

function switcha(lingua) {
location.href='_switch.php?lan='+lingua; 
}


function LogoutSure(f,mx) {
return confirm(mx);
}

function MandaMail(a,b,c,d) {
var m="mai", t="lto";
location.href=m+t+":"+d+c+"@"+b+a;
}

function ApriPop(u) {
as = screen.height;
ls = screen.width;
af = 400; // altezza finestra
lf = 400; // larghezza finestra
dsu = (as - af) / 2; // distanza da sopra (e da sotto)
dsx = (ls - lf) / 2; // distanza da sinistra (e da destra)

window.open("pop/"+u,"NomePop","top="+dsu+",left="+dsx+",width="+lf+",height="+af+",scrollbars=yes,status=no,menubar=no"); 
}
