/**
 * Animation Collective Network Banner v1.2: Allows for a custom CSS  stylesheet to be applied - http://www.animationcollective.com
 *
 * AC Network Banner is (c) 2007 Animation Collective and is for company use only.
 *
 * What's New?
 *  V1.2 - Added CSS FN which allows for adding a cutsom stylesheet by specifying it's path
 *  V1.1.1 - Added dontInclude FN
 * V1.1 - Added Show/Url object
 * 
 * Original HTML Source:
	<<!-- Animation Collective Links-->
	<div id="ACNetwork">
		[ 
		<a href="http://www.animationcollective.com" target="_blank">Animation Collective</a> | 
		<a href="http://www.kappamikey.com" target="_blank">Kappa Mikey</a> | 
		<a href="http://www.dancingsushi.com" target="_blank">Dancing Sushi</a> | 
		<a href="http://www.threedelivery.com">Three Delivery</a> | 
		<a href="http://www.ellensacres.com" target="_blank">Ellen's Acres</a> | 
		<a href="http://www.animationcollective.com/podcast.html" target="_blank">Animation Collective PodCasts</a> 
		]
	</div>
	
 */
var shows = new Array ({showName: "Animation Collective", showURL: "http://www.animationcollective.com/"},
					   {showName: "Kappa Mikey", showURL: "http://www.kappamikey.com/"},
					    {showName: "Kappa Mikey on iTunes", showURL: "http://click.linksynergy.com/fs-bin/stat?id=EEJpR/4XZKY&offerid=78941&type=3&subid=0&tmpid=1826&RD_PARM1=http%253A%252F%252Fphobos.apple.com%252FWebObjects%252FMZStore.woa%252Fwa%252FviewTVSeason%253Fi%253D210314957%2526id%253D209995183%2526s%253D143441%2526partnerId%253D30"},
					   {showName: "Thumb Wrestling Federation:TWF", showURL: "http://www.thumbwrestlingfederation.com"},
				       {showName: "Dancing Sushi", showURL: "http://www.dancingsushi.com/"},
				       {showName: "Three Delivery", showURL: "http://www.threedelivery.com"},
					   {showName: "Ellen's Acres", showURL: "http://www.ellensacres.com/"},
					   {showName: "Animation Collective Podcasts", showURL: "http://www.animationcollectivepodcasts.com/"}
						);
var _css;
//FN to exlude a show from being listed
function dontInclude (showToExclude)
{
	//Cycle through the shows Array and remove the Object who's showName matches the value passed
	for (i = 0; i < shows.length; i++)
	{
			if (shows[i].showName == showToExclude)
			{
				show = shows.splice (i,1);
			}
	}
}

//FN to apply custom css
function CSS (path){
   _css = path;
}
//FN to render Banner to page
function acNetworkBannerINIT ()
{
	//Check to see if we want to use a custom stylesheet. 
	//If none is specified then use the default. 
	if (_css == null){
		_css ="http://animationcollective.com/css/acNetworkBanner.css";
	}
	//Add StyleSheet
	document.write ('<link rel="stylesheet" type="text/css" media="screen" href="'+ _css + '"/>');
	//Output Comment
		document.write ('<!-- Animation Collective Links-->')
	//Output DIV tag
		document.write ('<div id="ACNetwork">')
	//Ouput Open Bracket (design)
		document.write ('[')
	//Add Links
		for (i = 0; i < shows.length; i++)
			{
				document.write ('<a href="'+ shows[i].showURL +'" target="_blank">' + shows[i].showName+'</a>')
				// Add divide to each element except the last one 
				if (i < (shows.length-1)){
					document.write (" | ");
				}
			}
	//Output Closing Bracket (design)
		document.write (' ]')
	//Output Closing DIV tag
		document.write ('</div>')
	
}
