var mopenxb=false; function openxb(){ if (mopenxb){ document.getElementById('lmb').className="toocle1"; }else{ document.getElementById('lmb').className="toocle2"; } mopenxb=!mopenxb; }