Ему надо чтобы ссылка зажглась видать, дописать те ссылки, что были выше, только добавить им class, а не display =)
PHP: <!DOCTYPE html><html><head><meta charset="utf-8"><title>Page</title><style type="text/css"> #container{height:30px;} #container #english, #container #russian{cursor:pointer;float:left;margin:0 20px 0 0;} #redbox, #bluebox{width:300px;height:200px;} #redbox{background:#ff0000;} #bluebox{background:#0000ff;display:none;} .active{color:#ff0000;}</style><script type="text/javascript"> var arrayClick=[]; arrayClick['english']='redbox'; arrayClick['russian']='bluebox'; function type(variable,type) { if('undefined'===typeof type) { return 'undefined'!==typeof variable; } else { return type===typeof variable; } } function clicked(self) { if(type(self) && type(self,'object')) { for(var i in arrayClick) { if(i===self.id) { self.className='active'; document.getElementById(arrayClick[self.id]).style.display='none'; } else { document.getElementById(i).className=''; document.getElementById(arrayClick[i]).style.display='block'; } } } }</script></head><body><div id="container"> <div id="english" onclick="clicked(this)"> english </div> <div id="russian" onclick="clicked(this)"> russian </div></div><div id="redbox">English</div><div id="bluebox">Russian</div></body></html>
Сейчас все работает, но вначале(при первой загрузки) 'пункт меню'-english не выделен цветом. А после первого нажатия уже все работает корректно.