
var currentUrl="file:///D:/workfile/digitalsalad/design/HtmConverted%20v1.8/videos.html";
var currentVideIndex = 0;
var shareUrl = '';


var videoDetailsListArray = [
							/*Index: 0*/ {videoFile:"DS_Showreel.flv", videoHeading:"Digital Salad Showreel 2010", videoDesc:"A compilation of what we do at Digital Salad"},
							/*Index: 1*/ {videoFile:"AFTAThought.flv", videoHeading:"AFTAThought", videoDesc:"Actors from AFTAThought's company provided live action performances, which were then set against a powerful backdrop of dynamic images of industry to illustrate the company's vocation of Bringing Training to Life for both Private and Public industry sectors."},
							/*Index: 2*/ {videoFile:"Mal_Music.flv", videoHeading:"Malmaison", videoDesc:"A film created to reflect the luxurious modern style, cuisine and ambiance of this top Liverpool restaurant."},
							/*Index: 3*/ {videoFile:"Shiverpool.flv", videoHeading:"Shiverpool", videoDesc:"The journey of a nightmare within a nightmare weaves it&#8217;s way through the old mist shrouded Victorian streets of Liverpool&#8218; culminating in a graveyard where fear and dread distorts the senses and sends shivers through flesh and bones, as the Shiverpool tours offer and deliver!"},
							/*Index: 4*/ {videoFile:"LDT.flv", videoHeading:"Learning Disability Team", videoDesc:"One of twenty films for NHS Wirral. The film highlights some of the work this team of three do to help those with learning disabilities&#8218;  and the extraordinary efforts they have made to help learning disability sufferers understand how to cope with the everyday tasks of life that most of us take for granted."},
							/*Index: 5*/ {videoFile:"TheJokersHell.flv", videoHeading:"The Jokers &#8211; Hell To LA", videoDesc:"From Hell to LA is a classic rock performance piece by the band&#8218; intercut with subtle glimpses of the love element that lies within the lyrics. Filmed on the top floor of the World&#8217;s largest brick warehouse in Liverpool&#8218; the building provided all the natural atmospheric elements of light and shadows and a garden growing within it&#8217;s derelict walls."},
							/*Index: 6*/ {videoFile:"ElaineStapleton.flv", videoHeading:"Insight Photography", videoDesc:""},
							/*Index: 7*/ {videoFile:"LCBEnglish.flv", videoHeading:"London Commodity Brokers", videoDesc:"Designed to explain the services of LCB in foreign commodity markets such as those of China and India, the film uses graphic animation (with a touch of humour), and animated photographic images to successfully encapsulate the significance of their business.  This same film has also been translated into Manadarine for use in the commodity markets of China."},
							/*Index: 8*/ {videoFile:"AQP.flv", videoHeading:"A Quiet Place", videoDesc:"The film captures the essence of A Quiet Place and the appeal and value that A Quiet Place brings to both the public and private sector."},
							/*Index: 9*/ {videoFile:"ICUGirl.flv", videoHeading:"Jimmy British and Whisper - ICU Girl", videoDesc:"Jimmy and Whisper give a spirited performance of their new single ICU Girl, set in an electric white bleached out environment with shimmering pole dancers reflecting the 'naughty boy' limericks."},
							/*Index: 10*/ {videoFile:"Lifetimeachievementaward.flv", videoHeading:"Lifetime Achievement Award", videoDesc:""},
							/*Index: 11*/ {videoFile:"HDProductionWorkshop.flv", videoHeading:"The Film Workshops", videoDesc:"The Film Workshops lead by David Lyman, who founded the World famous Maine Photographic & Film Workshops in Rockport, held an HD production workshop in Liverpool in 2009. The film shows both David Lyman and David Castillo, the course instructor, working with and alongside their students."},
							/*Index: 12*/ {videoFile:"LCBChinese.flv", videoHeading:"London Commodity Brokers (Chinese)", videoDesc:"Designed to explain the services of LCB in foreign commodity markets such as those of China and India, the film uses graphic animation (with a touch of humour), and animated photographic images to successfully encapsulate the significance of their business.  This same film has also been translated into Manadarine for use in the commodity markets of China."},
						  /*Index: 13*/ {videoFile:"CanCook.flv", videoHeading:"CanCook Studio", videoDesc:"A short one minute film to promote the state of the art cookery school in Liverpool. The half day shoot took place during a live session - the challenge was to give a generic impression of the school without pointing to any demographic age or style of cooking. The use of split screen meant we could use more material, hold on imagery longer and keep the pace snappy."},
							/*Index: 14*/ {videoFile:"test1.flv", videoHeading:"1_LCB_English (480x270)", videoDesc:"Designed to explain the services of LCB in foreign commodity markets such as those of China and India, the film uses graphic animation (with a touch of humour), and animated photographic images to successfully encapsulate the significance of their business.  This same film has also been translated into Manadarine for use in the commodity markets of China."},
						  /*Index: 15*/ {videoFile:"CanCook_f4v.f4v", videoHeading:"Can Cook F4V", videoDesc:"A short one minute film to promote the state of the art cookery school in Liverpool. The half day shoot took place during a live session - the challenge was to give a generic impression of the school without pointing to any demographic age or style of cooking. The use of split screen meant we could use more material, hold on imagery longer and keep the pace snappy."}

						];

function LoadVideoAndContent(videoIndex)
{
	LoadVideo(videoIndex, 0);
	LoadHTMLContent(videoIndex);
}

function LoadVideo(videoIndex, isDefault)
{
		var playerContent = document.getElementById("playerWrapper");
		var videoFileName = videoDetailsListArray[videoIndex].videoFile;
		playerContent.innerHTML = "<embed src='videos/flashBanner.swf?MOVIELOCATION=" + videoFileName + "&currentUrl=" + 
									currentUrl + "&videoIndex=" + videoIndex + "&FILMINTIAL=" + isDefault + 
									"&loadHTMLContentOnClick=1" +
									"' id='flashMediaPlayer' quality='high' swLiveConnect='true' allowScriptAccess='always' scale='exactfit' width='480' height='270' name='flashMediaPlayer' " +  
									"wmode='transparent' align='middle' allowscriptaccess='always' type='application/x-shockwave-flash' " + 
									"pluginspage='http://www.macromedia.com/go/getflashplayer' style='background:#191919'></embed>"

}

function LoadVideo(videoIndex, isDefault, loadHTMLOnClick)
{
		if (loadHTMLOnClick == null)
		{
			loadHTMLOnClick = 1;
		}
		var playerContent = document.getElementById("playerWrapper");
		//alert("player content "+playerContent);
		var videoFileName = videoDetailsListArray[videoIndex].videoFile;
		if(playerContent!=null)
		{
		playerContent.innerHTML = "<embed src='videos/flashBanner.swf?MOVIELOCATION=" + videoFileName + "&currentUrl=" + 
									currentUrl + "&videoIndex=" + videoIndex + "&FILMINTIAL=" + isDefault + 
									"&loadHTMLOnClick=" + loadHTMLOnClick +
									"' id='flashMediaPlayer' quality='high' swLiveConnect='true' allowScriptAccess='always' scale='exactfit' width='480' height='270' name='flashMediaPlayer' " +  
									"wmode='transparent' align='middle' allowscriptaccess='always' type='application/x-shockwave-flash' " + 
									"pluginspage='http://www.macromedia.com/go/getflashplayer' style='background:#191919'></embed>"
		}

}

function LoadHTMLContent(videoIndex)
{
		var htmlContent = document.getElementById("homeContent");
		var videoContentHead = videoDetailsListArray[videoIndex].videoHeading;
		var videoContentDesc = videoDetailsListArray[videoIndex].videoDesc;
		htmlContent.innerHTML = "<strong>" + videoContentHead + "</strong> " + "<br />"	 + 	videoContentDesc;
}

function createShareUrl(videoIndex)
{
		shareUrl = currentUrl + "?videoIndex=" + videoIndex;
}

function HidePlayerControls()
{
		var flash = getMovie('flashMediaPlayer');
    flash.SetVariable("isActive", "false");
    
		return false;
}

function ShowPlayerControls()
{
		var flash = getMovie('flashMediaPlayer');
    flash.SetVariable("isActive", "true");
    
		return false;
}


function getMovie(movieName) {
    return document.getElementById(movieName);
    
   
}

function ShowAlert (isActive)
{
		alert(isActive);	
}
