﻿function windowresize640()
{
    copyright.style.display = (document.body.offsetHeight <= 663) ? "none" : "inline";
    if (document.body.offsetHeight <= 640)
    {
        toolbar.style.top = 601;
        copyright.style.display = "inline";
    }
    else
    {
        toolbar.style.top = null;
        toolbar.style.bottom = 0;
    }
}

function windowresize577()
{
    copyright.style.display = (document.body.offsetHeight <= 600 ) ? "none" : "inline";
    if (document.body.offsetHeight <= 577)
    {
        toolbar.style.top = 538;
        copyright.style.display = "inline";
    }
    else
    {
        toolbar.style.top = null;
        toolbar.style.bottom = 0;
    }
}

function windowresize577e()
{
    if (document.body.offsetHeight <= 620)
    {
        toolbar.style.top = 560;
    }
    else
    {
        toolbar.style.top = null;
        toolbar.style.bottom = 0;
    }
}

function windowresize640e()
{
    if (document.body.offsetHeight <= 680)
    {
        toolbar.style.top = 630;
    }
    else
    {
        toolbar.style.top = null;
        toolbar.style.bottom = 0;
    }
}

function controlStop()
{
	VideoPlayer.style.display = "none";
	VideoPlayer.Stop();
}

function controlRewind()
{
	if (VideoPlayer.duration > 0)
	{
		VideoPlayer.pause();
		VideoPlayer.currentPosition-=3;
		VideoPlayer.play();
	}
}

function controlPlay()
{
	VideoPlayer.style.display = "inline";
	switch(VideoPlayer.playState)
	{
		case 0 : // stopped
			VideoPlayer.Play();
			break;
		case 2 : // playing
		case 4 : 
		case 5 : 
			VideoPlayer.Pause();
			break;
		default : // paused
			VideoPlayer.Play();
			break;
	}
}

function controlForward()
{
	if (VideoPlayer.duration > 0)
	{
		VideoPlayer.pause();
		VideoPlayer.currentPosition+=3;
		VideoPlayer.play();
	}
}

function controlMute()
{
if(VideoPlayer.mute)
{
    window.alert('muted');
}
else
{
    window.alert('not muted');
}
	VideoPlayer.mute = !VideoPlayer.mute;
	if(VideoPlayer.mute)
		btnMute.src = btnMute.src.replace("mute_over.gif", "mute_on.gif").replace("mute.gif", "mute_on.gif");
	else
		btnMute.src = btnMute.src.replace("mute_on_over.gif", "mute.gif").replace("mute_on.gif", "mute.gif");
}
