function CreatePlayer(File,Obj,Width,Height,PlayerId,control) {
 var film = new SWFObject("jw_player/flvplayer.swf", PlayerId, Width, Height, "7");
 film.addParam('allowscriptaccess','always');
 film.addParam('allowfullscreen','true');
 film.addParam('wmode','transparent');
 film.addParam('flashvars','file='+File+'&skin=jw_player/flvplayer_skin_1.swf&abouttext=TV TAAAKARYBA&aboutlink=http://www.taaakaryba.com.pl&fullscreen=true&autostart=true&repeat=list&shuffle=false&controlbar='+control+'&logo=layout/logo_small.png');
 film.write(Obj);
// shuffle=true - na razie wylaczono
}

function sendEvent(typ,prm,id) { thisMovie(id).sendEvent(typ,prm); };
function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};
var currentItem;
var currentState;
// these functions is called by the JavascriptView object of the player.
function getUpdate(typ,pr1,pr2,swf)
	{
	if(typ == "item") { currentItem = pr1; }
	else if(typ == "state") { currentState = pr1; }
        }

function twin(url,w,h) {
if(window.screen){
 aw=screen.availWidth-15;
 ah=screen.availHeight-15;
}else{
 aw=1024;
 ah=768;
}
 ustawienia=
 "left=" + (aw-w)/2 + ","
 +"top=" + (ah-h)/2 + ","
 +"screenX=" + (aw-w)/2 + ","
 +"screenY=" + (ah-h)/2 + ","
 +"width=" + w + ","
 +"height=" + h + ","
 +"innerWidth=" + w + ","
 +"innerHeight=" + h + ","
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=yes,"
 +"resizable=no"
var okno=window.open(url,"PopUp",ustawienia);
okno.opener = self;
okno.focus();
}
