function loadSWF(fileflv,filexml,filehd,fileyt) {
var now = new Date();var minutes = now.getMinutes();var seconds = now.getSeconds(); 
var divmovie = 'flashdiv'; 
var fileMediaLink = '';
 
// if (filexml == '') 

if(fileflv != '') {fileMediaLink="http://web.onsi.tv/video."+fileflv+'.flv?'+minutes+seconds; }
if(filehd != '' && typeof(filehd) != "undefined") {fileMediaLink2="http://web.onsi.tv/video."+filehd+'.mp4?'+minutes+seconds; } else { fileMediaLink2="";}
if(fileyt != '' && typeof(fileyt) != "undefined") {fileMediaLink="http://www.youtube.com/watch?v="+fileyt+'&fmt=22'; fileMediaLink2="http://www.youtube.com/watch?v="+fileyt+'&fmt=34';} else { fileMediaLink2="";}
 
 //  alert("=="+fileMediaLink+"=="); alert("=="+fileMediaLink2+"==");

 var flashvars = {MediaLink: fileMediaLink,MediaLink2: fileMediaLink2,MediaLinkList:filexml,playOnStart:"true",startVolume:"0",autoHideOther:"false",autoHideVideoControls: "false",onStartShowControls: "true",fullVideoScale: "true",showPlayButton: "true",script_path:"scripts/share.php",showSubtitle:"true",subtitle1_path:filexml,htmlpath:location.href};
// var params = {menu: "true",allowFullScreen:"true",allowScriptAccess:"allways"};
 var params = {allowFullScreen:"true"};
 var attributes = { }; 
 swfobject.embedSWF('onsi-player.swf?'+'ol'+minutes+seconds, divmovie, "650", "456", "9.0.0","expressInstall.swf", flashvars, params, attributes);  
}



function slownik_loadSWF(fileflv,filexml) {
var now = new Date();var minutes = now.getMinutes();var seconds = now.getSeconds(); 
var divmovie = 'flashdiv'; 
var fileMediaLink = '';
if(fileflv != '') {fileMediaLink="http://web.onsi.tv/slownik."+fileflv+'.flv?'+minutes+seconds; }
 var flashvars = {MediaLink: fileMediaLink,MediaLinkList:filexml, playOnStart:"true",startVolume:"0",autoHideOther:"false",autoHideVideoControls: "false",onStartShowControls: "true",fullVideoScale: "true",showPlayButton: "true",script_path:"scripts/share.php",showSubtitle:"true",subtitle1_path:"xml/subtitle1.xml",htmlpath:location.href};
// var params = {   menu: "true", allowFullScreen:"true",allowScriptAccess:"allways",bgcolor:"#000000",wmode:"window"}; 
 var params = {allowFullScreen:"true",allowScriptAccess:"sameDomain",bgcolor:"#000000",wmode:"window"}; 
 var attributes = { bgcolor:"#000000"}; 
 swfobject.embedSWF('onsi-player.swf?'+'ol'+minutes+seconds, divmovie, "650", "456", "9.0.0","expressInstall.swf", flashvars, params, attributes);  
}
function nastepne_video(id){ if(id == '') nastepne(); else nastepne2(id);}
function nastepne2(vid) {
var nr = videos_ids[vid];
var tytul = videos_tytul[vid];
var opis = videos_opis[vid];
var e = document.getElementById(vid);
if (last_id > 0) {document.getElementById(last_id).className = 'navi_img_normal';}
e.className='navi_img_active';
last_id = e.id;
var przesuniecie = nr  * ramka;
Scroll(0, przesuniecie);
document.getElementById('txtbottom').innerHTML = tytul;//+' '+opis;
document.getElementById('tekst1').innerHTML = '<p>'+tytul+'</p> '+opis; 	 
}
function nastepne(st) {
var next_id = '';
for(x in videos_ids){if(next_id == 'xx') {next_id = x;}if(last_id == x) {next_id = 'xx';}}
var id = next_id;  
var tytul = videos_tytul[next_id];
var opis = videos_opis[next_id];
var e = document.getElementById(next_id);
fopen(e,id,tytul,opis);
}
function fopen(e,id,tytul,opis) {
	if(e == null) {return false;}
	if (last_id > 0) {document.getElementById(last_id).className = 'navi_img_normal';}
	e.className='navi_img_active';
 	last_id = e.id;
	//Scroll(  ((last_id - 4) * ramka),0);
    pozycja = document.body.scrollLeft;
	document.getElementById('txtbottom').innerHTML = tytul;//+' '+opis;
	document.getElementById('tekst1').innerHTML = '<p>'+tytul+'</p> '+opis; 
    loadSWF(id);
}
function Scroll(dis,pos){
 var obj=document.getElementById('naviscroll');
 obj.scrollLeft=obj.scrollLeft+dis;
 if (pos){obj.scrollLeft=pos; }
 else {zxcTO=setTimeout( function(){ Scroll(dis); },10); }
}
function highlight(Info) {  document.getElementById('txtbottom').innerHTML = Info; }                                                                     
function normalizex() {  var t = document.getElementById('txtbottom').innerHTML+' - <i>'; if(t == ' - <i></i>') t=''; document.getElementById('txtbottom').innerHTML = t;} 




