function hMarkerItem(dTime,dFileName)
{
	this.mTime = dTime;
	this.mFileName = dFileName;
}

function allStop()
{
 parent.LeftupFrame.document.all.MediaPlayer.Controls.Pause();
 parent.document.all.RightFrame.scrolling="yes";
 parent.RightFrame.document.body.style.overflow="scroll";
}

function OpenContent(URL)
{
//  parent.LeftupFrame.MediaPlayer.Controls.Pause();
//  parent.RightFrame.location = URL;
  open(URL);
}

function Skip(seconds)
{
  parent.LeftupFrame.MediaPlayer.Controls.currentPosition = seconds;
  parent.LeftupFrame.MediaPlayer.Controls.Play();
}

function ShowPhoto(FileName)
{
  document.writeln("<div id='LayerPhoto' style='POSITION: absolute; LEFT: 0px; TOP: 0px; width: 207px; height: 158px; z-index:2; border: 1px none #000000'><img width=100% height=100% src=" + FileName + "></div>");
}

function FindSlideIndexByTime(dTime)
{
  var iLen = gMarkerTable.length;
  var i = 0;
  for (i=0; i<iLen-1; i++)
  {
    if (gMarkerTable[i].mTime <= dTime && dTime < gMarkerTable[i+1].mTime)
      return i;
  }
  return iLen-1;
}

function FindSlideIndexByFile(FilePath)
{
  var iLen = gMarkerTable.length;
  var i = 0;
  for (i=0; i<iLen; i++)
  {
    if ( gMarkerTable[i].mFileName == FilePath)
      break;
  }
  return i;
}

function GetFileByTime(dTime)
{
  var iIndex = 0;
  var FilePath;
  iIndex = FindSlideIndexByTime(dTime);
  FilePath = gMarkerTable[iIndex].mFileName;
  return FilePath;
}

function GetTimeByFile(FilePath)
{
  var iIndex;
  var dTime;
  iIndex = FindSlideIndexByFile(FilePath);
  dTime = gMarkerTable[iIndex].mTime;
  return dTime;
}
