var video_data = new Array();
  
//alert(request);

function get_video(id){
	//alert(id);
	asynchPOST("video="+id+"&player=2","./video/video_update.php");
}



function video_swf(flvName,flvTime){
	window.document.videoflash.SetVariable('flvName',flvName);
	window.document.videoflash.SetVariable('flvTime',flvTime);
}


function write_swf(swf_name,flv_name,flv_time){
	str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="100%" height="100%" id="videoflash">';
	str += '<param name="movie" value="'+swf_name+'"/>';
	str += '<param name="quality" value="high"/>';
	str += '<PARAM NAME="bgcolor" VALUE="#4C4C4C">';
	str += '<param name="flashVars" value="flvName='+flv_name+'&flvTime='+flv_time+'">';
	str += '<embed id="vf" src="'+swf_name+'" swliveconnect="true"  flashVars="flvName='+flv_name+'&flvTime='+flv_time+'" quality="high" bgcolor=#4C4C4C scale="exactfit" width="100%" height="100%" name="videoflash" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
	str += '</object>';
	return str;
}

function write_str_run(run_string){
	str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="600" height="30" id="runstring">';
	str += '<param name="movie" value="flash/jsrun.swf"/>';
	str += '<param name="quality" value="high"/>';
	str += '<PARAM NAME="bgcolor" VALUE="#697dc2">';
	str += '<param name="flashVars" value="jsToFlash='+run_string+'">';
	str += '<embed id="runstring" src="flash/jsrun.swf" swliveconnect="true"  flashVars="jsToFlash='+run_string+'" quality="high" bgcolor="#697dc2" scale="exactfit" width="600" height="30" name="runstring" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
	str += '</object>';
	return str;
}

  
  function show_video(swf_name,flv_name,flv_time){
	flash_url = '../flash/';
  	cancel_picture();
  	//tableOb = document.getElementById("frame_t1");
	//mx = (screen.width - 1000)/2;//(tableOb.offsetWidth -  320)/2;
	//my = (screen.height - 340)/2;
	//playOb = document.getElementById("swf_ob");
	playOb = frames["wframe"].document.getElementById("swf_ob");
	playOb.innerHTML = write_swf(flash_url+swf_name,flv_name,flv_time);
	movingDiv.style.left = mx;
	movingDiv.style.top = my;
	movingDiv.style.visibility = 'visible';
	}
	
	function zoom(m){
		//alert(m)
		var videoFrame = document.getElementById("wframe");
		var playOb = frames["wframe"].document.getElementById("swf_ob");
		_xy = get_center(m*movieW,m*movieH);
		mx = _xy[0];
		my = _xy[1];
		movingDiv.style.left = mx;
		movingDiv.style.top = my;
		videoFrame.style.width = m*movieW;
		videoFrame.style.height = m*movieH;
	}