// JavaScript Document
function so_clearInnerHTML(obj) {
	while(obj.firstChild) obj.removeChild(obj.firstChild);
}
var lastclick;
var lastcat;
function reset_menu() {
	document.getElementById('sc_ondemand').style.display = 'none';
	document.getElementById('sc_streaming').style.display = 'none';
	document.getElementById('sc_castprod').style.display = 'none';
	document.getElementById('sc_encoding').style.display = 'none';
	document.getElementById('sc_delivery').style.display = 'none';
	document.getElementById('sc_protection').style.display = 'none';
	document.getElementById('sc_usergen').style.display = 'none';
}
function display_menu(cat) {
	if(lastclick==cat){
		reset_menu();
		lastclick = 0;
	}else{
		reset_menu();
		switch(cat)
		{
			case 1:
			document.getElementById('sc_ondemand').style.display = 'block';
			break;
			case 2:
			document.getElementById('sc_streaming').style.display = 'block';
			break;
			case 3:
			document.getElementById('sc_castprod').style.display = 'block';
			break;
			case 4:
			document.getElementById('sc_encoding').style.display = 'block';
			break;
			case 5:
			document.getElementById('sc_delivery').style.display = 'block';
			break;
			case 6:
			document.getElementById('sc_protection').style.display = 'block';
			break;
			case 7:
			document.getElementById('sc_usergen').style.display = 'block';
			break;
		}
		lastclick = cat;
	}
}

function reset_blurb(){
	var blurbs = document.getElementById('blurbs');
	if (navigator.appName == "Microsoft Internet Explorer"){
		var blurbcount = blurbs.childNodes.length;
	} else {
		var blurbcount = blurbs.childNodes.length-1;
	}
	var blrbvar;
	if (navigator.appName == "Microsoft Internet Explorer"){
		for (blrbvar=0;blrbvar<blurbcount;blrbvar=blrbvar+1) {
			blurbs.childNodes[blrbvar].style.display = 'none';
		}
	} else {
		for (blrbvar=1;blrbvar<=blurbcount;blrbvar=blrbvar+2) {
			blurbs.childNodes[blrbvar].style.display = 'none';
		}
	}
}

function select_blurb(blrbnum){
	reset_blurb();
	blrbsel = "blurb" + blrbnum;
	document.getElementById(blrbsel).style.display = "block";
}

function select_preview(ctg,prvw){
	var sampleMedia = document.getElementById('sampleMedia');
	var sampleName = document.getElementById('sampleName');
	so_clearInnerHTML(document.getElementById('sampleName'));
	switch(ctg)
	{
		case 1:
		switch(prvw){
				
			case 1:
				sampleName.innerHTML = "Valkyrie in FLV Format";
				sampleMedia.innerHTML = "<embed src='http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf' width='640' height='380' allowscriptaccess='always' allowfullscreen='true' flashvars='showdigits=true&width=640&height=380&file=http://fcdn.arcostream.com/j4n8k6f7/cds/candee2/valkyrie_flv.xml&playlist=over' style='position: relative; left: 5px; top: 10px;' />";
				select_blurb(11);
				break;	
			case 2:
				sampleName.innerHTML = "Antbully in H264 Format";
				sampleMedia.innerHTML = "<embed src='http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf' width='640' height='380' allowscriptaccess='always' allowfullscreen='true' flashvars='showdigits=true&width=640&height=380&file=http://fcdn.arcostream.com/j4n8k6f7/cds/candee2/antbully_h264.xml&playlist=over' style='position: relative; left: 5px; top: 10px;' />";
				select_blurb(12);
				break;			
			case 3:
				sampleName.innerHTML = "Maryland United Way";
				sampleMedia.innerHTML = '<embed src="http://hwcdn.net/j4n8k6f7/cds/jwp/player-licensed.swf" width="520" height="312" allowscriptaccess="always" allowfullscreen="true" flashvars="autostart=true&showdigits=true&width=520&height=312&type=video&deblocking=true&smoothing=true&file=http://htedge.arcostream.com/000459/211.flv" style="position: relative; left: 65px; top: 10px;" />';
				select_blurb(13);
				break;
			case 4:
				sampleName.innerHTML = "MutalArt.com";
				sampleMedia.innerHTML = '<embed src="http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf" width="480" height="360" allowscriptaccess="always" allowfullscreen="true" flashvars="autostart=true&showdigits=true&width=480&height=360&type=video&deblocking=true&smoothing=true&file=http://htedge.arcostream.com/0000EA/mutualart/MA_10.flv" style="position: relative; left: 85px; top: 10px;" />';
				select_blurb(14);  
				break;
		}
		break;
		case 2:
				switch(prvw){
			case 1:
				sampleName.innerHTML = "Starfish TV";
				sampleMedia.innerHTML = '<embed src="http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf" width="600" height="470" allowscriptaccess="always" allowfullscreen="true" flashvars="autostart=true&showdigits=false&file=Starfish.flv&width=600&height=470&deblocking=true&smoothing=true&streamer=rtmp://livelax.fms.edgecastcdn.net/200140"  style="position: relative; left: 30px; top: 10px;" />';
				select_blurb(21);
				break;
			case 2:
				sampleName.innerHTML = "Monterey Bay Aquarium";
				sampleMedia.innerHTML = "<OBJECT ID='MediaPlayer' WIDTH='320' HEIGHT='306' CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'	STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject' style='position: relative; left: 175px; top: 10px;'><PARAM NAME='FileName' VALUE='http://www.montereybayaquarium.org/media/strm/mba_peng.asx'><PARAM name='autostart' VALUE='true'><PARAM name='ShowControls' VALUE='false'><param name='ShowStatusBar' value='false'><PARAM name='ShowDisplay' VALUE='false'><EMBED TYPE='application/x-mplayer2' SRC='http://www.montereybayaquarium.org/media/strm/mba_peng.asx' NAME='MediaPlayer' WIDTH='320' HEIGHT='306' ShowControls='0' ShowStatusBar='0' ShowDisplay='0' autostart='1'> </EMBED></OBJECT>";
				select_blurb(22);
				break;
		}
		break;
		case 3:
				switch(prvw){
			case 1:
				sampleName.innerHTML = "Cuomo-Gingrich Debate at Cooper Union";
				sampleMedia.innerHTML = "<OBJECT ID='MediaPlayer' WIDTH='320' HEIGHT='306' CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'	STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject' style='position: relative; left: 175px; top: 10px;'><PARAM NAME='FileName' VALUE='mms://wms.edgecastcdn.net/000036/arcostream/videos/cooper_union.wmv'><PARAM name='autostart' VALUE='true'><PARAM name='ShowControls' VALUE='false'><param name='ShowStatusBar' value='false'><PARAM name='ShowDisplay' VALUE='false'><EMBED TYPE='application/x-mplayer2' SRC='mms://wms.edgecastcdn.net/000036/arcostream/videos/cooper_union.wmv' NAME='MediaPlayer' WIDTH='320' HEIGHT='306' ShowControls='1' ShowStatusBar='0' ShowDisplay='0' autostart='1'> </EMBED></OBJECT>";
				select_blurb(31);
				break;
		}
		break;
		case 4:
				switch(prvw){
			case 1:
				sampleName.innerHTML = "Valkyrie in H264 Format";
				sampleMedia.innerHTML = "<embed src='http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf' width='640' height='380' allowscriptaccess='always' allowfullscreen='true' flashvars='showdigits=true&width=640&height=380&file=http://fcdn.arcostream.com/j4n8k6f7/cds/candee2/valkyrie_h264.xml&playlist=over' style='position: relative; left: 5px; top: 10px;' />";
				select_blurb(41);
				break;
			case 2:
				sampleName.innerHTML = "Valkyrie in FLV Format";
				sampleMedia.innerHTML = "<embed src='http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf' width='640' height='380' allowscriptaccess='always' allowfullscreen='true' flashvars='showdigits=true&width=640&height=380&file=http://fcdn.arcostream.com/j4n8k6f7/cds/candee2/valkyrie_flv.xml&playlist=over' style='position: relative; left: 5px; top: 10px;' />";
				select_blurb(42);
				break;
			case 3:
				sampleName.innerHTML = "Valkyrie in WMV Format";
				sampleMedia.innerHTML = "<OBJECT id='mediaPlayer' width='640' height='425' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'  style='position: relative; left: 5px; top: 10px;'><param name='src' value='mms://wmsedge.arcostream.com/000036/arcostream/videos/valkyrie/valkyrie_WMV_1280.wmv'><param name='autoStart' value='true'><param name='showControls' value='false'><param name='loop' value='false'><EMBED type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' showcontrols='false' width='640' height='425' src='mms://wmsedge.arcostream.com/000036/arcostream/videos/valkyrie/valkyrie_WMV_1280.wmv' autostart='true' loop='false'></EMBED></OBJECT>";
				select_blurb(43);
				break;
			case 4:
				sampleName.innerHTML = "Antbully in H264 Format";
				sampleMedia.innerHTML = "<embed src='http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf' width='640' height='380' allowscriptaccess='always' allowfullscreen='true' flashvars='showdigits=true&width=640&height=380&file=http://fcdn.arcostream.com/j4n8k6f7/cds/candee2/antbully_h264.xml&playlist=over' style='position: relative; left: 5px; top: 10px;' />";
				select_blurb(44);
				break;
			case 5:
				sampleName.innerHTML = "Antbully in FLV Format";
				sampleMedia.innerHTML = "<embed src='http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf' width='640' height='380' allowscriptaccess='always' allowfullscreen='true' flashvars='showdigits=true&width=640&height=380&file=http://fcdn.arcostream.com/j4n8k6f7/cds/candee2/antbully_flv.xml&playlist=over' style='position: relative; left: 5px; top: 10px;' />";
				select_blurb(45);
				break;
			case 6:
				sampleName.innerHTML = "Antbully in Windows Media Format";
				sampleMedia.innerHTML = "<OBJECT id='mediaPlayer' width='640' height='425' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'  style='position: relative; left: 5px; top: 10px;'><param name='src' value='mms://wms.edgecastcdn.net/000036/arcostream/videos/antbully/antbully_WMV_1280.wmv'><param name='autoStart' value='true'><param name='showControls' value='false'><param name='loop' value='false'><EMBED type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' showcontrols='false' width='640' height='425' src='mms://wms.edgecastcdn.net/000036/arcostream/videos/antbully/antbully_WMV_1280.wmv' autostart='true' loop='false'></EMBED></OBJECT>";
				select_blurb(46);
				break;
		}
		break;
		case 5:
				switch(prvw){
			case 1:
				sampleName.innerHTML = "You need a Bahamavention";
				sampleMedia.innerHTML = "<embed src='http://fcdn.arcostream.com/j4n8k6f7/cds/jwp/player-licensed.swf' width='320' height='260' allowscriptaccess='always' allowfullscreen='true' flashvars='autostart=true&showdigits=true&width=320&height=260&type=video&deblocking=true&smoothing=true&file=http://fcdn.arcostream.com/j4n8k6f7/cds/candee2/bahamavention.flv' style='position: relative; left: 165px; top: 10px;' />";
				select_blurb(51);
				break;
			case 2:
				sampleName.innerHTML = "Candee's Ad Management System";
				sampleMedia.innerHTML = "ArcoStream's Candee Ad Management system allows our users to control in nearly real-time their ad inventory, slots, placements, weighting and more with video ad units, static media units, and interactive Flash units across any website.";
				select_blurb(52);
				break;
		}
		break;
		case 6:
				switch(prvw){
			case 1:
				sampleName.innerHTML = "MD5 Hash and URL Signing";
				sampleMedia.innerHTML = "A shared secret and MD5 hash can successfully build unique URLs to content that include a tunable expiration time. With a few lines of web application code, you will build a URL that's safe from social sharing or deep linking. Requests for content without these specially constructed URLs will be denied, forcing end users to navigate through the website workflow to the page built by your application.<BR /><BR />This is useful for companies who may have content that will go viral, or for photographers that do not want users to deep link their images onto other websites.  Using our content protection system, users can only view your content where you want it to be viewed.  You can set up your own website and your partner websites with shared secrets so that only verified affiliates of yours can syndicate your content.";
				select_blurb(61);
				break;
		}
		break;
		case 7:
				switch(prvw){
			case 1:
				sampleName.innerHTML = "Sundance Channel - What's the Big Idea? Contest";
				sampleMedia.innerHTML = "Sundance Channel turned to ArcoStream to develop a user generated platform for its annual promotion, 'What's the Big Idea Contest' based on Robert Redford's program The Green.  Would be directors and producers uploaded their video shorts that were automatically encoded and posted for editorial control and review. Content that was chosen was posted to the content delivery network.";
				select_blurb(71);
				break;
		}
		break;
	}
}
