<!--
// Check form for required information
/*function GetTimelineEvents()
        {        
            if(playerState == "Playing"){ 
                //////////////////////////////////////////////////////////   
                //Timer implementation
                if(curSecond < 59){
                    curSecond++;
                }else if(curMinute < 59){
                    curSecond = 0;
                    curMinute++;
                }else if(curHour < 23){
                    curSecond = 0;
                    curMinute = 0;
                    curHour++;    
                }else{
                    curSecond = 0;
                    curMinute = 0;
                    curHour = 0;                
                }                        
                
                currentTime = curHour + ':' + curMinute + ':' + curSecond;                                       
                ///////////////////////////////////////////////////////////
                                
                UpdateOnlineTranslation();                        
            }
            
            window.setTimeout('GetTimelineEvents()', 1000);         
        }
        
         var playerState = "";         
        var curHour = 0;
        var curMinute = 0;
        var curSecond = 0;
                       
        var currentTime = "0:0:0";
                                
        <%=translationTimeCodes%>
    
        function UpdateOnlineTranslation()
        {   
            if(trTimeCodes[currentTime] != null){           
                var translation = document.getElementById("onlineTranslation"); 
                translation.innerHTML = trTimeCodes[currentTime];
            }                       
        }
      
        http://www.octostream.net/show/y/dan.wmv
*/
//detect browser settings for showing and hiding DIVs
isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;


//Change visibility for DIV object
function SwitchDiv(strDivName, bolVisible){
 //identify the element based on browser type
 if (isNS4) {
   objElement = document.layers[strDivName];
 } else if (isIE4) {
   objElement = document.all[strDivName].style;
 } else if (isIE5 || isNS6) {
   objElement = document.getElementById(strDivName).style;
 }

 if(isNS4){
     if(!bolVisible) {
       objElement.visibility ="hidden"
     } else {
       objElement.visibility ="visible"
     }
 }else if(isIE4 || isIE5 || isNS6){
     if(!bolVisible) {
       objElement.visibility = "hidden";

     } else {
       objElement.visibility = "visible";
     }
 }

 return objElement;
}

/////////////////////////////////////////////////////////////////////
//Media player controll functions
/////////////////////////////////////////////////////////////////////
function Start()	
{
    var Player=document.getElementById("Player");
    Player.URL = videoURL;
    Player.controls.play();
}

function Play()
{
    var Player = document.getElementById("Player");   
    Player.controls.play();        
}

function Pause()
{
    var Player = document.getElementById("Player");
    Player.controls.pause();
}

function Stop()
{
    var Player=document.getElementById("Player");
    Player.controls.stop();
}
function Skip()
{
    var Player=document.getElementById("Player");
    Player.controls.next();
}
function Back()
{
    var Player=document.getElementById("Player");
    Player.controls.previous();
}
function GetCurrentPosition()
{
    var Player=document.getElementById("Player");
    
    return (parseInt(Player.controls.currentPosition * 10000000));
}
function FullScreen() 
{
    var Player=document.getElementById("Player");
    if (player.playState==3)
	    player.fullScreen='true';
}

function PlayItem(url)
{        
    var d = new Date();
	var media = document.getElementById("mediaPlayer");
	var videoURL = url;
	videoURL = videoURL + "?" + d.getTime();
	//alert(videoURL); 
	
	mediaContent = "";
	mediaContent += "<object classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' type='application/x-oleobject' width='384' height='320' standby='Loading Microsoft Windows Media Player components...' id='Player'>";
	mediaContent += "<param name='URL' VALUE="+url+">";
	mediaContent += "<param name='AutoStart' VALUE='true'>";
	mediaContent += "<param name='uiMode' VALUE='full'>";
	mediaContent += "<param name='EnableContextMenu' value='false'>";
	mediaContent += "<param name='stretchToFit' value='true'>";
	mediaContent += "<param name='setMode' value='(autoRewind, false)'>";
	mediaContent += "<embed name='Player' src='"+url+"' width='242' height='226' autostart='True' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' filename='"+url+"' showcontrols=1 showstatusbar=1 showdisplay=0 autorewind=0 backgroundcolor='#000000'></embed>";
	mediaContent += "<noembed>Error: No Object or Embed Support</noembed>";
	mediaContent += "</object>";	
	
	media.innerHTML = mediaContent;
	
	if (document.getElementById("Player").controls == null)
	{
	    msg = "To browse this page properly you should install Windows Media ActiveX plugin.<br>";
	    msg += "You can find all reqiured information here: <a href=\"http://forums.mozillazine.org/viewtopic.php?t=206213#InstallAX\">http://forums.mozillazine.org/viewtopic.php?t=206213#InstallAX</a>";
	    media.innerHTML = msg;
	}
}

function TranslationPlayItem(url)
{		
    var d = new Date();
	var media = document.getElementById("translationPlayer");
	var videoURL = url;
	videoURL = videoURL + "?" + d.getTime();
	
	mediaContent = "";
	mediaContent += "<object classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' type='application/x-oleobject' width='160' height='120' standby='Loading Microsoft Windows Media Player components...' id='TrPlayer' viewastext>";
	mediaContent += "<param name='URL' VALUE="+url+">";
	mediaContent += "<param name='AutoStart' VALUE='true'>";
	mediaContent += "<param name='uiMode' VALUE='none'>";
	mediaContent += "<param name='EnableContextMenu' value='false'>";
	mediaContent += "<param name='stretchToFit' value='true'>";
	mediaContent += "<param name='setMode' value='(autoRewind, false)'>";
	mediaContent += "<embed name='Player' src='"+url+"' width='242' height='226' autostart='True' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' filename='"+url+"' showcontrols=1 showstatusbar=1 showdisplay=0 autorewind=0 backgroundcolor='#000000'></embed>";
	mediaContent += "<noembed>Error: No Object or Embed Support</noembed>";
	mediaContent += "</object>";
	
	media.innerHTML = mediaContent;		
}

function TranslationStop()
{
    var Player=document.getElementById("TrPlayer");
    Player.controls.stop();
}

function PlayItemByParams(url, obj_id, player_id, width, height, uimode, cmenu)
{        
	var media = document.getElementById(obj_id);
	
    var d = new Date();
    var videoURL = url;
    
    videoURL = videoURL + "?" + d.getTime();
	
	if (!player_id)  player_id  = "Player";
	
	if (!width)  width  = "384";
	if (!height) height = "320";
	if (!uimode) uimode = "full";
	if (!cmenu)  cmenu  = "false";
	
    mediaContent = "";
    mediaContent += "<object classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' type='application/x-oleobject' width='" + width + "' height='" + height + "' standby='Loading Microsoft Windows Media Player components...' id='" + player_id +"'>";
    mediaContent += "<param name='URL' VALUE='"+url+"'>";
    mediaContent += "<param name='AutoStart' VALUE='true'>";
    mediaContent += "<param name='uiMode' VALUE='" + uimode + "'>";
    mediaContent += "<param name='EnableContextMenu' value='" + cmenu + "'>";
    mediaContent += "<param name='stretchToFit' value='true'>";
    mediaContent += "<param name='setMode' value='(autoRewind, false)'>";
    mediaContent += "<embed name='" + player_id +"' src='" + url + "' width='" + width + "' height='" + height + "' autostart='True' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' filename='"+url+"' showcontrols=1 showstatusbar=1 showdisplay=0 autorewind=0 backgroundcolor='#000000'></embed>";
    mediaContent += "<noembed>Error: No Object or Embed Support</noembed>";
    mediaContent += "</object>";	
						
    media.innerHTML = mediaContent;
	
    if (document.getElementById(player_id).controls == null)
    {
        msg = "To browse this page properly you should install Windows Media ActiveX plugin.<br>";
        msg += "You can find all reqiured information here: <a href=\"http://forums.mozillazine.org/viewtopic.php?t=206213#InstallAX\">http://forums.mozillazine.org/viewtopic.php?t=206213#InstallAX</a>";
        media.innerHTML = msg;
    }
}


/////////////////////////////////////////////////////////////////////
//Silverlight player controll functions
/////////////////////////////////////////////////////////////////////
var slPlayer = null;

function slStart()	
{
	if (slPlayer != null) {
	    slPlayer.sendEvent('LOAD', videoURL);
	    slPlayer.sendEvent('PLAY', 0);
    }
}

function slPlay()
{
	if (slPlayer != null) {
	    slPlayer.sendEvent('PLAY', 0);
    }    
}

function slStop()
{
    if (slPlayer != null) {
        slPlayer.sendEvent('STOP');
    }
}

function slPlayItemByParams(url, obj_id, player_id, width, height, uimode, cmenu) {
	
	var videoURL = (url != '') ? 'http://video.zveza-gns.si/app/' + url : '';
	
	//var videoURL = 'http://formo.si/demo/ASX.aspx?ID=329&Type=MAIN&timestamp=1265626134530';
	
	var params = 'showstatistics=flase, autoplay=true, muted=false, playlistoverlay=true, stretchmode=Fit, stretchmodefullscreen=Fit, mediasource=' + videoURL;
	
	//'showstatistics=true, autoplay=true, muted=false, playlistoverlay=true, theme=themes/Default.xaml, stretchmode=Fit, stretchmodefullscreen=Fit, mediasource=http%3A//products.edgeboss.net/download/products/content/demo/video/wms/moby_hybrid_700k.wmv'
	//'showstatistics=true, autoplay=true, muted=false, playlistoverlay=true, theme=themes/Default.xaml, stretchmode=Fit, stretchmodefullscreen=Fit, mediasource=http%3A//products.edgeboss.net/download/products/content/demo/video/wms/moby_hybrid_700k.wmv';
	
	var tag =
		'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="' + width + '" height="' + height + '" id="slp" >' +
		'\n  <param name="source" value="OVP.xap"/>' +
		'\n  <param name="minRuntimeVersion" value="2.0.30923.0" />' +
		//'\n  <param name="onload" value="onSilverlightLoad" />' +
		'\n  <param name="onerror" value="onSilverlightError" />' +
		'\n  <param name="background" value="black" />' +
		'\n  <param name="MaxFrameRate" value="30" />' +
		'\n  <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">' +
		'\n  <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/></a>' +
		'\n  <param name="initparams" value=' + "'" + params + "' />" +
		'\n  </object>';
	
	$('#' + obj_id).html(tag);
	
	/*
	var d = new Date();   
	var videoURL = url;
	var src = "wmvplayer.xaml";
	var cnt = $('#' + obj_id).get(0);
	
	var cfg = {height:height, width:width, file:videoURL, showstop:'true', autostart:'true'};
	slPlayer = new jeroenwijering.Player(cnt, src, cfg);*/
	/*
	if (slPlayer == null) {
		var cfg = {height:height, width:width, file:videoURL, showstop:'true'};
		slPlayer = new jeroenwijering.Player(cnt, src, cfg);
	} else {
		//var cfg = {height:height, width:width, file:videoURL, showstop:'true', autostart:'true'};
		//slPlayer = new jeroenwijering.Player(cnt, src, cfg);
		//slPlayer.sendEvent('STOP');
		slPlayer.sendEvent('LOAD', videoURL);
		slPlayer.sendEvent('PLAY');
		//slPlayer.addListener('STATE',myFunc);
		//addListeners(videoURL);
	}
	*/
}
/*
function addListeners(url) {
	if (slPlayer != null && slPlayer.view) {
		slPlayer.sendEvent('LOAD', url);
		slPlayer.sendEvent('PLAY');
	} else {
		setTimeout(addListeners(url),100);
	}
}
*/
/*
function myFunc(ost,nst) {
	if (nst == 'Closed' && ost == 'Stopped') {
		alert('the state went from '+ost+' to '+nst);
		slPlayer.sendEvent('PLAY');
	}
}*/
-->