function slightbox(lw) {
  var myWidth = 0, myHeight = 0, scrOfX = 0, scrOfY = 0;

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }

  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }

  var baseW=myWidth+scrOfX;
  var baseH=myHeight+scrOfY;
  
  document.getElementById('darkLayer').style.width=baseW+'px';
  document.getElementById('darkLayer').style.height=baseH+'px';
  document.getElementById('darkLayer').style.display='block';
  
  var lp=parseInt((baseW-640)/2);
  if (lp<0) lp=0;
  document.getElementById('limage').style.left=lp+'px';
  document.getElementById('limage').style.top=(scrOfY+120)+'px';
  document.getElementById('limage').style.display='block';
  document.getElementById('videotitle').innerHTML=lw;
  document.getElementById('videoarea').innerHTML='<div id="video"></div>';
  
}

function hlightbox() {
  var ref = document.getElementById('video');
  document.getElementById('videoarea').removeChild(ref);
  document.getElementById('darkLayer').style.display='none';
  document.getElementById('limage').style.display='none';

}

function showflv(fn) {
  var s1 = new SWFObject('player.swf','ply','640','380','9','#000000');
  s1.addParam('allowfullscreen','true');
  s1.addParam('allowscriptaccess','always');
  s1.addVariable('repeat', 'false');
  s1.addParam('flashvars','file=videos/'+fn+'&autostart=true');
  s1.write('video');
}
