var media={
//*** promenne ***
speed:media=50,ncActiveX:media, step:media=5,hpo_flash:media, hpo_flashver:media=8, height:media=80, file:media, min:media=20, plus:media=2, videoWidth:media=355,reload:media=true,wmode:media='',

//*** detekce verze flashe ***
checkFlash:function(v)
{
	ncFlash=media.ncActiveX=0; var mt=navigator.mimeTypes["application/x-shockwave-flash"], p;
	if (mt&&mt.enabledPlugin)
	{
		p=mt.enabledPlugin.description.toLowerCase();
		if(parseInt(p.substring(p.indexOf("shockwave flash")+15))>=v){return 1;}
		return 0;
	}
	document.write("<script type=\"text/vbscript\">\n On Error Resume Next\n ncFlash=IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash."+v+"\"))\n<\/script>");
	if(ncFlash){media.ncActiveX=1; ncFlash=0; return 1;}
	return 0;
},
//*** fce pro pridani metody objektu ***
addEvent:function(obj,event,fce)	
{
	if(obj.attachEvent){obj.attachEvent("on"+event,fce); }
	else if(obj.addEventListener){obj.addEventListener(event,fce,false);}
},
//*** zmena velikosti reklamy ***
AdResizeIn:function(step,height,speed){
var h=document.getElementById(media.Iname).offsetHeight;
if(h<media.height){ document.getElementById(media.Iname).style.height=(h+media.step)+"px"; setTimeout("media.AdResizeIn("+media.step+","+media.height+","+media.speed+")",speed);}
},
//*** navrat do puvodni velikosti !!! neni funkcni !!! ***
AdResizeOut:function(step,height,speed){
var h=document.getElementById(media.Iname).offsetHeight;
h=h-(media.step+media.plus);
if(h>media.min){ document.getElementById(media.Iname).style.height=h+"px"; setTimeout("media.AdResizeOut("+media.step+","+media.height+","+media.speed+")",speed);}
},
//*** detekce nacteni reklamy ***
AdLoaded:function(obj,method,fce){
media.addEvent(obj,method,fce);
},
//*** vypis iframu s reklamou ***
AdIframe:function(name,src,width,height,styl){
media.Iname=name; media.Isrc=src; media.Iwidth=width; media.Iheight=height; media.Istyl=styl; 
},
//*** nacti novou reklamu ***
AdSizeIn:function(){
var adI=document.getElementById(media.Iname);
if(adI && media.step && media.height && media.speed && document.getElementById && media.reload){
 adI.contentWindow.location.reload(true);
 setTimeout("media.AdResizeIn("+media.step+","+media.height+","+media.speed+")",media.speed);
 }
},
//*** schovej iframe s reklamou ***
AdSizeOut:function(){
if(document.getElementById(media.Iname)&& document.getElementById(media.Iname).style && media.step && media.height &&media.speed){
 setTimeout("media.AdResizeOut("+media.step+","+media.height+","+media.speed+")",media.speed);
 }
},
//*** odstran ramecek v IE ***
flash:function(id, file, width, height, style){
media.Fid=id; media.Fdata=file; media.Fwidth=width; media.Fheight=height; media.Fstyle=style; //media.Fwmode=wmode;
},
//*** zobrazeni iframu s reklamou po nacteni ***
AdIfrLoad:function(){
if(typeof media.Iname!='undefined'){if(document.getElementById(media.Iname)){document.getElementById(media.Iname).style.display="block";}}
},
//*** vypise video s reklamou ***
print:function(){
var n=navigator.platform.toLowerCase(), st="";
if(n.indexOf("win")==-1){st="position:relative";}
if(media.Fid==media.Aid){media.Fdata+=media.Afilealt;}
if(typeof wmode!='undefined'){media.wmode=wmode;}
var Start="<div style='width:"+media.videoWidth+"px;position:relative;'>", End="</div>";
if(typeof media.Fid!='undefined' && typeof media.Fdata!='undefined' && typeof media.Fwidth!='undefined' && typeof media.Fheight!='undefined'){
if(typeof media.paramG!='undefined' && media.paramG.length!=0){for(a=1;a<media.paramG.length;a++){media.Fdata+="&amp;"+media.paramG[a];}}
var FlashVideo='<object id="'+media.Fid+'" name="'+media.Fid+'" type="application/x-shockwave-flash" data="'+media.Fdata+'" style="width:'+media.Fwidth+'px;height:'+media.Fheight+'px;'+media.Fstyle+st+'"><param name="movie" value="'+media.Fdata+'" /><param name="quality" value="high" /><param name="menu" value="false" />'+media.wmode+'<param name="swliveconnect" value="true" /><p><strong>Pro prehrávání animace je nutné nainstalovat <a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" title="Nainstalovat Macromedia Flash">Macromedia Flash Player</a>!</strong></p></object>';
//}else{ var FlashVideo='';}
if(typeof media.Iname!='undefined' && typeof media.Isrc!='undefined' && typeof media.Iwidth!='undefined' && typeof media.Iheight!='undefined' && typeof media.Istyl!='undefined'){ var AdIframe='<iframe name="'+media.Iname+'" id="'+media.Iname+'" src="'+media.Isrc+'" width="'+media.Iwidth+'" height="'+media.Iheight+'" scrolling="no" frameborder="0" style="'+media.Istyl+'" ></iframe>'; }else{var AdIframe='';}
document.write(Start+AdIframe+FlashVideo+End);
}
},
//*** male video ***
flashAlt:function(id,filealt){
media.Aid=id;media.Afilealt=filealt;
},
//*** velikost videa ***
videoSize:function(w,h){
document.getElementById(media.Fid).style.width=w+"px";
document.getElementById(media.Fid).style.height=h+"px";
document.getElementById(media.Iname).style.width=w+"px";
},
//*** hra ***
game:function(){
var url=location.href;
if(url.indexOf("&amp;")!=-1){media.paramG=url.split("&amp;");}else{media.paramG=url.split("&");}
}

};

typeof document.documentElement.style.maxHeight=='undefined'


// fscommand handler
media.hpo_flash=media.checkFlash(media.hpo_flashver);
if (media.hpo_flash&&media.ncActiveX) 
{
      if (navigator.appName && navigator.appName.indexOf("Microsoft")!=-1 && navigator.userAgent.indexOf("Windows")!=-1 && navigator.userAgent.indexOf("Windows 3.1")==-1) 
	{
        document.write('<scr' + 'ipt type="text/vbscript"> \n on error resume next \n Sub videoplayer_FSCommand(ByVal command, ByVal args)\n call videoplayer_DoFSCommand(command, args)\n end sub\n<\/scr' + 'ipt>');
      }
}
// Handle all the the FSCommand messages in a Flash movie
function videoplayer_DoFSCommand(command, args){eval(command);}



