var username = this.document.nome_form.username.value

if (username == "")
{
window.open("pagina.htm?Nome del cane")
}