<!--
document.write  ('<p align="Right">Last update: 03.03.2008 03:03:033</p>');
var xxx=161;var yyy=100/*28*/;var plus=60; var start=0;var ie=0;
//if(chrome!=-1){xxx=300;}
var oh=0;rw=0; tw=0; th=0; kch=0;
  if (chrome!=-1){kch=10;kor2=0}else{kch=32;kor2=0}
//if (chrome!=-1){kch=10}else{kch=32}
try
{
//video0.width=document.body.offsetWidt-35 
//video0.height=390 
}catch(e){};

function resize()
{ 
try
{
 if(!mobile)
 if (wc==-1)
 {
 //chrome is bad document.body.offsetHeight
  try{  if(window.innerHeight){oh=window.innerHeight;}
        else
          {oh=document.body.offsetHeight}
     }   catch(e){oh=document.body.offsetHeight};  
  //oh=100;   
  //if (window.fullscreen==true){oh=oh+300 ;}
  //  oh=f_clientHeight();
//  oh=document.body.clientHeight
//if (oh>=800){oh=800}
try{
  if(!mobile)if(oh>=(screen.height-200)){oh=screen.height-200;}}catch(e){};
  
  if (screen.width<=640){kor=0;kor2=0;}
  if((((document.body.offsetWidth-yyy)*ind)+54)>=(oh-xxx-12))
  {
  tw=(oh-xxx)*(ind2);
  th=oh-xxx+64;
  video0.width=tw-kor;
  video0.height=th-kor2;
  }
  else
  {
  tw= (document.body.offsetWidth-kch);
  th=((document.body.offsetWidth   )*ind)+64;
  video0.width=  tw-kor;
  video0.height= th-kor2;
  }
 }
 else
 {
   //alert(wc)
 }
 //prev.innerHTML=tw+' '+th+' '+document.body.offsetWidth+' '+oh;
}catch(e){};

}
resize();
onresize=resize;
//alert('adsa');

var blink_on       = "yellow"    ;
var blink_off      = "white" ;
var blink_interval = 300     ;

function blink()
{
try{
  var a = document.all.tags("blink");
  if (a.length > 0)
  {
  for (var x = 0; x < a.length; x++)
    {
    if (a[x].style.color == blink_off)
    a[x].style.color = blink_on
    else
    a[x].style.color = blink_off ;
    }
  window.setTimeout("blink()",blink_interval);
  }
}catch(e){};
}
try{blink();}catch(e){};
//try{video0.width=document.body.offsetWidt-35;video0.height=390;}catch(e){};

var er=0; replay=0;
var ie=0;var er=0;
try{if(er==0){prg.innerHTML='Windows Mobile TVs'} ;}catch(e){er=1;};
var h='';h2='';var hlaska='';var state=0;var ers='';var error_count=0;
var maxplay=60;statex=0;
var inz=-1;xxp='';
try{inz=name.indexOf('Z1-')}catch(e){};
var testt=0;errors=0;sstatus='';omez=0;
function play()
{
try
 {
  if(state==10)
  {
    replay=replay+1;
    if((-1==inz)||((1<=inz)&&(replay>=(maxplay))))
    {
      //if(replay<=10)
      {video0.controls.play();if(-1!=inz)if(maxplay<=3600){maxplay=maxplay*2;}else{maxplay=3600;}}
    }
    else
    {
      if(replay<=(maxplay*2)){window.setTimeout("play()",1000);}
      //prg.innerHTML=replay;
    }
  }
  else
  {}
 }catch(e){};
}

function sp()
{try
 {
   if(er==0)
   {
    if(!mobile)omez=((video0.width)/8)-name.length-4;
 // omez=((video0.width/2)*0.08)-10;
    sstatus=video0.status;
    if(!mobile)if (sstatus.length>=omez){sstatus=sstatus.substr(0,omez)+'..';}
    if( mobile)if (sstatus.length>=20){sstatus=sstatus.substr(0,20)+'..';}
         //window.setTimeout("sp()",1000);
     if(error_count>=1)
       {ers=' <sup>(stream is down)</sup> '}
     else
       {ers=' '}
     if (sstatus=='..'){h=' <b>'+name+'</b>'}
     else
     if(replay==0)
     {  
     h=sstatus+ers+' <b>'+name+'</b>' ;
     if(!mobile)h=h+' ('+state+':'+errors+')'
     }
     else
     {  
     h=sstatus+ers+' '+name+' ('+replay+':'+maxplay+')' ;
     }
     
//alert(h.indexOf('undefined'));
 if(h.indexOf('undefined')>=0){prg.innerHTML=name; return }
 if(h2!=h){prg.innerHTML=h;h2=h;if(state==3){replay=0;};}

 if(-1==h.indexOf('undefined'))
 {  
    if (testt>=600){testt=0;if(errors>=2){errors=errors-1;}}
    
    if((state==6)||(0==h.indexOf('Connecting')))
    {
      window.setTimeout("sp()",1000);
      errors=0;
      sstatus='';
    }
    else
    {
      if((state==10)&&(replay==0)){window.setTimeout("Play()",200);}
      else
      {
        window.setTimeout("sp()",2000);
      }
      try
      {
       if (!mobile)  {
       if (chrome>=1){
       if (errors<=10)
       {
        if (sstatus.indexOf('ipraven')>=0){errors=errors+1;window.setTimeout("Play()",200);}
        if (sstatus=='Ready'             ){errors=errors+1;window.setTimeout("Play()",200);}
     //if (sstatus=='Stopped'           ){errors=errors+1;window.setTimeout("Play()",200);}
       }}}
      //if (video0.status=='Zastaveno'){window.setTimeout("Play()",200);}
      }catch(e){};

    }
    testt=testt+1;
    if (!mobile)  {
    if(xxp=="':'"){xxp="'':'"}else{xxp="':'"};
    try{next.innerHTML=xxp;}catch(e){};
    }
    else
    {
      //next.innerHTML='M';
    }  
 }
 else
 {
   //if(prg.innerHTML!='')
   //{
   //  prg.innerHTML='...'
   //}
 }
}
else{}
}catch(e){};}

//try{if(er==0)setInterval('sp()',1000);}catch(e){};
sp();

function DecodeString (Url){try{
  Args=new Array();
  var DecodeUrl;
  var PomUrl, PomArgs, PomArg;
  Url = Url.toString();
  DecodeUrl = Url.split ('?');
  if (DecodeUrl.length>1 && DecodeUrl[1].length>0){
    PomUrl = DecodeUrl[1];
      PomArgs = PomUrl.split ('&');
    for (var i=0; i<PomArgs.length; i++){
        PomArg = PomArgs[i].split('=');
      Args[i] = unescape(PomArg[1]);
    }
  }
  return (Args);
}catch(e){alert(e.message)};}



function ClipPlayState(NewState)
{
  state=NewState;
  //statex=NewState;
  //alert('aha');
  sp();
}

function errorp(){try{
error_count=error_count+1;
if (wc==-1) 
{
  var xxxx = DecodeString (document.location);
  if (xxxx.length >= 1){if(xxxx[1]='true'){window.location=xxxx[0];}}
}
}catch(e){alert(e.message)};}

function stop(){try{video0.controls.stop();video0.close();}catch(e){};}
//try{document.getElementById('video0').url=asx;video0.autostart=true;}catch(e){};
var iev='appVersion:'+navigator.appVersion+' appName:'+navigator.appName+' platform:'+navigator.platform;
//alert(iev+' xxx');
//presunuto do p var iet=iev.indexOf('MSIE') ;
//alert(iet);
function go(){top.window.location=asx;}

function unload(){
if(mobile){
//try{video0.url='';}catch(e){};
{try{stop();}catch(e){};}
}
else{try{stop();}catch(e){};}}

function Play()
{
if(asx!="")
if(asx!="[asx]")
{
  if ((iet==-1)||(player=='external')){window.setTimeout("go()",1500);}
  else
  if (iet>=0){try{video0.url=asx;video0.autostart=true;}catch(e){};
  }
}
}
Play();
if(asx!="")
{
  //if(jst!=''){document.write(jst);} //disable for www.gb-soft.com
}
//if (play != ""){document.getElementById('video0').url=document.getElementById('baseurl')+play;}
//function errorp(){try{error_count=error_count+1;window.setTimeout("skoc2('"+hct24+"')",1000);}catch(e){alert(e.message)};}
//-->
