if (confirm("go anywhere?"))
 location.href="1.asp";
else
 location.href="2.asp";