// interface.js

function swvideo(flv, name, dt){
	flowplayer().unload();
	document.getElementById('player').href=flv;
	flowplayer("player", "/z/flowplayer/flowplayer-3.1.3.swf", {plugins:{ controls:{url: '/z/flowplayer/flowplayer.controls-3.1.4.swf', height:30}}});
	
	var info = '<div  class=thumb_date2>'+dt+'</div><div class=archive_thumb_title>'+name+'</div>';
	document.getElementById('videoinfo').innerHTML = info;
	
}
function anyvideo(type, src, name, dt){
	var vContainer = document.getElementById('videoc');
	if(type==1){ // flowplayer
		vContainer.innerHTML="<a href='"+src+"' style='display:block;width:400px;height:250px' id='player'></a>";
		//document.getElementById('player').href=flv;
		flowplayer("player", "/z/flowplayer/flowplayer-3.1.3.swf", {plugins:{ controls:{url: '/z/flowplayer/flowplayer.controls-3.1.4.swf', height:30}}});
	
		// var info = '<div  class=thumb_date2>'+dt+'</div><div class=archive_thumb_title>'+name+'</div>';
		// document.getElementById('videoinfo').innerHTML = info;
		// return;
	} else if(type==2){ //championat
		vContainer.innerHTML='<object width="400" height="250"><param name="movie" value="http://player.championat.net/vplayer.swf"/><param name="flashvars" value="id='+src+'&amp;"/><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/><embed src="http://player.championat.net/vplayer.swf" flashvars="id='+src+'&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="250"/></object>';
	} else if(type==3){ //youtube
		vContainer.innerHTML='<iframe width="400" height="250" src="'+src+'" frameborder="0" allowfullscreen></iframe>';
	}
	var info = '<div  class=thumb_date2>'+dt+'</div><div class=archive_thumb_title>'+name+'</div>';
	document.getElementById('videoinfo').innerHTML = info;
	
}

function bigvideo(type, src, name, dt){
	var vContainer = document.getElementById('videoc');
	if(type==1){ // flowplayer
		vContainer.innerHTML="<a href='"+src+"' style='display:block;width:620px;height:390px' id='player'></a>";
		//document.getElementById('player').href=flv;
		flowplayer("player", "/z/flowplayer/flowplayer-3.1.3.swf", {plugins:{ controls:{url: '/z/flowplayer/flowplayer.controls-3.1.4.swf', height:30}}});
	
		// var info = '<div  class=thumb_date2>'+dt+'</div><div class=archive_thumb_title>'+name+'</div>';
		// document.getElementById('videoinfo').innerHTML = info;
		// return;
	} else if(type==2){ //championat
		vContainer.innerHTML='<object width="620" height="390"><param name="movie" value="http://player.championat.net/vplayer.swf"/><param name="flashvars" value="id='+src+'&amp;"/><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/><embed src="http://player.championat.net/vplayer.swf" flashvars="id='+src+'&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="620" height="390"/></object>';
	} else if(type==3){ //youtube
		vContainer.innerHTML='<iframe width="620" height="390" src="'+src+'" frameborder="0" allowfullscreen></iframe>';
	}
	var info = '<div  class=thumb_date2>'+dt+'</div><div class=archive_thumb_title>'+name+'</div>';
	document.getElementById('videoinfo').innerHTML = info;
	
}

function switch_context(player){
		//var elem = document.getElementByID("photo"+player);
		if(document.getElementById("photo"+player).style.display=="none"){
			str="<iframe id='iframe"+player+"' src='/content/teams/player_"+player+".html' width=100% FRAMEBORDER=NO MARGINHEIGHT=0 MARGINWIDTH=0 BORDER=0 FRAMESPACING=0 VSPACE=0 HSPACE=0 SCROLLING=NO height=105></iframe>";
			document.getElementById("photo"+player).innerHTML = str;
			document.getElementById("photo"+player).style.display="block";
			
		}
		else{
			document.getElementById("photo"+player).style.display="none"
		}
	}

