SUBROOT=ROOT + "omniscience/truth/";				// ROOT previously declared, using it to locate specific folder used
fstart=false;							// determines if slideshow has been started once
going=false;							// determines if slideshow is running
bgoing=false;							// determines if in branwash mode
word1="farting";							// primary word to use
word2="fart";							// secondary word
word3="blowing ass";						// third word to use
pic2="slide2custom";						// pic to use for slide 2, custom is default
rate=8000;							// time before slideshows switch 
slide=0;								// current slide of the slideshow
var show=new Array(9);						// holds slideshow pics

for (slide=0; slide<9; ++slide)
    // declares/sets/loads pics for slideshow
	{n=SUBROOT + "slide" + slide;
	show[slide]= new Image();
	if (slide==2) n+="custom";
	show[slide].src=n + ".gif";
	}
slide=0;


function ae_truth(w1, w2, w3)
    // startup fucntion, sets pic2 and assigns words as topic words for slideshow captions
	{word1=w1;
	word2=w2;
	word3=w3;
	pic2="slide2";
	switch(word1)
    // looks for topic in list, if found sets 2nd pic slideshow to that 
		{case "marijuana":			pic2+="marijuana";			break;
		case "pre-marital sex":		pic2+="sex";			break;
		case "quitting school":		pic2+="school";			break;
		case "pornography":		pic2+="pornography";		break;
		case "Islam":			pic2+="islam";			break;
		case "inter-racial marriage":		pic2+="racemixing";			break;
		case "underage drinking":		pic2+="drinking";			break;
		case "homosexuality":		pic2+="homosexuality";		break;
		case "abortion":			pic2+="abortion";			break;
		case "nose picking":		pic2+="nosepicking";		break;
		case "not eating your vegetables":	pic2+="vegetables";		break;	
		case "masturbation":		pic2+="masturbation";		break;
		default:				pic2+="custom";			break;
		}
	show[2].src=SUBROOT + pic2 + ".gif";
	}
function stopgo()
    // operates the play/pause button of slideshow
	{b="Play";
	if (going==false)
    // starts slideshow if not running
		{going=true;
		fstart=true;
		b="Stop";
		skip(0);
		}
	else
    // stops it if running
		{going=false;
		bgoing=false;
		document.getElementById("fast").checked=false;		
		b="Play";
		rate=8000;
		}
	document.getElementById("stopgo").innerHTML =b;
	}

function firststart()
    // starts slideshow for the first time when mouse over pic
	{if (fstart==0)
		{fstart=true;
		going=false;
		setTimeout("stopgo()", 1500); 
		}
	}
function skip(n)
    // advances or goes back a slide based on n, -1 is manual back, 1 is manual forward, 0 is auto forward
	{var text="The slide show fucked up.  Probably because of " + word1 + ".";
	if (n!=0) 
    // if user requested change screen, stops playing of slideshow
		{n+=9;
		going=false;
		document.getElementById("stopgo").innerHTML ="Play";
		slide+=n;
		}
	else if (going==true) ++slide;
    // if part of slideshwo and its still going updates next slide
	slide%=9;
    // gets slide to number in range
	switch (slide)
		{case 0:	text="Prepare to have your mind blown with the scientifically proven effects<sup>1</sup> of " + word1 + ".";
			break;		
		case 1:	text="Here's a nice happy family on a typical day at their happy home.  They live in a nice house, in a nice neighborhood and have a cute, ";
			text+="innocent child who has never hurt anyone and will most likely grow up to be the next pope (mother teresa) or president (first lady)."
			break;
		case 2:	text="Hey, look, its you. But, uh oh, what are you doing? " + word1.toUpperCase() + "!!.  What about all the people you're harming, or  ";
			text+="even all the horrible things it does to you? Don't tell me you buy all that '" + word3 + " is harmless' mularkey that the ";
			text+="jew media and godless activist judges are shovelling."; 
			break;
		case 3:	text="Oh no its too late. With your help, " + word1 + " is destroying society.  Looks like that happy family isn't so happy anymore, and they aren't ";
			text+="as much of a family anymore either.    'Someone' who thought " + word3 + " wasn't so bad ending up causing the death of their innocent ";
			text+=" child...";
			break; 
		case 4:	text="The worst part is that only did that innocent child die, but the angelic kid is now forever condemned to hell through no fault of his own. ";
			text+="All because you decided that " + word3 + " was the 'cool' thing to do.  To think, it's ";  
			d= new Date();
			text+=d.getFullYear() + " and some people still believe that " + word1 + " is a victimless crime. Ha. ";
			break; 
		case 5:	text="Well, look who's learning the hard way that " + word1 + " isn't so harmless.  Yup, just as every scientific study has proven it would; " + word1;
			text+=" has caused you to go blind.  First, you condem an innocent child to eternal damnation, and now " + word3 + " has cost you your vision.";
			break; 
		case 6:	text="Ouch. Blinded and on fire too!  Boy, I bet you wish that you'd either paid more attention in science class or never even heard of ";
			text+=word1 + " to begin with. But its too late now, you've inspired god's wrath.  And by golly, for people who love " + word3 + " he sure does have a lot of it. ";
			break;
		case 7:	text="And if all that wasn't bad enough, now you have to spend the rest of your life in jail with a huge felon quite literally up your ass all the time. ";
			text+="Turns out " + word1 + " isn't so 'harmless' after all. If only you had listened.";
			break; 
		case 8:	text="Oh well I guess it isn't bad news to everyone.  Looks like some people are delighted that you chose " + word1 + " over doing the right thing.  Oh yes, look ";
			text+="at all those happy terrorists.  Nothing but good news for them, because of you, they won."; 
			break; 
		}
	if ((bgoing==true) && (slide%3==2))
    // if in brainwash mode, spits out subliminal message every so often
		{text="<p align=\"center\"><font size=\"4\" color=\"#FFFF00\"><strong>" + word1.toUpperCase() + " IS WRONG.</strong>";
		text+="<font size=\"1\" color=\"#000000\"><p align=\"center\">Think to yourself: '";
		switch(Math.round(Math.random()*7))
			{case 0:	text+="I must send naked pictures of myself to ";
				text+="<a href=\"mailto:jason@porkjerky.com\" class=\"hatelink\">jason@porkjerky.com</a>'";	
				break; 
			case 1:	text+="I want to know if a dog's asshole really tastes that good.'";		
				break;
			case 2:	text+="A homemade tattoo of a swastika is just what my forehead needs.";		
				break;
			case 3:	text+="Why spend all that money for a professional genital piercing when I can do 10 for the same price?'";	
				break;  
			case 4:	text+="Even though I don't have to, with all these thoughts I have been having I should probably register as a sex offender.'";
				break;						
			case 5:	text+="I want to eat my own poop, it probably tastes good.";
				break;
			default:	text+="I must send naked pictures of myself to ";
				text+="<a href=\"mailto:jason@porkjerky.com\" class=\"hatelink\">jason@porkjerky.com</a>'";	
				break; 
			}
		text+="'</center>";
		}
	if ((going==false) && (n!=0))
    // if manually changes slide, processes it
		{document.getElementById("caption").innerHTML = text;
		document.getElementById("slideshow").src=show[slide].src;	
		}	
	if ((n==0) && (going==true)) 
    // if slideshow going and new request to change comes in, does it
		{document.getElementById("caption").innerHTML = text;
		document.getElementById("slideshow").src=show[slide].src;	
		setTimeout("skip(0)", rate);
		}
	}
function subliminal()
    // controls brainwash mode
	{bgoing=document.getElementById("fast").checked;
	if (bgoing==true)
		{rate=80;
		going=false;
		stopgo();
		}
	else
		{rate=8000;
		going=true;
		stopgo();
		}	
	}	
function truthselect(n)
    // toggles input form between select box and inputs
	{link="<a href=\"javascript:void(0);\" onClick=\"truthselect(" + ((n+1)%2) + ");\" class=\"hatelink\">";
	html="<table border=\"0\" cellspacing=\"4\" cellpadding=\"4\"><tr>";
	if (n==1)
    // shows input form
		{link+="Select A Truth";
		html+="<td class=\"formcell\">Subject<br><input type=\"text\" class=\"bodyinput\" size=\"20\" maxlength=\"35\" name=\"topica\" value=\"farting\"></td>";
		html+="<td class=\"formcell\">As A Verb<br><input type=\"text\" class=\"bodyinput\" size=\"20\" maxlength=\"35\" name=\"topicb\" value=\"fart\"></td>";
		html+="<td class=\"formcell\">As A Gerund<br><input type=\"text\" class=\"bodyinput\" size=\"20\" maxlength=\"35\" name=\"topicc\" value=\"blowing ass\"></td>";
		}
	else
    // shows select form
		{link+="Create Your Own Truth";
		html+="<tr><td class=\"formcell\">Subject<br><select class=\"bodyinput\" name=\"topic\" id=\"topic\">";
		html+="<option value=\"marijuana\">Marijuana</option><option value=\"sex\">Pre-Marital Sex</option><option value=\"school\">Quitting School</option>";
		html+="<option value=\"pornography\">Pornography</option><option value=\"islam\">Islam</option><option value=\"racemixing\">Inter-Racial Marriage</option>";
		html+="<option value=\"drinking\">Underage Drinking</option><option value=\"homosexuality\">Homosexuality</option><option value=\"abortion\">Abortion</option>";
		html+="<option value=\"nosepicking\">Nose Picking</option>	<option value=\"vegetables\">Not Eating Vegetables</option>";
		html+="<option value=\"masturbation\">Masturbation</option></select></td>";
		}
	document.getElementById("newtruth").innerHTML =html + "</tr></table>";
	document.getElementById("switchtruth").innerHTML =link + "</a>";
	}


