JavaScript Click Me

Click Me

<HTML>
<HEAD>
<TITLE>Click Me</TITLE>
<SCRIPT language="JavaScript">
/************* INSTRUCTIONS [HOW TO CUSTOMIZE] *************/
/*
Make a copy of this page for BACKUP in case something goes wrong

Configure each line as per the instructions given BELOW it.
You may change the words inside the "double quotes".
If there aren't any quotes then it might be a numerical value which shouldn't be quoted.
*/
here_he_comes="PSSST......TOP SECRET";
/*
here_he_comes - This is the initial text on the button, before the user has tried to click on it.
*/
kb=false;
/*
kb - Do NOT change this. If you do...
kb=true;
...the user will be able to click it using the keyboard.
*/
c=false;
/*
c - For continous messages
Set c to true if you want the messages to be continous (never ending)
Set c to false if you want to let the user click on the button after the all the messages are displayed 
*/
he_gave_up="OK! I give up!!";
/*
This holds the last message on the button. In fact this is the message that is displayed when the user will be allowed to click on the buton, if c=false obviously
*/
he_did_it="#";
/*
This is the address of the page the button links to if it is clickable.
Note1:You must use only back slashes ( / ) here or the link won't work
Note2:If you leave it blank, It will go back the previous page when clicked.
eg: finish="";
Note3:works if c=false obviously
*/
var i=0;
var msg=new Array();
var msg_c=new Array();
/*
DO NOT CHANGE THESE. SEE BELOW.
*/
/*
Below are the continous messages and used if c=true
They are just randomly selected in any order and displayed.

You can have any amount. Just keep increasing the  index
eg: The next one could be ......

msg_c[8]="Punk!!";

Write it in exactly the same format and don't miss out the semi-colon in the end. 
*/
msg[0]="Come on! Get me";
msg[1]="Hey! Over here!";
msg[2]="Too slow!";
msg[3]="Haha Hehe";
msg[4]="Missed me!";
msg[5]="Hoo Hoo Hoooo!";
msg[6]="Fine! I won't move";
msg[7]="I'm too fast for ya!";

/*
Below are the non-continous messages and used if c=false
They are displayed on the button in the correct order (0 to ...)
You can have any amount. Just keep increasing the  index
eg: The next one could be ......

msg_c[14]="Punk!!";

Write it in exactly the same format and don't miss out the semi-colon in the end. 
*/
msg_c[0]="Ooops! I'm Sorry";
msg_c[1]="Oh No! Not again";
msg_c[2]="You're scaring me!";
msg_c[3]="WHOA!!!";
msg_c[4]="OK, I'll try and hold still";
msg_c[5]="Whats your problem?";
msg_c[6]="What the hell?";
msg_c[7]="Are you Squint?";
msg_c[8]="May be you're blind";
msg_c[9]="Stop it!";
msg_c[10]="Trying to kill me?";
msg_c[11]="Somebody stop this guy!";
msg_c[12]="Leave me alone!";
msg_c[13]="Get this Psycho off me!";
/*
Thats it! You have customized the button. See if it works now. 
If it doesn't anyway, revert to the backup.
TIP: You can use this script inside a frame. So that the user does not leave your web site.
OR You can open this script in a new window.

Ideas, comments, questions!! Contact - schubert_94_2000@yahoo.com.
DO NOT change anything after this line unless you know what you're doing.
*/
function crazy_aint_it()
	{
	var num1=parseInt(Math.random()*(width-150));
	var num2=parseInt(Math.random()*(height-150));
	var num3=parseInt(Math.random()*msg.length);
	if(document.silly.you.value!=he_gave_up)
		{
		foolingObj.left=num1;foolingObj.top=num2;
		}
		if (c==true)
			{
			document.silly.you.value=msg[num3];
			}
		else if (c==false)
			{
			if(i==msg_c.length)
				{
				document.silly.you.value=he_gave_up;
				}
			else if(i!=msg_c.length)
				{
				document.silly.you.value=msg_c[i];i++;
				}
			}
		}
function lure_him()
	{
	if(document.all)
		{
		foolingObj=eval(document.all.sillyLyr.style);		
		width=document.body.clientWidth;
		height=document.body.clientHeight;
		}
	else if(document.layers)
		{
		foolingObj=eval(document.sillyLyr.document);
		width=innerWidth;
		height=innerHeight;
		}
		document.silly.you.value=here_he_comes;
		foolingObj.backgroundColor=document.bgColor;
	}
function dont_cheat()
	{
	alert("Use that damn mouse!");
	kb=true;
	}
function done()
	{
	if (kb!=true)  
		{	
		if(he_did_it.length!=0)
			{
			location.href=he_did_it;
			}
		else
			{
			history.go(-1);
			}
		kb=false;
		}
	}
window.onload=lure_him;
</SCRIPT>
</HEAD>
<BODY bgcolor="white">
<DIV onMouseOver="crazy_aint_it()" id="sillyLyr" style="position:absolute;visibility:visible;top:40;left:40">
	<FORM name="silly">
		<TABLE width="100" border="1" bordercolor="ffffff" cellspacing="0" cellpadding="5" bgcolor="ffffff">
			<TR>
				<TD align="center" valign="middle">
					<INPUT name="you" onMouseOver="crazy_aint_it()" onMouseDown="done()" type="Button" style="font-family:ms sans serif;font-size:9pt" onKeyPress="dont_cheat()">
				</TD>
			</TR>
		</TABLE>
	</FORM>
</DIV>
</BODY>
</HTML>