<!--


	////////////////////////////////////////////////////////////////////////
	////////////////////////////////////////////////////////////////////////
	//
	//	!!!! ATTENTION !!!!
	//
	//	Anyone reading source code be aware that this script is
	//	COPYRIGHTED material.
	//
	//	This script may in no way be used without written permission
	//	from GoldKnight.  Failure to comply is illegal and will be
	//	reported.
	//
	//	Copyright 2009 GoldKnight.
	//
	//
	////////////////////////////////////////////////////////////////////////
	////////////////////////////////////////////////////////////////////////




	var cVersion = false;

	var app = navigator.appName
	var version = parseInt(navigator.appVersion)


	// final and form content:
	var finalcontent = "";
	var formcontent = "";


	//*****************************
	//**         ARRAYS          **
	//*****************************

	/////////////////////////////////////////////////////////////
	// Subject (See)
	//
	/////////////////////////////////////////////////////////////
	VAR_subject = new Array(

	"See",
	"Witness",
	"Observe",
	"Come See",
	"View",
	"Watch",
	"Behold,",
	"Gaze Upon",
	"Live!",
	"Real!",
	"Dare to Witness",
	"Dare to Behold",
	"Dare to Gaze Upon"
	);

	/////////////////////////////////////////////////////////////
	// Adjective (Amazing)
	//
	/////////////////////////////////////////////////////////////
	VAR_adjective = new Array(

	" Amazing",
	" One and Only",
	" Horrifying",
	" Never Before Seen",
	" Legendary",
	" Death-Defying",
	" Astonishing",
	" Astounding",
	" Miraculous",
	" Medical Mystery: The",
	" Mysterious",
	" Mistake of Nature: The",
	" Shocking",
	" Phenomenal",
	" Mind Boggling",
	" Mystical",
	" Fortune Telling",
	" Fire Eating",
	" Fire Breathing"
	);



	/////////////////////////////////////////////////////////////
	// Description (Shark) 
	//
	// GRAB ANOTHER?:
	// ===========
	// S = Grab Another (Sometimes):
	// A = Grab Another (Always):
	// N = Stand Alone
	// 
	// Second Set:
	// ===========
	// N = Can't be Second Word
	// C = Can be Second Word
	//
	// Third Set:
	// ==========
	// A = Needs Adjective
	// N = No Adjective
	// S = Sometimes Adjective
	//
	/////////////////////////////////////////////////////////////
	VAR_description = new Array(

	" Shark","N","C","S",
	" Wolf","N","C","S",
	" Jackal","N","C","A",
	" Alligator","N","C","A",
	" Bat","N","C","S",
	" Tree","N","C","S",
	" Snake","N","C","S",
	" Bearded","A","N","N",
	" Werewolf","N","C","S",
	" Hawk","N","C","A",
	" Lizard","N","C","S",
	" Frog","N","C","A",
	" Siamese","S","C","N",
	" Lobster Clawed","N","C","N",
	" Spider","N","C","S",
	" Rat","N","C","A",
	" Cat","N","C","A",
	" Stone","N","C","N",
	" World's Strongest","N","C","N",
	" Wooden","A","N","N",
	" Monkey","N","C","A",
	" 3","N","C","A",
	" 4","N","C","A",
	" 7","N","C","A",
	" 2","N","C","A",
	" Inside-Out","S","C","N",
	" Blind","A","C","N",
	" Mutated","A","C","N",
	" Mutant","A","C","N"
	);
	

	/////////////////////////////////////////////////////////////
	// Type (Faced)
	//
	/////////////////////////////////////////////////////////////
	VAR_type = new Array(

	" Faced",
	" Headed",
	" Half",
	" Skinned",
	" Tailed",
	" Legged",
	" Eyed"
	);


	/////////////////////////////////////////////////////////////
	// End Product (Boy)
	//
	////////////////////////////////////////////////////////////
	VAR_product = new Array(

	" Man",
	" Woman",
	" Alligator",
	" Mermaid",
	" Unicorn",
	" Girl",
	" Boy",
	" Siamese Twins",
	" Twins",
	" Triplets",
	" Mummy",
	" Brothers",
	" Sisters",
	" Triplets",
	" Magician",
	" Children"
	);


	/////////////////////////////////////////////////////////////
	// Clincher (One Night Only!)
	//
	/////////////////////////////////////////////////////////////
	VAR_clincher = new Array(

	"! One Night Only!",
	"! Only Five Cents!",
	"! Come One Come All!",
	", If You Dare!",
	"! Not For the Faint of Heart!",
	"! Women and Children Beware!",
	"! Tonight Only!"
	);





	//*****************************
	//**    GET RANDOM NUMBER    **
	//*****************************
	function get_number(low, high)
	{
		number = Math.random() * (high-1)
		number2 = Math.round(number) + low;
		return number2;
	}



	//*******************************
	//**    PROCESS FORM E-MAIL    **
	//*******************************
	function submit_email()
	{
		if( (document.submitAttraction.yourname.value != "") && (document.submitAttraction.youremail.value != "") && (document.submitAttraction.friendsemail.value != "") && (formcontent != ""))
		{
			if(formcontent != "")
			{
				document.submitAttraction.content.value = formcontent;
			}
			document.submitAttraction.submit();
		}
		else
		{
			alert("Must have Filled Out All Forms and actually Generated an Attraction first!");
		}
	}

	//*****************************
	//**    PROCESS DISCOVERY    **
	//*****************************
	function submit_discovery()
	{
		if( (document.submitDiscovery.dyourname.value != "") )
		{
			if(formcontent != "")
			{
				document.submitDiscovery.content.value = formcontent;
			}
			document.submitDiscovery.submit();
		}
		else
		{
			alert("Must fill out Your Name first!");
		}
	}

	

	//*****************************
	//**    GENERATE FORTUNE     **
	//*****************************
	function generate_fortune()
	{
		//variables:
		var subject 	= "";
		var adjective	= "";
		var description	= "";
		var type	= "";
		var product	= "";
		var clincher 	= "";
	
		var acounter = 0;
		var secarray = new Array;

		//SUBJECT:
		num_subject=VAR_subject.length;
		rnum = get_number(0,num_subject);
		subject = VAR_subject[rnum];

		//ADVERB:
		num_adjective = VAR_adjective.length;
		rnum = get_number(0,num_adjective);
		adjective = VAR_adjective[rnum];

		//DESCRIPTION:
		num_description = VAR_description.length/4;
		rnum = get_number(0,num_description);
		description = VAR_description[rnum*4];
		var main_1st = VAR_description[rnum*4+1];
		var main_3rd = VAR_description[rnum*4+3];
		
		for(x=0;x<num_description;x++)
		{
			if(VAR_description[x*4+2] == "C" && VAR_description[x*4] != description)
			{
				secarray[acounter] = VAR_description[x*4];
				acounter++;
				secarray[acounter] = VAR_description[x*4+3];
				acounter++;
			}	
		}
		
		var seconddesc = 1000;
		if(main_1st == "S" || main_1st == "A")
		{
			rnum = get_number(0,10);
			if(main_1st == "A"){rnum=10;}
			if(rnum>5)
			{
				rnum = get_number(0,(acounter/2));
				seconddesc = rnum;
				description = description + secarray[rnum*2];
			}
		}

		//Determine if You need a Type:
		if(seconddesc<1000)
		{
			if(secarray[seconddesc*2+1] == "A" || secarray[seconddesc*2+1] == "S")
			{
				rnum = get_number(0,10);
				if(secarray[seconddesc*2+1] == "A"){rnum=10;}
				if(rnum>5)
				{
					num_type = VAR_type.length;
					rnum = get_number(0,num_type);
					type = VAR_type[rnum];
					if(type == " Half")
					{
						if(description.charAt(description.length-1) == '2' || description.charAt(description.length-1) == '3' || description.charAt(description.length-1) == '4' || description.charAt(description.length-1) == '7')
						{
							type = " Legged";
						}
						else
						{
							description = " Half" + description;
						}
					}
				}
			}
		}
		else
		{
			if(main_3rd == "A" || main_3rd == "S")
			{
				rnum = get_number(0,10);
				if(main_3rd == "A"){rnum=10;}
				if(rnum>5)
				{
					num_type = VAR_type.length;
					rnum = get_number(0,num_type);
					type = VAR_type[rnum];
					if(type == " Half")
					{
						if(description.charAt(description.length-1) == '2' || description.charAt(description.length-1) == '3' || description.charAt(description.length-1) == '4' || description.charAt(description.length-1) == '7')
						{
							type = " Legged";
						}
						else
						{
							description = " Half" + description;
						}
					}
				}
			}
		}

		//PRODUCT:
		num_product=VAR_product.length;
		rnum = get_number(0,num_product);
		product = VAR_product[rnum];

		//CLINCHER:
		num_clincher = VAR_clincher.length;
		rnum = get_number(0,num_clincher);
		clincher = VAR_clincher[rnum];

		//Print the Final Result:
		finalcontent = (subject + " the" + adjective + description + type + product + clincher);
		formcontent = (subject + " the" + adjective + description + type + product + clincher);

		fortune.innerHTML = finalcontent;
	}




	////////////////////////////////////////////////////////////////////////
	////////////////////////////////////////////////////////////////////////
	//
	//	!!!! ATTENTION !!!!
	//
	//	Anyone reading source code be aware that this script is
	//	COPYRIGHTED material.
	//
	//	This script may in no way be used without written permission
	//	from GoldKnight.  Failure to comply is illegal and will be
	//	reported.
	//
	//	Copyright 2009 GoldKnight.
	//
	//
	////////////////////////////////////////////////////////////////////////
	////////////////////////////////////////////////////////////////////////

//-->
