function VideosGoTo(id) {
	var oVideo = document.getElementById('oVideo');
	var oCurrent = document.getElementById('oCurrentText');
	if(vidTypeArray[id] == 'YOUTUBE') {
		oVideo.innerHTML = '<object width="560" height="345"><param name="movie" value="http://www.youtube.com/v/' + vidArray[id] + '&hl=en&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/' + vidArray[id] + '&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="345"></embed></object>';
	} if(vidTypeArray[id] == 'GOOGLE') {
		oVideo.innerHTML = '<embed style="width: 400px; height: 326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=' + vidArray[id] + '&amp;hl=en" flashvars="">';
	} if(vidTypeArray[id] == 'VIMEO') {
		oVideo.innerHTML = '<object width="400" height="225"><param name="allowfullscreen" value="true" />	<param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + vidArray[id] + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=' + vidArray[id] + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>';
	} if(vidTypeArray[id] == 'DIRECT') {
		oVideo.innerHTML = '<a herf="javscript:;" onclick="window.location=\'' + vidArray[id] + '\'">Download This Video</a>';
	}
	oCurrent.innerHTML = vidNameArray[id];
	Vcounter = id;
	
	VideosUpdateRightNav();
	VideosUpdateLeftNav();
	
}

function VideosPrev() {
	if(Vcounter > 0) {
		var prev = Vcounter - 1;
		VideosGoTo(prev);
	}
}

function VideosNext() {
	if(Vcounter < Vcount) {
		var next = Vcounter + 1;
		VideosGoTo(next);
	}
}

function VideosUpdateLeftNav() {
	if(Vcounter > 0) {
		var prev = Vcounter - 1;
		document.getElementById('oPrevText').innerHTML = '&larr; ' + vidNameArray[prev];
	} else {
		document.getElementById('oPrevText').innerHTML = '&nbsp;';
	}
}

function VideosUpdateRightNav() {
	if(Vcounter < Vcount) {
		var next = Vcounter + 1;
		document.getElementById('oNextText').innerHTML = vidNameArray[next] + ' &rarr;';
	} else {
		document.getElementById('oNextText').innerHTML = '&nbsp;';
	}
}

