var flvFilename="video/QUA_Appro_xtremx_noIntel.flv";						//Load the initial flv file to the swf player.
var preview_window='';
var oldflvname='';
window.onload=function(){
	//setTimeout("intialFlashCallFunction('"+flvFilename+"')",3000); 				// Set time to load the swf
}    
function openFalshWindow(){
	var url="video.html#"+flvFilename;
	var clientwindowwidth=542;												// popupwindow width and height
	var clientwindowhieght=305;		
	var leftposition=(document.width-clientwindowwidth)/2;					// Display the pupup at center of the document
	var topposition=(document.height-clientwindowwidth);
	if(isNaN(leftposition))
		leftposition=400;
	if(isNaN(topposition))
		topposition=200;
	if(false == preview_window.closed){ 									// If popup was opened change the url window
		if(flvFilename!=oldflvname){
		preview_window.close();
		this.preview_window=window.open(url,"","status=0,menubar=0,resizable=yes,scrollbars=no,width="+clientwindowwidth+",height="+clientwindowhieght+",top="+topposition+",left="+leftposition+"");
		}else{
			preview_window.location.href=url;
			preview_window.moveTo(leftposition,topposition);
			preview_window.focus();
		}		
	}
	else{
		this.preview_window=window.open(url,"","status=0,menubar=0,resizable=yes,scrollbars=no,width="+clientwindowwidth+",height="+clientwindowhieght+",top="+topposition+",left="+leftposition+"");	
	}	
	oldflvname=flvFilename;
	pausePlayer();
}
function closeChildWindow(){
	if(preview_window!='')   												//Child window object and close the child window
		preview_window.close();	
	else
		preview_window='';	
}
function windowclose(){
	window.close()
}
function playintialVideo(){
		document.getElementById('initailPageImage').style.display='none';
		document.getElementById("approFlashfilevideo").myFunctionId(flvFilename);  
}
function swfIndexFileName(swfName){ 										//Call the flash javascript function
	flvFilename=swfName;
	document.getElementById('initailPageImage').style.display='none';
	document.getElementById("approFlashfilevideo").myFunctionId(swfName);  
}
function pausePlayer(){
	document.getElementById("approFlashfilevideo").myFunctionPause("true");  
}
function intialFlashCallFunction(swfName){
	document.getElementById("approFlashfilevideo").intialCallFunction(swfName);
}
