 
function miostatus() { //v2.0
  status=" ";
  }

//JavaScript per la visualizzazione della legenda della ricerca della fonoteca
function ShowLegend(){
myWindow = window.open("legenda.htm", "Legenda", 'resizable=0,status=0,width=435,height=300,screenX=200,left=200,screenY=200,top=200,scrollbars=yes'); 

/*
	var help;
	help=sez;
	if(menu.length>0){
		help = help +" azione "+ menu;
	}
	alert("Help sezione "+help);
*/
}

// Mostra in un popup le informazioni di spedizione e pagamento per gli ordini dell'eshop
function showInfo() {
	myWindow = window.open("../include/pagamento.htm", "Informazioni", 'resizable=0,status=0,scrollbar=yes,width=420,height=400,screenX=100,left=200,screenY=100,top=200'); 
}

function showOrder() {
	myWindow = window.open("../include/ordineStampabile.aspx", "Informazioni", 'resizable=yes,status=0,scrollbars=yes,width=500,height=600,screenX=100,left=100,screenY=100,top=100'); 
}

function checkMail(myForm) {
	var ok = false;
	var mess = 'Attenzione!\n ';
	if (myForm.email.value=='') {
		ok = false;
		mess = mess + 'Bisogna inserire l\'e-mail!\n';
	} else {
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)) {
			ok = true;
		} else {
			ok = false;
			mess = mess + 'Email non corretta!\n';
		}
	}
	if (!ok) {
		alert(mess);
		return false;
	} else {
		return true;
	}
}


function chkEmptyTxt(txt){
	var myRegExp;
	
	myRegExp = /^(\s*)$/;
	if (myRegExp.test(txt)) { 
		//alert("NO");
		return false
		}
	else {
		//alert("SI");
		return true
	}
}

function chkNumericFields(myForm){
	var myRegExp;
	var i;
	var ok = true;
	myRegExp = /^(\d*)$/;
	for (i=0; i < myForm.elements.length ; i++) {
		if (myForm.elements[i].type == 'text') {
			if (!myRegExp.test(myForm.elements[i].value)) { 
				ok = false;
			}
		}
	}
	if (ok) {
		return true;
	} else {
		//	alert('I campi quantità devono essere numerici!');
		return false;
	}
}

function checkCarr(myForm) {
	var ok = true;
	ok = chkNumericFields(myForm);
	if (ok) {
		myForm.submit();
	} else {
		alert('I campi quantità devono essere numerici!');
	}
}

function chkNumericTxt(txt){
	var myRegExp;
	
	myRegExp = /^(\d*)$/;
	if (myRegExp.test(txt)) { 
		//alert("NO");
		return false
		}
	else {
		//alert("SI");
		return true
	}
}
