var mopenxw=false; //new start function openxw(){ if (mopenxw){ document.getElementById('xw').className="toocle1"; }else{ document.getElementById('xw').className="toocle2"; } mopenxw=!mopenxw; } //new end