//Flash callback and content replacement code


function changeBikeContent( bikeId )
{
	if ( 'xr1200' == bikeId )
	{
		$('#xr1200x').hide();
		$('#xr1200').show();
	}
	else if ( 'xr1200x' == bikeId )
	{
		$('#xr1200').hide();
		$('#xr1200x').show();
	}
}

function getFlash() {
	
 	var targetFlash;
	targetFlash = document.getElementById( "flashObject" );
	return targetFlash;

}

function hideContent() {
	$('#theBikeContentInfo').hide();
	$('#designStoryContentInfo').hide();
	$('#racingLineContentInfo').hide();
	$('#galleryContentInfo').hide();
}

function openRacingLine() {
	 
	 hideContent();
	 $("#racingLineContentInfo").show();
	 
	  var targetFlash = getFlash();
	  var flashInfo = targetFlash.openRacingLineVideo();	 
	  
}
	
function closeVideoWindow(){
	//hideContent();
	//$("#theBikeContentInfo").show();
	
}
	
function openTheBike() {
	 
	hideContent();
	$("#theBikeContentInfo").show();
	 	 	 
	  var targetFlash = getFlash();
	
	  var flashInfo = targetFlash.closeVideo();
	 
	  
}	
	
function openDesignStory() {
		
	 hideContent();
	$("#designStoryContentInfo").show();
		
	  var targetFlash = getFlash();
	  var flashInfo = targetFlash.openDesignStory();
}

function openGallery() {
		
	 hideContent();
	$("#galleryContentInfo").show();
		
	  var targetFlash = getFlash();
	  var flashInfo = targetFlash.openGallery();
}