var videoPath="/bulgari/wireframe_video/";


function openFullScreen(fileVideo,titleVideo){
	
	var fVideo = videoPath + fileVideo;
	
	if( fVideo  == "" || fVideo  == "null"  ) fVideo = null;
	if( titleVideo == "" || titleVideo == "null"  ) titleVideo = " ";
           	var fullVideo =document.getElementById("fullVideo");
           	fullVideo.style.display="block";
			fullVideo.style.left= (getwinWidth()- 942)/2 + "px";
			fullVideo.style.top= ( ( ( (getwinHeight()-110) - 450 )/2 ) + 80 ) + "px" ;
			
           	var flashvars = {
           		server_name : "",					
				indirizzo_video : fVideo,
				showAll : "false",
				title_video : "",
				skinBulgari : "/bulgari/video/SkinBulgari.swf",
				skinBlank : "/bulgari/video/SkinBlank.swf"	
			};
			
           	var params = {};
           	params.quality = 'best';
			params.allowScriptAccess ='always';
			params.allowFullScreen='true';
			params.bgColor ='#000000';
			
			if (swfobject.hasFlashPlayerVersion("9")) { 
				swfobject.embedSWF('/bulgari/video/bulgariPlayer.swf', 'fullflashWrapper', '942', '450', '9.0.0', '', flashvars, params, '');
			}else{
				alert("Attention, to view this content requires Adobe Flash Player version 9 or later.");
				closeFullScreen();
			}
           	
     }

		                
function closeFullScreen(){
	var flashWrapper=document.getElementById("fullflashWrapper");
	var fullVideo =document.getElementById("fullVideo");
	
	if(flashWrapper){
		flashWrapper.height=450;
		flashWrapper.width=942;
		fullVideo.style.position="";
		fullVideo.style.top="";
		fullVideo.style.left="";	
	}
	
   	fullVideo.style.display="none";
   	fullVideo.innerHTML ="<div id=\"fullflashWrapper\"></div>";
 	}

function getwinWidth() {
		var winWidth = window.innerWidth
		|| document.documentElement && document.documentElement.clientWidth
		|| document.body.clientWidth;
		return winWidth;
}
			
function getwinHeight(){
		var winHeight = window.innerHeight
		|| document.documentElement && document.documentElement.clientHeight
		|| document.body.clientHeight;
		return winHeight;
}		
		
function setScaleVideo(go_on){
		var flashWrapper=document.getElementById("fullflashWrapper");
		var flashWrapperfullVideo=document.getElementById("fullVideo");

		if(flashWrapper){
			if(go_on){
				flashWrapper.height=getwinHeight()-110;
				flashWrapper.width=getwinWidth();
				flashWrapperfullVideo.style.position="";
				flashWrapperfullVideo.style.top="80px";
				flashWrapperfullVideo.style.left="0px";
			}else{
				flashWrapper.height=450;
				flashWrapper.width=942;
				flashWrapperfullVideo.style.position="";
				flashWrapperfullVideo.style.top= ( ( ( (getwinHeight()-110) - 450 )/2 ) + 80 ) + "px" ;
				flashWrapperfullVideo.style.left= (getwinWidth()- 942)/2 + "px";
			}
		}
}