<!--
var isWin = false;
var isIE = false;
var isWMP_GET6 = false;
var isWMP_GET7 = false;
var netAPI = false;

var WMP6_Obj = '';
	WMP6_Obj += '<object id=MPlayer ';
	WMP6_Obj += 'classid=clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95 ';
	WMP6_Obj += 'codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 ';
	WMP6_Obj += 'standby="Loading Microsoft Windows Media Player components..." ';
	var newHeight = wmHeight + 30;
	WMP6_Obj += 'type="application/x-oleobject" width="418" height="300">';
	WMP6_Obj += ' <param name="FileName" value="'+fileSrc+'" />';
	WMP6_Obj += ' <param name="enableContextMenu" value="false" />';
	WMP6_Obj += ' <param name="DisplaySize" value="0" />';
	WMP6_Obj += ' <param name="ShowStatusBar" value="1" />';
	if(autostart == true){
		WMP6_Obj += ' <param name="AutoStart" value="true" />';
	} else {
		WMP6_Obj += ' <param name="AutoStart" value="false" />';
	}
	WMP6_Obj += ' <param name="ShowControls" value="1" />';
	WMP6_Obj += ' <param name="autoRewind" value="true" /> ';
	WMP6_Obj += '</object>';

var WMP7_Obj = '';
	WMP7_Obj += '<object id=MPlayer ';
	WMP7_Obj += ' classid=clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6';
	WMP7_Obj += ' standby="Loading Microsoft Windows Media Player components..."';
	WMP7_Obj += ' type="application/x-oleobject" width="418" height="300">';
	WMP7_Obj += '  <param name="url" value="'+fileSrc+'" />';
	WMP7_Obj += '  <param name="enableContextMenu" value="false" />';
	WMP6_Obj += ' <param name="ShowStatusBar" value="1" />';
	if(autostart == true){
		WMP7_Obj += '  <param name="AutoStart" value="true" />';
	} else {
		WMP7_Obj += '  <param name="AutoStart" value="false" />';
	}
	WMP7_Obj += '  <param name="ShowControls" value="1" />';
	WMP7_Obj += '  <param name="uiMode" value="mini" />';
	WMP7_Obj += '  <param name="autoRewind" value="true" /> ';
	WMP7_Obj += ' <param name="DisplaySize" value="0" />';
	WMP7_Obj += '</object>';
	
var WMP_Emb = '';
	WMP_Emb += '<object classid=clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95 codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 type="application/x-oleobject" id="MPlayer" height="338" width="445">';
	if(autostart == true){
		WMP_Emb += '  <param name="AutoStart" value="true" />';
	} else {
		WMP_Emb += '  <param name="AutoStart" value="false" />';
	}
	WMP_Emb += ' <param name="DisplaySize" value="0">';
	WMP_Emb += ' <param name="EnableContextMenu" value="0">';
	WMP_Emb += ' <param name="EnablePositionControls" value="0">';
	WMP_Emb += ' <param name="EnableFullScreenControls" value="0">';
	WMP_Emb += ' <param name="EnableTracker" value="1">';
	WMP_Emb += ' <param name="Filename" value="'+fileSrc+'"';
	WMP_Emb += ' <param name="URL" value="'+fileSrc+'"';
	WMP_Emb += ' <param name="src" value="'+fileSrc+'"';
	WMP_Emb += ' <param name="Rate" value="1">';
	WMP_Emb += ' <param name="ShowCaptioning" value="0">';
	WMP_Emb += ' <param name="ShowControls" value="1">';
	WMP_Emb += ' <param name="ShowAudioControls" value="1">';
	WMP_Emb += ' <param name="ShowDisplay" value="0">';
	WMP_Emb += ' <param name="ShowGotoBar" value="0">';
	WMP_Emb += ' <param value="true" name="allowfullscreen">';
	WMP_Emb += ' <param name="ShowPositionControls" value="1">';
	WMP_Emb += ' <param name="ShowStatusBar" value="1">';
	WMP_Emb += ' <param name="ShowTracker" value="1">';
	WMP_Emb += ' <param name="Volume" value="50">';
	WMP_Emb += ' <embed type="application/x-mplayer2"';
	WMP_Emb += ' pluginspage="http://www.microsoft.com/windows/windowsmedia/"';
	WMP_Emb += ' filename="'+fileSrc+'"';
	WMP_Emb += ' src="'+fileSrc+'"';
	WMP_Emb += ' name=MPlayer';
	WMP_Emb += ' enableContextMenu=0';
	WMP_Emb += ' showcontrols=1';
	WMP_Emb += ' autorewind=1';
	WMP_Emb += ' allowfullscreen=true';
	if(autostart == true){
		WMP_Emb += ' autostart=1';
	} else {
		WMP_Emb += ' autostart=0';
	}
	WMP_Emb += ' displaysize=0';
	WMP_Emb += ' showstatusbar=1';
	WMP_Emb += ' width=418';
	WMP_Emb += ' height=305>';
	WMP_Emb += '</embed>';
	WMP_Emb += '</object>';

// Reklama flash
function getFlashString(swfUrl, id, width, height, wMode, flashVars, destId ) {
	 WP.flash.embed(swfUrl, width, height, flashVars, {wmode:''+wMode, quality:'high', allowscriptaccess:"always", allowfullscreen:"true"}, id, destId);
	
}

var uAgt = navigator.userAgent.toLowerCase();
isIE = (uAgt.indexOf("msie") != -1) && (uAgt.indexOf("opera") == -1 && (navigator.appName.indexOf("Microsoft Internet Explorer") != -1));
isWin = navigator.platform.indexOf("Win") != -1;
var pWMP = (navigator.mimeTypes && navigator.mimeTypes["application/x-mplayer2"]) ? navigator.mimeTypes["application/x-mplayer2"].enabledPlugin : 0;
if (pWMP) {
	isWMP_GET6 = true;
}


function setPlayerMode(height) {
	document.getElementById('vpFilm').style.height = height + 'px';
	document.getElementById('vpFilm').style.overflow = 'visible';
	document.getElementById('vpWM').style.display = '';
}


// Wstawienie player'a WMV
function addWMVPlayer() {
	if(isWin && isIE){
		if(isWMP_GET7){
			setPlayerMode(wmHeight);
			document.getElementById('vpFilm').innerHTML = WMP7_Obj;
		} else {
			setPlayerMode(wmHeight+30);
			document.getElementById('vpFilm').innerHTML = WMP6_Obj;
		}
	} else if(isWMP_GET6) {
		setPlayerMode(wmHeight);
		setTimeout("document.getElementById('vpFilm').innerHTML = WMP_Emb;", 500);
	} else {
		setPlayerMode(wmHeight);
		document.getElementById('vpFilm').innerHTML = getVideoFileTxt;
	}
}

// Wstawienie player'a FLV
function addFLVPlayer() {
	setPlayerMode(flvHeight);
	getFlashString( "player.swf", "flvPlayer", flvWidth, flvHeight, "window", '_bitrateRTMP='+ bitrateRTMP + '&_labelAdv=true&_img='+ imgUrl + '&_autostart=true&_movie='+fileSrc+'&_smooth=true&_volume=1',"vpFilm");
}

// Wybranie rodzaju player'a
function addPlayer() {
	if ('flv' == videoType) {
		addFLVPlayer();
	} else {
		addWMVPlayer();
	}
}

/**
* Reklama FLV
*/
function onAdvPlayerLoaded(bytesTotal){
}

function onAdvPlayerFinished(streamTime){
	document.getElementById('vpFilm').innerHTML='';
	addPlayer();
}


/**
* init
* description: onload called method
*/
function init() {
	// Czy jest Flash [getFlashVersion() - funkcja systemu reklamowego]
	isFLP = ( 8 >= 8 ) ? true : false;
	if(isFLP && isAdv && advPlayerMovieUrl!='') {
		var fVars = "aWidth="+advPlayerWidth+
					"&aHeight="+advPlayerHeight+
					"&aMovieUrl="+advPlayerMovieUrl+
					"&aAutoStart="+advPlayerAutoStart+
					"&aVolume="+advPlayerVolume+
					"&aBgColor="+advPlayerBgColor+
					"&aBgAlpha="+advPlayerBgAlpha+
					"&aClickUrl="+advPlayerClickUrl+
					"&aWindowType="+advPlayerWindowType+
					"&aScaleMode="+advPlayerScaleMode+
					"&aBuffBgColor="+advPlayerBuffBgColor+
					"&aBuffBgAlpha="+advPlayerBuffBgAlpha+
					"&aBuffFontColor="+advPlayerBuffFontColor+
					"&aBuffAlign="+advPlayerBuffAlign;
		
		setPlayerMode(advPlayerHeight);	
		getFlashString( "advFlvPlayer.swf", "advPlayer", advPlayerWidth, advPlayerHeight, "transparent", fVars ,"vpFilm");
	} else {
		addPlayer();
	}
}

init();
-->



