 function getEnglishDiv_CenterPosition(){
   var windowWidth,windowHeight,xScroll,yScroll;
   var waitDiv_Width=316;
   var waitDiv_Height=164;

   // 1. lekerjuk a bongeszo ablak szelesseget es magassagat
   if ( self.innerHeight ){
     if ( document.documentElement.clientWidth ){
       windowWidth = document.documentElement.clientWidth; 
     }else{
         windowWidth = self.innerWidth;
      }
     windowHeight = self.innerHeight;
   }else if ( document.documentElement && document.documentElement.clientHeight ){
      windowWidth = document.documentElement.clientWidth;
      windowHeight = document.documentElement.clientHeight;
    }else if ( document.body ){
       windowWidth = document.body.clientWidth;
       windowHeight = document.body.clientHeight;
     }
   // 2. lekerjuk az aktualis page poziciojat, mennyit scrolloztunk
   if ( self.pageYOffset ){
     yScroll = self.pageYOffset;
     xScroll = self.pageXOffset;
   }else if ( document.documentElement && document.documentElement.scrollTop ){
      yScroll = document.documentElement.scrollTop;
      xScroll = document.documentElement.scrollLeft;
    }else if ( document.body ){
       yScroll = document.body.scrollTop;
       xScroll = document.body.scrollLeft; 
     }
   
   var center={
     x: Math.round(windowWidth/2)-Math.round(waitDiv_Width/2)+xScroll,
     y: Math.round(windowHeight/2)-Math.round(waitDiv_Height/2)+yScroll
   };
   return center;
 }

 function openEnglishDialog(){
   divwaitbg_height='100%';
   if ( browser_msie6 ){
     divwaitbg_height=document.body.clientHeight + 'px';
     set_Forms_Select_Element_Disabled('none');
   }
   var f=byId('english_divwait_iframe');
   var w=byId('english_divwait');
   var bg=byId('english_divwaitbg');
   f.style.height=divwaitbg_height;
   bg.style.height=divwaitbg_height;
   var c=getEnglishDiv_CenterPosition();
   w.style.top = c.y+'px'; 
   w.style.left = c.x+'px';
   setVisibleO(w,true);
   setVisibleO(f,true);
   setVisibleO(bg,true);
 }
 
 function closeEnglishDialog(){
   var f=byId('english_divwait_iframe');
   var w=byId('english_divwait');
   var bg=byId('english_divwaitbg');
   setVisibleO(w,false);
   setVisibleO(f,false);
   setVisibleO(bg,false);
   if ( browser_msie6 ) set_Forms_Select_Element_Disabled('');
 }

