var flash;

function loader()
{
  	if(navigator.appName.indexOf("Microsoft") != -1)
  	{
    	flash = window.video_playback;
    	// alert('Microsoft Detected');
  	}
  	else
  	{
    	flash = window.document.video_playback;
    	// alert('Other browser detected');
  	}
}

// All Functions called from Flash to Flex...
/*
// Flash instructs Flex to start preview / playback.
function start_preview()
{
	flash.start_preview_to_flex();
}

// Flash instructs Flex to stop preview / playback.
function stop_preview()
{
	flash.stop_preview_to_flex();
}

// Flash instructs Flex to start interview.
function start_interview(value)
{
	flash.start_interview_to_flex(value);
	// alert('Start Interview - ' + value);
}

// Flash instructs Flex to stop interview.
function stop_interview_to_flex()
{
	flash.stop_interview_to_flex();
	// alert('Stop Interview');
}
*/

// All Functions called from Flex to Flash

function set_id_interviewer_interface(Id)
{
	// alert("Interviewer stream is " + Id);
	flash.set_id_interviewer_interface(Id);
}

function set_id_candidate_interface(Id)
{
	// alert("Candidate stream is " + Id);
	flash.set_id_candidate_interface(Id);
}

function set_consultant_name_interface(name)
{
	flash.set_consultant_name_interface(name);
}

function set_candidate_name_interface(name)
{
	flash.set_candidate_name_interface(name);
}

function commence_playback_interface()
{
	// alert('Commence Playback');
	flash.commence_playback_interface();
}

function stop_playback_interface()
{
	// alert('Stop Playback');
	flash.stop_playback_interface();
}

function commence_interview_interface()
{
	flash.commence_interview_interface();
}

function stop_video_interview_interface()
{
	flash.stop_video_interview_interface();
}
