/* Он клик */
/* alert('Loading'); */

function tbload() {
document.getElementById('tabid1').style.display='block';
document.getElementById('tabliid1').style.backgroundColor='RGB(240, 240, 240)';
document.getElementById('tabid2').style.display='none';
document.getElementById('tabid3').style.display='none';
document.getElementById('tabid4').style.display='none';
}

setTimeout('tbload()',1);

document.getElementById('tabliid1').onclick = tbclick1;
document.getElementById('tabliid2').onclick = tbclick2;
document.getElementById('tabliid3').onclick = tbclick3;
document.getElementById('tabliid4').onclick = tbclick4;

function tbreset() {
 document.getElementById('tabid1').style.display='none';
 document.getElementById('tabid2').style.display='none';
 document.getElementById('tabid3').style.display='none';
 document.getElementById('tabid4').style.display='none';

 document.getElementById('tabliid1').style.backgroundColor='RGB(210, 210, 210)';
 document.getElementById('tabliid2').style.backgroundColor='RGB(210, 210, 210)';
 document.getElementById('tabliid3').style.backgroundColor='RGB(210, 210, 210)';
 document.getElementById('tabliid4').style.backgroundColor='RGB(210, 210, 210)';
}

function tbclick1() {
 tbreset();
 document.getElementById('tabid1').style.display='block';
 this.style.backgroundColor = 'RGB(240, 240, 240)'; 
}

function tbclick2() {
 tbreset();
 document.getElementById('tabid2').style.display='block';
 this.style.backgroundColor = 'RGB(240, 240, 240)';
}

function tbclick3() {
 tbreset();
 document.getElementById('tabid3').style.display='block';
 this.style.backgroundColor = 'RGB(240, 240, 240)';
}

function tbclick4() {
 tbreset();
 document.getElementById('tabid4').style.display='block';
 this.style.backgroundColor = 'RGB(240, 240, 240)';
}


/* Он маус овер */
document.getElementById('tabliid1').onmouseover = tbmove1;
document.getElementById('tabliid2').onmouseover = tbmove2;
document.getElementById('tabliid3').onmouseover = tbmove3;
document.getElementById('tabliid4').onmouseover = tbmove4;


function tbmove1() {
  /* this.style.textDecoration = 'underline'; */
  if (document.getElementById('tabid1').style.display=='none') {
   this.style.backgroundColor = 'Silver'; 
 }
};

function tbmove2() {
  /* this.style.textDecoration = 'underline'; */
  if (document.getElementById('tabid2').style.display=='none') {
   this.style.backgroundColor = 'Silver'; 
 }
};

function tbmove3() {
  /* this.style.textDecoration = 'underline'; */
  if (document.getElementById('tabid3').style.display=='none') {
   this.style.backgroundColor = 'Silver'; 
 }
};

function tbmove4() {
  /* this.style.textDecoration = 'underline'; */
  if (document.getElementById('tabid4').style.display=='none') {
   this.style.backgroundColor = 'Silver'; 
 }
};

/* Он маус ливе */
document.getElementById('tabliid1').onmouseout = tbleave1;
document.getElementById('tabliid2').onmouseout = tbleave2;
document.getElementById('tabliid3').onmouseout = tbleave3;
document.getElementById('tabliid4').onmouseout = tbleave4;


function tbleave1() {
  /* this.style.textDecoration = 'none'; */
  if (document.getElementById('tabid1').style.display=='none') {
   this.style.backgroundColor = 'RGB(210, 210, 210)'; 
  }
};         
function tbleave2() {
  /* this.style.textDecoration = 'none'; */
  if (document.getElementById('tabid2').style.display=='none') {
   this.style.backgroundColor = 'RGB(210, 210, 210)'; 
  }
};         
function tbleave3() {
  /* this.style.textDecoration = 'none'; */
  if (document.getElementById('tabid3').style.display=='none') {
   this.style.backgroundColor = 'RGB(210, 210, 210)'; 
  }
};         
function tbleave4() {
  /* this.style.textDecoration = 'none'; */
  if (document.getElementById('tabid4').style.display=='none') {
   this.style.backgroundColor = 'RGB(210, 210, 210)'; 
  }
};         

/* alert('Stop'); */
