function Popup(apri) { var stile = "height=400 width=400, status=no, menubar=no, toolbar=no, scrollbars=no, resizable=no"; window.open(apri, "", stile); } function tasto_enter(event) { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if (keyCode == 13) { alert ("Il tasto 'Enter' e' disabilitato... usa il mouse e i tasti sullo schermo."); return false; } else { return true; } } function isprezzo(obj) { if (isNaN(obj.value) || obj.value < 0) { alert("Nel campo prezzo e' possibile immettere solo numeri maggiori di 0\n\nUSARE IL PUNTO PER I DECIMALI."); obj.value=""; obj.focus(); } } function isvalid(obj) { if (obj.value !='') { if (!isint(obj.value)) { alert("Nel campo e' possibile immettere\nsolo numeri interi."); obj.value=""; obj.focus(); } } } function isint(string) { var numericExpression = /^[0-9]+$/; if(string.match(numericExpression)) { return true; } else { return false; } }