// theatre.js
// Prime Minister's Theatre scripts v1.00.01; 11/28/09; last: 5/17/10; (C) 2009, 2010 Dimbee
// v1.00.01 5/17/10: Added Swagger Dubya video.
// v1.00.00 11/28/09: Initial Version.

document.write("<script src='bars.js' type='text/javascript'></script>"); //call bars.js

var video = [];
var i=0;

var vCONSTS={name:0,date:1,id:2,width:3,height:4,tn:5,info:6,numattribs:7}
// Fill array as so: video[video]=[NAME, DATE, VIDID, WIDTH, HEIGHT, THUMB, INFO];

video[i++]=["Andyville iMPACT Zone Tard: Gang Signs", "6/8/2008", "8G73Z0Eggc8", 660, 525, "http://i1.ytimg.com/vi/8G73Z0Eggc8/default.jpg", "An iMPACT Zone Tard sighting. This Tard is dubbed 'Gang Signs.'"];

video[i++]=["TNA tARDPACT", "8/13/2008", "nVhXD1Twx38", 660, 525, "http://i3.ytimg.com/vi/nVhXD1Twx38/default.jpg", "How many Tards can you find at the beginning of an episode of iMPACT? Ninja Andy is going to find out."];

video[i++]=["Making a Ninja Panda Disappear by Psychic Ninja Magic", "8/28/2008", "i6BOmfDC4Lk", 660, 525, "http://i2.ytimg.com/vi/i6BOmfDC4Lk/default.jpg", "Parody of T. Chase's <a href='http://www.youtube.com/watch?v=cE6duGS2Grk'>'Making a cloud disappear by psychic telekinesis ESP Power' video</a>. Ninja Andy attempts to make himself disappear using similar tricks to those employed by T. Chase."];

video[i++]=["Batista is the Women's Champion", "10/8/2008", "zHZAs4zH2xg", 660, 525, "http://i3.ytimg.com/vi/zHZAs4zH2xg/default.jpg", "Hey, Cole said it, not me!"];

video[i++]=["Slap Chop Poop: Vince with Slapnuts!", "1/4/2009", "hv5QUOQv6u0", 660, 525, "http://i1.ytimg.com/vi/hv5QUOQv6u0/default.jpg", "Vince with Slapnuts. Get rid of your worries by slapping Vince's nuts. You know you love 'em!"];

video[i++]=["iMPACT Zone Evolution", "1/11/2009", "WAeBY8VAOLE", 660, 525, "http://i4.ytimg.com/vi/WAeBY8VAOLE/default.jpg", "Garrison explains how evolution works, with the help of iMPACT Zone Tards as visual aids. Much like TNA booking, this may cause you to run screaming from the room."];

video[i++]=["Stephanie McMahon, Triple H's Husband", "2/24/2009", "U5yoRj-e6AU", 660, 525, "http://i2.ytimg.com/vi/U5yoRj-e6AU/default.jpg", "More Michael Cole brilliance..."];

video[i++]=["YouTube Poop: Vince gets a job at Quiznos", "7/3/2009", "HYtqQb5aetQ", 660, 525, "http://i1.ytimg.com/vi/HYtqQb5aetQ/default.jpg", "Vince + Quiznos Oven = Poor Scott"];

video[i++]=["Mario's Bad Trip", "7/7/2009", "xu2wqVmiesA", 660, 525, "http://i1.ytimg.com/vi/xu2wqVmiesA/default.jpg", "Not every mushroom is a winner."];

video[i++]=["Dave and Rey: A Love Story", "11/4/2009", "H3IdTYXpGVE", 660, 525, "http://i1.ytimg.com/vi/H3IdTYXpGVE/default.jpg", "It brings a tear to my eye..."];

video[i++]=["Matt Hardy Texting", "11/9/2009", "OUeazmZUgwk", 840, 505, "http://i4.ytimg.com/vi/OUeazmZUgwk/default.jpg", "Matt sends a simple text message and learns a valuable lesson."];

video[i++]=["Jack Swagger Did You Know: Meeting George W. Bush ", "5/17/2010", "X96524nQjPQ", 840, 505, "http://i1.ytimg.com/vi/X96524nQjPQ/default.jpg", "Jack reminisces about meeting Dubya."];

var NUMVIDS=i;

function vidSelBox(vidNum){
	var temp="<table><tr><td colspan=2 valign='top'><a href='#vidDisplay' onClick='spawnVid("
	temp+=vidNum;
	temp+=")'><b><font size=4>";	
	temp+=video[vidNum][vCONSTS.name];
	temp+="</font></b></a></td></tr><tr><td rowspan=2 valign='top'><a href='#vidDisplay' onClick='spawnVid("
	temp+=vidNum;
	temp+=")'><img src='";
	temp+=video[vidNum][vCONSTS.tn];
	temp+="' border=0></td><td valign='top' height=20><font size=4><i>";	
	temp+=video[vidNum][vCONSTS.date];
	temp+="</i></font></td></tr><tr><td valign='top'><font size=4>";
	temp+=video[vidNum][vCONSTS.info];
	temp+="</font></td></tr></table>";
	
	return temp;
}

function vidSelTable(){
	var temp="<table border=1 cellspacing=0 cellpaddinging=0 width='99%'>";
	for(i=0; i<NUMVIDS; i++){
		if(i==0)
			temp+="<tr><td valign='top' width='33%'>";
		else if(i%3)
			temp+="</td><td valign='top' width='33%'>";
		else
			temp+="</td></tr><tr><td valign='top' width='33%'>";
		temp+=vidSelBox(i);
	}
	temp+="</td></tr></table>";
	
	document.write(temp);
}

function spawnVid(vidNum){
	var temp="<a name='vidDisplay'>";
	temp+="<img id='curtain-background' src='images/curtains.jpg' height=750 alt='' title=''><div id='vid' style='padding-top: 25px'>";
	temp+="<table width='100%' style='position:relative; top:2px;'><tr><td align='center'><font size=4><object width='"
	temp+=video[vidNum][vCONSTS.width];
	temp+="' height='"
	temp+=video[vidNum][vCONSTS.height];
	temp+="'><param name='movie' value='http://www.youtube.com/v/";
	temp+=video[vidNum][vCONSTS.id];
	temp+="&hl=en_US&fs=1&rel=0&color1=0x5d1719&color2=0xcd311b&border=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/";
	temp+=video[vidNum][vCONSTS.id];
	temp+="&hl=en_US&fs=1&rel=0&color1=0x5d1719&color2=0xcd311b&border=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='";
	temp+=video[vidNum][vCONSTS.width];
	temp+="' height='";
	temp+=video[vidNum][vCONSTS.height];
	temp+="'></embed></object></font></td></tr></table></div>";
	
	var anotherH1=document.getElementById("vidDisplay");
	anotherH1.innerHTML=temp;
}