titecoon = new Image()
titecoon.src = "../images/ECO.gif"
var titecooff = "../images/ECO-50.gif"
titbioon = new Image()
titbioon.src = "../images/BIO.gif"
var titbiooff = "../images/BIO-50.gif"

function feedback(pagina) {
	var w=600;
	var h=450;
	X=(screen.width-w)/2;
	Y=(screen.availHeight-h)/2;
	WF=window.open(pagina,'feedback','toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+w+',height='+h)
	WF.moveTo(X,Y);
}

function popup(filename) {
	var w=600;
	var h=450;
	X=(screen.width-w)/2;
	Y=(screen.availHeight-h)/2;
	WF=window.open(filename,'popup','toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+w+',height='+h)
	WF.moveTo(X,Y);
}

function redirectTo(redirUrl) {
	document.location=redirUrl
}

function stampapagina() {
	window.print();
	return;
}

function segnala() {
	var w=600;
	var h=450;
	X=(screen.width-w)/2;
	Y=(screen.availHeight-h)/2;
	WF=window.open("GEN-segnala.asp?url="+escape(document.location),'segnala','toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+w+',height='+h)
	WF.moveTo(X,Y);
}

function trim(a){
  return a.replace(/^\s+/,'').replace(/\s+$/,'')
}

function trimAll(a){
  return a.replace(/^\s+/,'').replace(/\s+$/,'').replace(/\s+/g,' ')
}

function ErrMess(m,s) {
	alert(m);
	if (s != "") eval(s+".select()");
	return false;
}

function windstampa(p,wp) {
	tp=''+document.location;
	tp=tp.replace(p,wp);
	var w=630;
	var h=450;
	X=(screen.width-w)/2;
	Y=(screen.availHeight-h)/2;
	WF=window.open(tp,'stampa','toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+w+',height='+h)
	WF.moveTo(X,Y);
}
function windprint(p) {
	var w=630;
	var h=450;
	X=(screen.width-w)/2;
	Y=(screen.availHeight-h)/2;
	WF=window.open(p,'','toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+w+',height='+h)
	WF.moveTo(X,Y);
}

function qparseform() {
	f=document.fq;
	fs="document.fq.";
	f.qutente.value=trim(f.qutente.value);
	f.qemail.value=trim(f.qemail.value);
	f.domanda.value=trim(f.domanda.value);
	if (f.qutente.value=='') return ErrMess("Inserisci il tuo nome.",fs+"qutente")
	if (f.qemail.value=='') return ErrMess("Inserisci il tuo indirizzo e-mail.",fs+"qemail")
	if (f.domanda.value=='') return ErrMess("Inserisci la tua domanda.",fs+"domanda")
    return true;
}