non è poi così tanto difficile
if (getElementsById('campo1').value=="")
{
alert('campo vuoto');
}
e via così