Here is the script code. when you get out of this page you'll see it working.

<script language="Javascript">

<!-- hide from old browsers
//script code by Carlos Nieto
//http://start.at/cars
//You must place the body tag with the onUnload part
function sign() {
if (confirm('Would you like to sign my guestbook?'))
{
location.href="http://www.yourhost.com/yourarea/yourguestbookpage.html"
}
else
{
alert('Bye! Come back soon.')
You can use another url above instead of the alert. Just write the same as the location.href= above.
} }
// stop hiding from old browsers -- >
</script>
<body onUnload="sign()">

Script code by Carlos Nieto

http://start.at/cars

Tommy Raven says Moo.