var _TRANSLATING_LANG = null; /** * */ LangSelectorClass = Class.create(); LangSelectorClass.prototype = { initialize: function() { if(this.selectedIndex != 0) { this.showlangtree(); _TRANSLATING_LANG = this.value; } }, onshow: function() { if(this.value) this.showlangtree(); }, onchange: function(e, val) { if(this.value != _TRANSLATING_LANG) { _TRANSLATING_LANG = this.value; this.showlangtree(); } }, selectValue: function(lang) { this.value = lang; if(this.value != lang) { var newLang = document.createElement('option'); newLang.text = lang; newLang.value = lang; try { this.add(newLang, null); // standards compliant } catch(ex) { this.add(newLang); // IE only } this.value = lang; } }, showlangtree: function() { if(this.value) { $('sitetree').innerHTML='