function MeniuPrincipalInit() {
var bav=false;
var bcv=false;
var bev=false;
var intFbv=false;

var stBox1,stBox2;

stBox1=document.getElementById('stBox1');
stBox2=document.getElementById('stBox2');

ba = document.getElementById('canunturi');
bc = document.getElementById('ccont');
be = document.getElementById('cevenimente');
da = document.getElementById('danunturi');
dc = document.getElementById('dcont');
de = document.getElementById('devenimente');
tm = document.getElementById('menus');
tcpf = document.getElementById('totcepoatefi');

function sma(){
 if(stBox1) stBox1.style.zIndex='-1';
 if(stBox2) stBox2.style.zIndex='-1';
 da.style.display='block';
 ba.className='cddah';
 hmc();
 hme();
 bav=true;
 bcv=false;
 bev=false;
 if(intFbv) clearTimeout(intFbv);
}
function hma(){
 if(stBox1) stBox1.style.zIndex='50';
 if(stBox2) stBox2.style.zIndex='50';
 da.style.display='none';
 ba.className='cdda';
}

function smc(){
 dc.style.display='block';
 bc.className='cddah';
 hma();
 hme();
 bav=false;
 bcv=true;
 bev=false;
 if(intFbv) clearTimeout(intFbv);
}
function hmc(){
 dc.style.display='none';
 bc.className='cdda';
}

function sme(){
 de.style.display='block';
 be.className='cddah';
 hma();
 hmc();
 bav=false;
 bcv=false;
 bev=true;
 if(intFbv) clearTimeout(intFbv);
}
function hme(){
 de.style.display='none';
 be.className='cdda';
}

function fbv(){
 bav=false;
 bcv=false;
 bev=false;
}

ba.onmouseover = function (){
 sma();
}
ba.onmouseout = function (){
 hma();
 intFbv=setTimeout(fbv, 200);
}
da.onmouseover = function (){
 sma();
}
da.onmouseout = function (){
 hma();
}

bc.onmouseover = function (){
 smc();
}
bc.onmouseout = function (){
 hmc();
 intFbv=setTimeout(fbv, 200);
}
dc.onmouseover = function (){
 smc();
}
dc.onmouseout = function (){
 hmc();
}

be.onmouseover = function (){
 sme();
}
be.onmouseout = function (){
 hme();
 intFbv=setTimeout(fbv, 200);
}
de.onmouseover = function (){
 sma();
}
de.onmouseout = function (){
 hme();
}

tm.onmouseover = function (){
 if(bav){
  fbv();
  sma();
 }
 if(bcv){
  fbv();
  smc();
 }
 if(bev){
  fbv();
  sme();
 }
}
tcpf.onmouseover = function (){
 hma();
 hmc();
 hme();
 fbv();
}
}

addLoadEvent(MeniuPrincipalInit);

