#!/usr/bin/perl

use CGI qw/:standard/;

$query = new CGI;

print header;
print start_html(-title=>'Useless Annoying Link Destination',
                 -style=>{'src'=>'js.css'});

if ($ENV{HTTP_REFERER} =~ m#http://.*/~lkseitz/javascript/annoy.html#) {
   print h1("Congratulations"),
         p("Managed to figure it out, eh?  Give yourself a pat on the " .
           "back.\n"),
         p("For the record, I know of three ways to get here.  If you " .
           "came up with a new one, I'd appreciate knowing about it."),
         ol(
            li("Move the alert box over the link so your cursor is on " .
               "top of it when you click 'OK.'"),
            li("Use the 'enter' key to dismiss the alert box.  Your " .
               "cursor will still be over the link, so you can click " .
               "it once the box is gone."),
            li("Use the 'tab' key to highlight the link and hit 'enter.'"));
}
else {
   print h1("Cheater"),
         p("No cheating!  You'll have to figure it out, " .
           "not just type the URL.\n");
}

print "<DIV CLASS=\"legal\">\n",
      hr,
      p({-style=>"margin: 0px"}),
      "Return to ",
      a({-href=>"index.html"}, "Lee's Useless JavaScript Examples"),
      ".<BR>\n",
      "Author:  Lee K. Seitz<BR>\n",
      "Created:  17 Oct 2002; Last Modified: 4 Jun 2003\n";
print end_html;
