var AgntUsr=navigator.userAgent.toLowerCase();
	
	var DomYes
	if (document.getElementById) DomYes =1; else DomYes =0;				// DOM
	
	var NavYes
	if ((AgntUsr.indexOf('mozilla')!=-1)&&(AgntUsr.indexOf('compatible')==-1)) NavYes =1; else NavYes =0;	// Netscape
	
	var ExpYes
	if (AgntUsr.indexOf('msie')!=-1) ExpYes =1 ; else ExpYes =0;				// IExplorer
	
	var Opr5
	if ((AgntUsr.indexOf('opera 5')!=-1)||(AgntUsr.indexOf('opera/5')!=-1)) Opr5 = 1; else Opr5 = 0;	// Opera 5
	
	var DomNav
	if (DomYes&&NavYes) DomNav = 1; else DomNav = 0;					// Netscape 6 up
 	var DomExp
 	if (DomYes&&ExpYes) DomExp = 1; else DomExp = 0;					// IExplorer 5 up
	var Nav4
	if (NavYes && (!DomYes)) Nav4 = 1 ; else Nav4 = 0;			//  && (window.document.layers)Netscape 4 
	//Nav4 = 1
	var Exp4
	//if (ExpYes&&!DomYes&&document.all) Exp4 = 1; else Exp4 = 0;				// IExplorer 4

var g_Browser;
if (Nav4) g_Browser="Nav4";
if (Exp4) g_Browser="Exp4";
if (DomExp) g_Browser="Exp5";
if (DomNav) g_Browser="Nav6";

var mp_x,mp_y,mp_w,mp_h;

function mp_size(nr)
{
  if (document.MediaPlayer1)
  {
   if (g_Browser=="Nav4") {document.MediaPlayer1.SetDisplaySize(nr)}
   if (g_Browser=="Nav6") {document.MediaPlayer1.DisplaySize=nr}
   if ((g_Browser=="Exp4")||(g_Browser=="Exp5"))
   {document.MediaPlayer1.DisplaySize=nr}
  }
};

function set_navi(vis)
{
var vis_str;
vis? vis_str='visible' : vis_str = 'hidden';

if (parent.parent.navi){
   
   if(parent.parent.navi.document.getElementById('mp_navi')){
   
   parent.parent.navi.document.getElementById('mp_navi').style.visibility = vis_str;
}}
vis? vis_str='hidden' : vis_str = 'visible';
if (document.shots) document.getElementById('shots').style.visibility = vis_str;
   
}

function mp_halfsize(x,y,w,h)
{
   
   if (x < 0)
   {
    //alert('halfsize')
    document.all.mp_div.style.left = mp_x;
    document.all.mp_div.style.top = mp_y;
    document.MediaPlayer1.width = mp_w;
    document.MediaPlayer1.height = mp_h;
    
    set_navi(false);
    }
   else
   {
    
    mp_x = document.all.mp_div.style.left;
    mp_y = document.all.mp_div.style.top;
    mp_w = document.MediaPlayer1.width;
    mp_h = document.MediaPlayer1.height;
    
    
    
    document.all.mp_div.style.left = x;
    document.all.mp_div.style.top = y;
    document.MediaPlayer1.width = w;
    document.MediaPlayer1.height = h;
    set_navi(true);
    }
  mp_size(4);
};


function mp_setfile(fname)
{
  if (document.MediaPlayer1)
  { 
   if (g_Browser=="Nav4")
   {

      document.MediaPlayer1.SetFileName(fname)
    }
   else
   {
    document.MediaPlayer1.FileName=fname
   //alert(document.MediaPlayer1.FileName)
   }
   //parent.frames[2].window.location.href="text.asp?Q=" + parent.akt_quali
  }	
  
};


function mp_mute()
{
  if (document.MediaPlayer1)
  { 
   if (g_Browser=="Nav4")
   {

      document.MediaPlayer1.SetMute(!document.MediaPlayer1.GetMute) 
      if ((document.MediaPlayer1.GetMute) )
    {
    if (typeof( mute ) != "undefined" ) mute[0] = mute_3
    }
    else
    {
    if (typeof( mute ) != "undefined" ) mute[0] = mute_1
    }
    }
   else
   {
    document.MediaPlayer1.Mute= !document.MediaPlayer1.Mute;
    
    if ((document.MediaPlayer1.Mute))
    {
    if (typeof( mute ) != "undefined" ) mute[0] = mute_3
    }
    else
    {
    if (typeof( mute ) != "undefined" ) mute[0] = mute_1
    }
	
   } 
  } 
  if (typeof( mute ) != "undefined" ) change_button(0,'mute') 
  // alert(document.MediaPlayer1.Mute)
};

function mp_autostart()
{
  if (document.MediaPlayer1)
  { 
   if (g_Browser=="Nav4")
   {

      document.MediaPlayer1.SetAutoStart(!document.MediaPlayer1.GetAutoStart) 
      if (document.MediaPlayer1.GetAutoStart)
    {
    abs[0] = abs_1
    }
    else
    {
    abs[0] = abs_3
    }
    }
   else
   {
    document.MediaPlayer1.AutoStart= !document.MediaPlayer1.AutoStart;
    if (document.MediaPlayer1.AutoStart)
    {
    abs[0] = abs_1
    }
    else
    {
    abs[0] = abs_3
    }
	
   } 
  } 
  change_button(0,'abs') 
  // alert(document.MediaPlayer1.Mute)
};


function mp_play()
{
   if (document.MediaPlayer1)
   {
      if (document.MediaPlayer1.FileName != '')
      { 
         document.MediaPlayer1.Play();
      }   
   }
};

function mp_pause()
{
   if (document.MediaPlayer1)
   {
      if (document.MediaPlayer1.FileName != '')
      { 
       document.MediaPlayer1.Pause();
      }
   }    
   
};

function mp_stop()
{
   document.MediaPlayer1.Stop();
};

function mp_fr()
{
   document.MediaPlayer1.FastReverse();
};

function mp_ff()
{
   document.MediaPlayer1.FastForward();
};

function mp_volume(nr)
{
var   vol
var   step

   if (g_Browser == "Netscape")
   {
      document.MediaPlayer1.GetVolume(vol);
      if (vol == 0){vol = -2};
      step = parseInt(-vol / 2);
      if (nr > 0) {vol = vol + step} else {vol = vol - step};
      document.MediaPlayer1.SetVolume(vol);
    }
   else
   {
    vol = document.MediaPlayer1.Volume;
    if (vol == 0){vol = -2};
    step = parseInt(-vol / 2);
    
    if (nr > 0) {vol = vol + step} else {vol = vol - step};
    
    document.MediaPlayer1.Volume=vol};


};
