
var zScaleRate = 0.5
var intervalRate = 25

var zXscale
var zYscale
var zDiv
var zInTimer
var zOutTimer
var zM2Ctimer
var zM2Otimer
var zHeight
var zWidth
var zOriWidth
var zOriHeight
var zOriTop
var zOriLeft
var zCenterTop
var zCenterLeft
var InTimer;


function initZoom(){
	zDiv = document.getElementById("div_flashFlvMovie")
	zHeight = parseInt(document.body.clientHeight)
	zWidth = parseInt(document.body.clientWidth)	
	zOriWidth = parseInt(zDiv.style.width)
	zOriHeight = parseInt(zDiv.style.height)
	zOriTop = parseInt(zDiv.style.top)
	
	zOriLeft = parseInt(zDiv.style.left)
	zCenterTop = (Math.round(zHeight/2)) - (Math.round(zOriHeight/2))
	zCenterLeft = (Math.round(zWidth/2)) - (Math.round(zOriWidth/2))
	//zDiv.style.top = (zCenterTop + 100) + "px"
	zOriTop = zDiv.style.top
	//zDiv.style.left = (zCenterLeft + 100) + "px"
	zOriLeft = zDiv.style.left
	zXscale = Math.round((zWidth*zScaleRate)/100)
	if(zXscale<1) zXscale=1
	zYscale = Math.round((zHeight*zScaleRate)/100)
	//if(zYscale<1) zYscale=1
	//mvDiv = document.getElementById("mvDiv")
	
	
}

function zoomIn(){
	zDiv = document.getElementById("div_flashFlvMovie")
	//alert(parseInt(zDiv.style.width) + "\n" + window.outerWidth)
	clearInterval(zOutTimer);
	zDiv.style.width = zWidth + "px";
	zDiv.style.height = zHeight + "px";
	zDiv.style.left = "0px";
	zDiv.style.top = "0px";
	
	
	if(parseInt(zDiv.style.width) >= zWidth && parseInt(zDiv.style.height) >= zHeight){

		clearInterval(zInTimer);
		zDiv.style.width = zWidth + "px";
		zDiv.style.height = zHeight + "px";
		zDiv.style.top = "0px";
		zDiv.style.left = "0px";

		var div_skipad = document.getElementById("div_skipad");
		div_skipad.style.top="-18px";	
		div_skipad.style.left="910px";
		
		//var div_playvideo =document.getElementById('div_playvideo');
		//div_playvideo.style.top ="-18px";
		//div_playvideo.style.left="920px";
	}	

}

function zoomOut(){
	//alert("in zo")
	clearInterval(zInTimer);
	zDiv = document.getElementById("div_flashFlvMovie")
	zOriHeight=zOriHeight;
	zDiv.style.width = zOriWidth + "px";
	zDiv.style.height = zOriHeight + "px";
	//alert(zDiv.style.left)
	zDiv.style.left ="0px";
	zDiv.style.top = "0px";
	
	if(parseInt(zDiv.style.width) <= zOriWidth && parseInt(zDiv.style.height) <= zOriHeight){
		//var div_flashFlvMovie =document.getElementById('div_flashFlvMovie');
		var div_mainContainer =document.getElementById('div_mainContainer');
		clearInterval(zOutTimer);
		zDiv.style.width = zOriWidth + "px";
		zDiv.style.height = zOriHeight + "px";
		zDiv.style.top = "90px"
		zDiv.style.left =div_mainContainer.offsetLeft + 80 +"px";
		
		var div_playvideo =document.getElementById('div_playvideo');
		div_playvideo.style.top ="70px";
		
	/*var div_flashFlvMovie =document.getElementById('div_flashFlvMovie');
	var div_mainContainer =document.getElementById('div_mainContainer');
	div_flashFlvMovie.style.left= div_mainContainer.offsetLeft + 80 +"px";*/
	
	}	
}

function zoom(state){
	if(state=="in") zInTimer=setInterval("zoomIn()",intervalRate);//zM2Ctimer=setInterval("move2Center()",intervalRate);
	if(state=="out") zOutTimer=setInterval("zoomOut()",intervalRate);
}



