function PopupVelemeny(sPicURL) {
      window.open(sPicURL, '', 'resizable=1,HEIGHT=640,WIDTH=640');
			}
			
var lcnt;
var lh;
var dh;
var lt=0;
var go=true;

function movelangs(s){
  go=true;
  lmove(s);
}

function lmove(s){
  if (s=="right" && lt>dh-lh) lt--;
  else if (s=="left" && lt<0) lt++;
  if (go) setTimeout("lmove('"+s+"')",1);
  lcnt.style.left=lt+'px';
}

function stoplangs(){
  go=false;
}

function initlangs(){
  var u=document.getElementById('lleft');
  u.onmouseover=function () {movelangs('left');}
  u.onmouseout=function () {stoplangs();}
  var d=document.getElementById('lright');
  d.onmouseover=function () {movelangs('right');}
  d.onmouseout=function () {stoplangs();}
  dh=document.getElementById('langdiv').offsetWidth;
  lcnt=document.getElementById('langs');
  var lis=lcnt.getElementsByTagName('li');
  lh=0;
  for (i=0; i<lis.length; i++){
    lh+=lis[i].offsetWidth;
  }
  document.getElementById('langs').style.width=lh+'px';
}

//csodamegjelenéshez szükséges függvények, változók
function stretch(id){
  sobj=document.getElementById(id);
  hoh=parseInt(document.getElementById('head').offsetHeight);
  foh=parseInt(document.getElementById('foot').offsetHeight);
  tmb=sobj.childNodes;
  max=0;
  for (var i=0; i<tmb.length; i++){
    oh=tmb[i].offsetHeight;
    if (oh>max) max=parseInt(oh);
  }
  sobj.style.height=hoh+foh+max+'px';
}

function abscenter(){
var id='container';
var kepszel = 0, kepmag = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    kepszel = window.innerWidth;
    kepmag = window.innerHeight;
  } 
  else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    kepszel = document.documentElement.clientWidth;
    kepmag = document.documentElement.clientHeight;
  } 
  else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    kepszel = document.body.clientWidth;
    kepmag = document.body.clientHeight;
  }
  
  maindiv=document.getElementById(id);
  divmag=maindiv.offsetHeight;
  divszel=maindiv.offsetWidth;
  
  document.body.style.height=maindiv.offsetHeight+"px";
  document.getElementById('validate').style.top=maindiv.offsetHeight+"px";
  
  if (divmag<kepmag){
    maindiv.style.top=(parseInt((kepmag/2)-(divmag/2)))+"px";
  }
  else{
    maindiv.style.top="0px";
  }
  if (divszel<kepszel){
    maindiv.style.left=parseInt(((kepszel-Math.abs(kepszel-document.documentElement.scrollWidth))/2)-(divszel/2))+"px";
    maindiv.style.marginLeft="0px";
  }
  else{
    maindiv.style.left="0px";
    maindiv.style.marginLeft="0px";
  }
}

window.onresize=abscenter;
