var firsttime=true;function setPlayer(_url,_urltn,_width,_height,_fullwidth,_fullheight)
{firsttime=true;document.getElementById("player").style.width=_width;document.getElementById("player").style.height=_height;if(_url.indexOf(".mp4")!=-1)
{_url="mp4:"+_url;}
flowplayer("player","http://www.telesport.co.il/flowplayer/flowplayer-3.1.1.swf",{onBeforeFullscreen:function()
{if(document.all)
{resize(_width,_height,_fullwidth,_fullheight);return false;}
else
{return true;}},onStart:function()
{if(firsttime)
{firsttime=false;sendRequest(_url);}},playlist:[{url:_urltn},{url:_url,autoPlay:false,autoBuffering:false,scaling:"fit",onStart:function(){this.getControls().fadeIn(3000);}},{url:_urltn}],plugins:{controls:{url:'http://www.telesport.co.il/flowplayer/flowplayer.controls-3.1.1.swf',opacity:0.5,timeColor:'#f47a20',durationColor:'#ffffff',backgroundColor:'#d1d1d1',backgroundGradient:'high',buttonColor:'#a1a1a1',buttonOverColor:'#f47a20',sliderColor:'#6a6a6a',bufferColor:'#9d9d9d',progressColor:'#f47a20',volumeSliderColor:'#9d9d9d',timeBgColor:'#000000',all:false,play:true,volume:true,scrubber:true,time:true,fullscreen:true,mute:false,tooltips:{buttons:false}}}});}
function resize(_width,_height,_fullwidth,_fullheight)
{if(document.getElementById("player"))
{if(document.getElementById("player").style.width==_fullwidth)
{document.getElementById("player").style.width=_width;document.getElementById("player").style.height=_height;document.getElementById("player").style.border="0px solid #000000";}
else
{document.getElementById("player").style.width=_fullwidth;document.getElementById("player").style.height=_fullheight;document.getElementById("player").style.border="3px solid #000000";}}};function sendRequest(url)
{var xmlhttp=new createXMLHttpRequest();if(xmlhttp)
{xmlhttp.open("POST","/flowplayer/videoHandler/VideoHandle.ashx");xmlhttp.setRequestHeader('Content-Type','text/xml');xmlhttp.setRequestHeader('charset','UTF-8');xmlhttp.setRequestHeader('yb','ybtl');var data="<?xml version='1.0' encoding='UTF-8'?>";data+="<root>";data+="<url>"+url+"</url>";data+="</root>";xmlhttp.send(data);}};function createXMLHttpRequest(){try{return new XMLHttpRequest();}catch(e){}
try{return new ActiveXObject("Msxml2.XMLHTTP.7.0");}catch(e){}
try{return new ActiveXObject("Msxml2.XMLHTTP.6.0");}catch(e){}
try{return new ActiveXObject("Msxml2.XMLHTTP.5.0");}catch(e){}
try{return new ActiveXObject("Msxml2.XMLHTTP.4.0");}catch(e){}
try{return new ActiveXObject("Msxml2.XMLHTTP.3.0");}catch(e){}
try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){}
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
alert("XMLHttpRequest not supported");return null;}