/* PDF dokumentum megjelenítés */
function showVideo(url,menu_id)
{ var browserName = getBrowsname();
  var dim=getWindowDimension();
  var scroll = window.pageYOffset ? window.pageYOffset :
               document.documentElement ? document.documentElement.scrollTop :
               document.body ? document.body.scrollTop : 0;
  var div = NewTag('div',document.body);
  div.style.position = 'absolute';
  div.style.top = '0px';
  div.style.left = '0px';
  div.style.width = '100%';
  div.style.height = getDocumentHeight()+"px";
  div.style.zIndex = 10000;
  div.style.background = 'black';
  SetOpac(div,60);
  var w_max = parseInt(dim.wi*0.5);
  var h_max = parseInt(dim.he*0.5);
  var kep_w = w_max;
  var kep_h = h_max;
  var embed = NewTag('div',document.body);
  embed.style.position = 'absolute';
  embed.style.zIndex = 10002;
  embed.style.border = "4px solid #1f1f1f";
  embed.style.width = kep_w+'px';
  embed.style.height = kep_h+'px';
  embed.style.top = 25+'%';
  var img = NewTag('img',document.body);
  img.style.position = 'absolute';
  img.src = 'bezar.png';
  img.title = 'Vissza';
  img.style.zIndex = 99999;
  img.style.width = '24px';
  img.style.height = '24px';
  img.style.left = '76%';
  img.style.top = '22%';
  img.style.cursor = 'pointer';
  if (browserName == 'MSIE')
    embed.style.left = ((dim.wi-kep_w)/2) +'px';
  else
    embed.style.left = ((dim.wi-kep_w)/2) - 10 +'px';
  embed.innerHTML = '<object type="application/x-shockwave-flash" '+
                            'width="'+kep_w+'" '+
                            'height="'+(kep_h+2)+'" '+
                            'wmode="transparent"'+
                            'data="images/flvplayer.swf?file='+url+'.flv&amp;autoStart=true">'+
                        '<param name="movie" value="images/flvplayer.swf?file='+url+'.flv&amp;autoStart=true" />'+
                        '<param name="wmode" value="transparent" />'+
                    '</object>';
  //ESEMÉNYEK
  img.onclick=function()
  { document.body.removeChild(this);
    document.body.removeChild(embed);
    document.body.removeChild(div);
    document.getElementById(menu_id).focus();
  }
}
function getWindowDimension() {
    if( typeof( window.innerWidth ) == 'number' ) {
        w = window.innerWidth;
        h = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        w = document.documentElement.clientWidth;
        h = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        w = document.body.clientWidth;
        h = document.body.clientHeight;
    }
    return {wi:w,he:h};
}
function NewTag(id, pParent, pBefore) {
    var tag = document.createElement(id);
    if(pParent != undefined) AddTag(tag, pParent, pBefore);
    return tag;
}
function AddTag(pChild, pParent, pBefore) {
    if(pBefore != undefined) InsertBefore (pParent, pChild, pBefore);
    else pParent.appendChild(pChild);
}
function getDocumentHeight() {
    var htmlheight = document.body.parentNode.scrollHeight;
    var windowheight = window.innerHeight;
    if ( htmlheight < windowheight ) { return windowheight; }
    else { return htmlheight; }
}
function SetOpac (block,value) {
block.style.opacity = value/100;
block.style.filter = 'alpha(opacity=' + value + ')';
}

