 
  
  function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
 
function setTextValueByIndex(index)
{
	var r_text = new Array ();
	r_text[ 0] = "Hey tourists. Yes you. You know those 200 commuters all standing behind you as you ride up the escalator taking up both sides? They aren't in a HURRY OR ANYTHING YOU IGNORANT INPERCEPTIVE TOURONS. YOU KNOW ALL OF THOSE PEOPLE WHO GOT ON BEFORE YOU AND WALKED UP QUICKLY? THEY WERE NOT IN AN EXERCISE CLASS. MOVE OUT OF OUR WAY. THIS ISN'T F**KING DISNEY WORLD. WE LIVE HERE.";
	r_text[ 1] = "ESCALATORS WORK IN DC? HAHAHAHA THAT'S A GOOD ONE.";
	r_text[ 2] = "LOCALS: RUN UP THE LEFT SIDE AND SHOVE ANY TOURISTS OUT OF THE WAY. IT IS YOUR DUTY AS A VA, MD, OR DC CITIZEN TO KEEP THE PEOPLE FLOWING BECAUSE GOD KNOWS, THESE THINGS COULD STOP WORKING AT ANY MOMENT (or if you are at Dupont Circle or Foggy Bottom, they already have).";
	r_text[ 3] = "An escalator can never break: it can only become stairs. You would never see an Escalator Temporarily Out Of Order sign, just Escalator Temporarily Stairs. Sorry for the convenience. - Mitch Hedberg (RIP, February 24, 1968 - March 29, 2005)";
	r_text[ 4] = "IF YOU STAND IN THE MIDDLE & DO NOT LET ANYONE BY. DO NOT PASS GO. DO NOT COLLECT $200";
	r_text[ 5] = "PLEASE DO NOT USE THE SECOND WORKING ESCALATOR THAT REQUIRES YOU TO WALK 20 MORE FEET. EVERYONE JOIN THE MOB AT THE CLOSEST ESCALATOR";
	r_text[ 6] = "When an escalator is out of service and being worked on (a rare occurrence).  Be sure to glare at and/or make smart-ass comments to the technician working on it as if it is his fault that it is not working and not the fact that the infrastructure Metro runs on is woefully underfunded.";
	r_text[ 7] = "Be sure to stop walking when you reach the top of the escalator to prepare yourself for the earth shattering physics that is involved in stepping off the escalator onto non-moving ground as if you're an infant who is learning to walk again.";
	r_text[ 8] = "WHEN TRAVELING TO OR FROM DCA, PLEASE ENSURE THAT YOU PLACE YOUR GIANT PIECE OF LUGGAGE IN THE CENTER OF THE ESCALATOR BLOCKING ALL TRAFFIC.";
	r_text[ 9] = "When stepping off the escalator, at the top or bottom, please stop in your tracks to look around. Oh, don't worry. We'll shut off the escalator behind you to prevent the 100 PEOPLE FROM ALL PILING TOGETHER WHILE YOU TAKE YOUR TIME MAKING UP YOUR MIND WHERE TO GO.";
	r_text[ 10] = "DC escalators = politics: Left = move forward, Right = obstruct path, Middle = no one likes a centrist make up your damn mind";
	r_text[ 11] = "If escalators are busy, feel free to slide down the metal ramp in the middle. Those little round rivets won't hurt a bit.";
	r_text[ 12] = "The Smart Trip cards are just that: smart. You don't have to wait until the gate closes behind the person in front of you for the turnstyle to read your card. Touch your card. When your balance displays, GO! Keep it moving people! We have to hurry to get on our train so we can quickly single track to our destination while get thrown into a hand rail because metro hasn't turned on the automatic system since the June 2009 crash and all metro drivers love their brake pedals.";
	r_text[ 13] = "When traveling on the Metro with an infant, make sure and ignore the signs on the escalators that say No Strollers. All Metro signs are optional, and especially the ones on the escalators.";	
	r_text[ 14] = "When you are conveying your luggage on the down escalator, make sure and put it in front of you. That way when it topples over because of its immense weight, only the strangers below you will be injured.";
	r_text[ 15] = "If you are a tourist using Metro during rush hour, please be sure to stand at the top or bottom of an escalator with out mouth agape while you make up your mind trying to read the signs. Oh don't worry about us. We'll wait until you're done. No need to MOVE OUT OF THE WAY OR ANYTHING!";
	r_text[ 16] = "When you get off the escalator, tourists/travelers/commuters who carry their lives with them, PLEASE, by all means, leave your rolling suitcase stationary while the rest of you keeps walking because the rest of us have absolutely no problem tripping and landing on it face first while you try to decide where the hell you're going.";
	r_text[ 17] = "Tourists: When you get off a Metro station escalator, make sure to stop and congregate IMMEDIATELY in front of the escalator so people can't disperse down the station platform. This is especially helpful during rush hour. No, no, you don't have to move. Continue to treat our city like an amusement park for your enjoyment.";
	r_text[ 18] ="Lines are different for escalators than for anything else in the civilized world.  If there are twenty people in front of you waiting to get on the escalator, you can feel free to walk all the way to the front of the line and step in front of someone who waited in line.  Moving to the back of the line doesn't apply to you.";
	r_text[ 19] ="Tourists, let your children walk on the escalators like a treadmill or stairmaster while people are trying to use them.  We didn't get a reputation as one of the fittest cities in the country by just sitting around on the platform doing crossword puzzles. You should try to blend in while you're here.";
	r_text[ 20] = "Tourists: when you get off the escalator, be sure to pause for a minute with your group to make sure that everyone has their Metro cards. Everyone behind you with their cards already accessible will wait patiently.";
	r_text[ 21] = "If you have a small child in a stroller, go ahead and use the escalators. A thing with wheels precariously balanced on a moving, downward incline is totally a safe place for a baby. Searching for the elevator a half a block away would not be worth the trouble. And then glare at every person passing to your left.";
	r_text[ 22] = "When it's raining, make sure you close your umbrella as fast as you can on the escalator so that you A) stab both the person in front and the person behind you and B) you give the same people a nice shower. They needed one anyways.";
	r_text[ 23] = "Remember that when you have your headphones on, you have the permission to be completely oblivious to everyone and everything around you.  As long as you have a song that you like playing, the rest of us trying to get around you don't exist.";
	r_text[ 24] = "Remember that if you are a tourist group of more than 10, you are allowed to walk two-by-two no matter how much that inconveniences the people around you, including on escalators.  Don't worry about us who are trying to get past; the conversation you're having about the weather is way more important than us.";
	r_text[ 25] = "If you are standing in the middle of the escalator all the way down to the platform and you suddenly feel a rush of people behind you, just look around in confusion but make sure to not notice the train on the platform with open doors that all of the people behind you are trying to get to.";
	
	
	



	document.getElementById('bigtext').innerHTML = r_text[index];
	
	document.getElementById('bigindex').href = "http://www.howtouseanescalatorindc.com/index.html?p=" + index;
}
 
function loadText()
{
	var index = gup("p");
	
	if( index == "" )
	{
		changeText();
	}
	else
	{
		var num = parseInt(index);
		if( num < 26 )
		{
			setTextValueByIndex(num);
		}
		else
		{
			changeText();
		} 
	}
}
 
function changeText()
{
	var i = Math.floor(26*Math.random());
	setTextValueByIndex(i);
}
