﻿function isNumeric(value) 
{
	var numericExpression = /^[0-9]+$/;
	if(value.match(numericExpression))
	{
		return true;
	}
	else
	{
		return false;
	}
}

function checkFormRicerca(theForm)
{
	if ((theForm.prezzo.value!="") && (!isNumeric(theForm.prezzo.value)))
	{
		alert("Attenzione, il prezzo deve essere in formato numerico");
		theForm.prezzo.focus();
		return (false);
	}
	
	return (true);
}

function display (category) {
	var whichcategory = document.getElementById(category);
	if (whichcategory.className=="show") {
		whichcategory.className="hide";
	} else {
		whichcategory.className="show";
	}
}

