////////////////////////////////////////////////////////////////////////////////////
//
//    'ValdoMM_Lib.js' tik IE
//
////////////////////////////////////////////////////////////////////////////////////

window.onerror=null;

var kalba=true;
var SoundWin=null;

dom=false, nav=false, iex=false;

///////////////////////////////////////////////////////////////////////////////////////////////////

if ( document.all ) iex=true;
if ( !document.all && document.getElementById ) dom=true;

///////////////////////////////////////////////////////////////////////////////////////////////////

document.write("<div id='Garseliui' name='Garseliui' style='position: absolute; top: -100px; left: -100px;'></div>");

function ComWrite(ElId,Cont) 
{
  if ( document.getElementById && !document.all ) 
  {  
    rng=document.createRange(); 
    el=document.getElementById(ElId); 
    rng.setStartBefore(el);
    htmlFrag=rng.createContextualFragment(Cont);

    el.appendChild(htmlFrag);
  }
}

function CloseSoundWin() 
{
  if ( SoundWin!=null && SoundWin.open ) SoundWin.close(); 
  SoundWin=null; 
}


function Call_Sakinys(File)
{
//  document.Sakinys.location=File;

  if ( iex ) document.frames['Sakinys'].location.href=File;

  if ( dom )
  {
    CloseSoundWin();
    SoundWin=window.open(File,"_PopWMPl","statusbar=no, menubar=no, resize=yes"); // "PopWMplTarmAudio.htm?"+File,
    SoundWin.focus();

    scw=screen.width;
    sch=screen.height;
    wx=scw/2-256+84;
    wy=sch-192;
    SoundWin.resizeTo(512,128);
    SoundWin.moveTo  (wx,wy);
  }

  return;
}

function Call_Kalbek(url)
{ 
  var str='';

  str=str+' <object Width="1" Height="1" ';
  str=str+' classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ';
  str=str+' type="application/x-oleobject"> ';

  str=str+'   <PARAM NAME="FileName" VALUE="'+url+'"> ';

  str=str+'   <param name="Mute" value="false"> ';
  str=str+'   <param name="Volume" value="0"> ';
  str=str+'   <PARAM NAME="AutoStart" VALUE="true"> ';
  str=str+'   <param name="AutoRewind" value="false"> ';
  str=str+'   <PARAM NAME="ShowTracker" VALUE="false">  ';
  str=str+'   <PARAM NAME="EnableTracker" VALUE="false"> ';
  str=str+'   <PARAM NAME="ShowControls" VALUE="false">  ';
  str=str+'   <param name="ShowStatusBar" value="false">  ';
  str=str+'   <PARAM NAME="ShowPositionControls" VALUE="false">  ';
  str=str+'   <PARAM NAME="EnablePositionControls" VALUE="false"> ';

  str=str+'   <EMBED type="application/x-mplayer2"  ';
  str=str+' 	name="MplVal" ';
  str=str+' 	src="'+url+'" ';
  str=str+' 	width="1" height="1" ';

  str=str+'     ShowControls=0 ';
  str=str+'     ShowPositionControls=0  ';
  str=str+'     ShowDisplay=0 ';
  str=str+'     ShowStatusBar=0 ';
  str=str+' 	autostart=1> ';
  str=str+'    </EMBED> ';
  str=str+' </OBJECT> ';

  if ( iex ) document.all['Garseliui'].innerHTML=str;
  if ( dom) ComWrite('Garseliui',str);
}


function CloseAllWindows() 
{
  CloseSoundWin(); 
  return;
}






