
function startVideo(vid, ap, ah, ao, bt, pc){
	if(!swfobject.hasFlashPlayerVersion('10')) 
	{
		document.getElementById('video-player').innerHTML = '<div style="text-align:center; padding-top:135px;" id="alt-content"><p style="margin:0px; padding:6px 10px; color:#ccc; font-size:0.75em;"><a href="http://get.adobe.com/flashplayer" target="_blank"><img src="data/images/get_adobe_flash_player.png" width="158" height="39" alt="Get Flash Player" class="no-border" /></a><br />Please install Flash Player to view this content.</p></div>';	
		return;
	}
	
	var flashWrapper = "video-player"
	var flashVersion = "10.0.0"
	var swfname = "video-player.swf"
	var flashWidth = "580px"
	var flashHeight = "340px"
	//Object to pass variables to flash ------ var flashvars = {varName:"varValue, varName2:varValue2}
	var flashvars = {videoURI:"data/uploads/"+vid,autoPlay:ap,autoHideControls:ah,addPlayOverlay:ao,bufferTime:bt,previewClip:pc}; //};
	var params = {align:"middle",salign:"tl",allowfullscreen:"true"};
	var attributes = {};
	attributes.id = flashWrapper
	swfobject.embedSWF(swfname, "video-player", flashWidth, flashHeight, flashVersion, false, flashvars, params, attributes);
}
var _current=5; //5 at a time
function displayMore(){
	var _html='';
	_current+=5; //5 at a time
	$.ajax({
        type: "GET",
		url: "../../getmorenews.aspx?end="+_current,
		dataType: "xml",
		success: function(xml) {
			$(xml).find('newsItem').each(function(){
				var title = $(this).find('title').text();
				var thedate = $(this).find('thedate').text();
				var body = $(this).find('body').text();
				var pdf = $(this).find('pdf').text();
				_html += "<h4 class='no-top-margin'>"+title+' '+thedate+"</h4><p>"+body+"</p>";
				if (pdf!=""){
					_html += "<p><a href='data/uploads/"+pdf+"' class='arrow-link' target='_blank'>Download PDF</a></p>"
				}
			});
			_html = "<h3 style='background:transparent url(data/images/whats-up-h3.gif) top left no-repeat;'>whats up</h3>"+_html; //add header graphic
			if (_current<parseInt($(xml).find('Available').text()) ){ //show more button
				_html+="<p><a href='javascript:displayMore();' class='arrow-link'>More</a></p>";
			}
			$('#news-left-column').attr('innerHTML',_html);
		}
	});
}