var a="Česky"; var d=document; function removeText(id){ var menic=d.getElementById(id); menicChild=menic.removeChild(menic.childNodes[0]); } function text(hlaska,id){ removeText(id); var newText=d.createTextNode(hlaska); d.getElementById(id).appendChild(newText); } function init() { d.getElementById('en').onmouseover=function(){text('English','langcontentarea');} d.getElementById('en').onmouseout=function(){text("a",'langcontentarea');} d.getElementById('cz').onmouseover=function(){text('Česky','langcontentarea');} d.getElementById('cz').onmouseout=function(){text("a",'langcontentarea');} //d.getElementById('fr').onmouseover=function(){text('En français','langcontentarea');} //d.getElementById('fr').onmouseout=function(){text(a,'langcontentarea');} //d.getElementById('es').onmouseover=function(){text('Español','langcontentarea');} //d.getElementById('es').onmouseout=function(){text(a,'langcontentarea');} d.getElementById('de').onmouseover=function(){text('Deutsch','langcontentarea');} d.getElementById('de').onmouseout=function(){text(a,'langcontentarea');} //d.getElementById('it').onmouseover=function(){text('Italiano','langcontentarea');} //d.getElementById('it').onmouseout=function(){text(a,'langcontentarea');} d.getElementById('ru').onmouseover=function(){text('По-русски','langcontentarea');} d.getElementById('ru').onmouseout=function(){text(a,'langcontentarea');} } function addEvent(obj,evType,fn){ if(obj.addEventListener){ obj.addEventListener(evType,fn,true); return true; } else if(obj.attachEvent){ var r=obj.attachEvent("on"+evType,fn); return r; } else { return false; } } addEvent(window,'load',init);