var Prototype={Version:'1.6.0.3',Browser:{IE:!!(window.attachEvent&&navigator.userAgent.indexOf('Opera')===-1),Opera:navigator.userAgent.indexOf('Opera')>-1,WebKit:navigator.userAgent.indexOf('AppleWebKit/')>-1,Gecko:navigator.userAgent.indexOf('Gecko')>-1&&navigator.userAgent.indexOf('KHTML')===-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement('div')['__proto__']&&document.createElement('div')['__proto__']!==document.createElement('form')['__proto__']},ScriptFragment:'<script[^>]*>([\\S\\s]*?)<\/script>',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(x){return x}};if(Prototype.Browser.MobileSafari)Prototype.BrowserFeatures.SpecificElementExtensions=false;var Class={create:function(){var parent=null,properties=$A(arguments);if(Object.isFunction(properties[0]))parent=properties.shift();function klass(){this.initialize.apply(this,arguments)}Object.extend(klass,Class.Methods);klass.superclass=parent;klass.subclasses=[];if(parent){var subclass=function(){};subclass.prototype=parent.prototype;klass.prototype=new subclass;parent.subclasses.push(klass)}for(var i=0;i<properties.length;i++)klass.addMethods(properties[i]);if(!klass.prototype.initialize)klass.prototype.initialize=Prototype.emptyFunction;klass.prototype.constructor=klass;return klass}};Class.Methods={addMethods:function(source){var ancestor=this.superclass&&this.superclass.prototype;var properties=Object.keys(source);if(!Object.keys({toString:true}).length)properties.push("toString","valueOf");for(var i=0,length=properties.length;i<length;i++){var property=properties[i],value=source[property];if(ancestor&&Object.isFunction(value)&&value.argumentNames().first()=="$super"){var method=value;value=(function(m){return function(){return ancestor[m].apply(this,arguments)}})(property).wrap(method);value.valueOf=method.valueOf.bind(method);value.toString=method.toString.bind(method)}this.prototype[property]=value}return this}};var Abstract={};Object.extend=function(destination,source){for(var property in source)destination[property]=source[property];return destination};Object.extend(Object,{inspect:function(object){try{if(Object.isUndefined(object))return'undefined';if(object===null)return'null';return object.inspect?object.inspect():String(object)}catch(e){if(e instanceof RangeError)return'...';throw e;}},toJSON:function(object){var type=typeof object;switch(type){case'undefined':case'function':case'unknown':return;case'boolean':return object.toString()}if(object===null)return'null';if(object.toJSON)return object.toJSON();if(Object.isElement(object))return;var results=[];for(var property in object){var value=Object.toJSON(object[property]);if(!Object.isUndefined(value))results.push(property.toJSON()+': '+value)}return'{'+results.join(', ')+'}'},toQueryString:function(object){return $H(object).toQueryString()},toHTML:function(object){return object&&object.toHTML?object.toHTML():String.interpret(object)},keys:function(object){var keys=[];for(var property in object)keys.push(property);return keys},values:function(object){var values=[];for(var property in object)values.push(object[property]);return values},clone:function(object){return Object.extend({},object)},isElement:function(object){return!!(object&&object.nodeType==1)},isArray:function(object){return object!=null&&typeof object=="object"&&'splice'in object&&'join'in object},isHash:function(object){return object instanceof Hash},isFunction:function(object){return typeof object=="function"},isString:function(object){return typeof object=="string"},isNumber:function(object){return typeof object=="number"},isUndefined:function(object){return typeof object=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var names=this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1].replace(/\s+/g,'').split(',');return names.length==1&&!names[0]?[]:names},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)))}},bindAsEventListener:function(){var __method=this,args=$A(arguments),object=args.shift();return function(event){return __method.apply(object,[event||window.event].concat(args))}},curry:function(){if(!arguments.length)return this;var __method=this,args=$A(arguments);return function(){return __method.apply(this,args.concat($A(arguments)))}},delay:function(){var __method=this,args=$A(arguments),timeout=args.shift()*1000;return window.setTimeout(function(){return __method.apply(__method,args)},timeout)},defer:function(){var args=[0.01].concat($A(arguments));return this.delay.apply(this,args)},wrap:function(wrapper){var __method=this;return function(){return wrapper.apply(this,[__method.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){return __method.apply(null,[this].concat($A(arguments)))}}});Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+'-'+(this.getUTCMonth()+1).toPaddedString(2)+'-'+this.getUTCDate().toPaddedString(2)+'T'+this.getUTCHours().toPaddedString(2)+':'+this.getUTCMinutes().toPaddedString(2)+':'+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break}catch(e){}}return returnValue}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(str){return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1')};var PeriodicalExecuter=Class.create({initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(value){return value==null?'':String(value)},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});Object.extend(String.prototype,{gsub:function(pattern,replacement){var result='',source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length)}else{result+=source,source=''}}return result},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match)})},scan:function(pattern,iterator){this.gsub(pattern,iterator);return String(this)},truncate:function(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this)},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'')},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'')},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'')},extractScripts:function(){var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var self=arguments.callee;self.text.data=this;return self.div.innerHTML},unescapeHTML:function(){var div=new Element('div');div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject('',function(memo,node){return memo+node.nodeValue}):div.childNodes[0].nodeValue):''},toQueryParams:function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift());var value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)value=decodeURIComponent(value);if(key in hash){if(!Object.isArray(hash[key]))hash[key]=[hash[key]];hash[key].push(value)}else hash[key]=value}return hash})},toArray:function(){return this.split('')},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(count){return count<1?'':new Array(count+1).join(this)},camelize:function(){var parts=this.split('-'),len=parts.length;if(len==1)return parts[0];var camelized=this.charAt(0)=='-'?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i<len;i++)camelized+=parts[i].charAt(0).toUpperCase()+parts[i].substring(1);return camelized},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,'/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase()},dasherize:function(){return this.gsub(/_/,'-')},inspect:function(useDoubleQuotes){var escapedString=this.gsub(/[\x00-\x1f\\]/,function(match){var character=String.specialChar[match[0]];return character?character:'\\u00'+match[0].charCodeAt().toPaddedString(2,16)});if(useDoubleQuotes)return'"'+escapedString.replace(/"/g,'\\"')+'"';return"'"+escapedString.replace(/'/g,'\\\'')+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(filter){return this.sub(filter||Prototype.JSONFilter,'#{1}')},isJSON:function(){var str=this;if(str.blank())return false;str=this.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'');return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON())return eval('('+json+')')}catch(e){}throw new SyntaxError('Badly formed JSON string: '+this.inspect());},include:function(pattern){return this.indexOf(pattern)>-1},startsWith:function(pattern){return this.indexOf(pattern)===0},endsWith:function(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d},empty:function(){return this==''},blank:function(){return/^\s*$/.test(this)},interpolate:function(object,pattern){return new Template(this,pattern).evaluate(object)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE)Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;')},unescapeHTML:function(){return this.stripTags().replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>')}});String.prototype.gsub.prepareReplacement=function(replacement){if(Object.isFunction(replacement))return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement('div'),text:document.createTextNode('')});String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);var Template=Class.create({initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern},evaluate:function(object){if(Object.isFunction(object.toTemplateReplacements))object=object.toTemplateReplacements();return this.template.gsub(this.pattern,function(match){if(object==null)return'';var before=match[1]||'';if(before=='\\')return match[2];var ctx=object,expr=match[3];var pattern=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;match=pattern.exec(expr);if(match==null)return before;while(match!=null){var comp=match[1].startsWith('[')?match[2].gsub('\\\\]',']'):match[1];ctx=ctx[comp];if(null==ctx||''==match[3])break;expr=expr.substring('['==match[3]?match[1].length:match[0].length);match=pattern.exec(expr)}return before+String.interpret(ctx)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(iterator,context){var index=0;try{this._each(function(value){iterator.call(context,value,index++)})}catch(e){if(e!=$break)throw e;}return this},eachSlice:function(number,iterator,context){var index=-number,slices=[],array=this.toArray();if(number<1)return array;while((index+=number)<array.length)slices.push(array.slice(index,index+number));return slices.collect(iterator,context)},all:function(iterator,context){iterator=iterator||Prototype.K;var result=true;this.each(function(value,index){result=result&&!!iterator.call(context,value,index);if(!result)throw $break;});return result},any:function(iterator,context){iterator=iterator||Prototype.K;var result=false;this.each(function(value,index){if(result=!!iterator.call(context,value,index))throw $break;});return result},collect:function(iterator,context){iterator=iterator||Prototype.K;var results=[];this.each(function(value,index){results.push(iterator.call(context,value,index))});return results},detect:function(iterator,context){var result;this.each(function(value,index){if(iterator.call(context,value,index)){result=value;throw $break;}});return result},findAll:function(iterator,context){var results=[];this.each(function(value,index){if(iterator.call(context,value,index))results.push(value)});return results},grep:function(filter,iterator,context){iterator=iterator||Prototype.K;var results=[];if(Object.isString(filter))filter=new RegExp(filter);this.each(function(value,index){if(filter.match(value))results.push(iterator.call(context,value,index))});return results},include:function(object){if(Object.isFunction(this.indexOf))if(this.indexOf(object)!=-1)return true;var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found},inGroupsOf:function(number,fillWith){fillWith=Object.isUndefined(fillWith)?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice})},inject:function(memo,iterator,context){this.each(function(value,index){memo=iterator.call(context,memo,value,index)});return memo},invoke:function(method){var args=$A(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args)})},max:function(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value>=result)result=value});return result},min:function(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value<result)result=value});return result},partition:function(iterator,context){iterator=iterator||Prototype.K;var trues=[],falses=[];this.each(function(value,index){(iterator.call(context,value,index)?trues:falses).push(value)});return[trues,falses]},pluck:function(property){var results=[];this.each(function(value){results.push(value[property])});return results},reject:function(iterator,context){var results=[];this.each(function(value,index){if(!iterator.call(context,value,index))results.push(value)});return results},sortBy:function(iterator,context){return this.map(function(value,index){return{value:value,criteria:iterator.call(context,value,index)}}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0}).pluck('value')},toArray:function(){return this.map()},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last()))iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index))})},size:function(){return this.toArray().length},inspect:function(){return'#<Enumerable:'+this.toArray().inspect()+'>'}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(iterable){if(!iterable)return[];if(iterable.toArray)return iterable.toArray();var length=iterable.length||0,results=new Array(length);while(length--)results[length]=iterable[length];return results}if(Prototype.Browser.WebKit){$A=function(iterable){if(!iterable)return[];if(!(typeof iterable==='function'&&typeof iterable.length==='number'&&typeof iterable.item==='function')&&iterable.toArray)return iterable.toArray();var length=iterable.length||0,results=new Array(length);while(length--)results[length]=iterable[length];return results}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0,length=this.length;i<length;i++)iterator(this[i])},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(value){return value!=null})},flatten:function(){return this.inject([],function(array,value){return array.concat(Object.isArray(value)?value.flatten():[value])})},without:function(){var values=$A(arguments);return this.select(function(value){return!values.include(value)})},reverse:function(inline){return(inline!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(sorted){return this.inject([],function(array,value,index){if(0==index||(sorted?array.last()!=value:!array.include(value)))array.push(value);return array})},intersect:function(array){return this.uniq().findAll(function(item){return array.detect(function(value){return item===value})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']'},toJSON:function(){var results=[];this.each(function(object){var value=Object.toJSON(object);if(!Object.isUndefined(value))results.push(value)});return'['+results.join(', ')+']'}});if(Object.isFunction(Array.prototype.forEach))Array.prototype._each=Array.prototype.forEach;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(item,i){i||(i=0);var length=this.length;if(i<0)i=length+i;for(;i<length;i++)if(this[i]===item)return i;return-1};if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(item,i){i=isNaN(i)?this.length:(i<0?this.length+i:i)+1;var n=this.slice(0,i).reverse().indexOf(item);return(n<0)?n:i-n-1};Array.prototype.toArray=Array.prototype.clone;function $w(string){if(!Object.isString(string))return[];string=string.strip();return string?string.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var array=[];for(var i=0,length=this.length;i<length;i++)array.push(this[i]);for(var i=0,length=arguments.length;i<length;i++){if(Object.isArray(arguments[i])){for(var j=0,arrayLength=arguments[i].length;j<arrayLength;j++)array.push(arguments[i][j])}else{array.push(arguments[i])}}return array}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(iterator,context){$R(0,this,true).each(iterator,context);return this},toPaddedString:function(length,radix){var string=this.toString(radix||10);return'0'.times(length-string.length)+string},toJSON:function(){return isFinite(this)?this.toString():'null'}});$w('abs round ceil floor').each(function(method){Number.prototype[method]=Math[method].methodize()});function $H(object){return new Hash(object)};var Hash=Class.create(Enumerable,(function(){function toQueryPair(key,value){if(Object.isUndefined(value))return key;return key+'='+encodeURIComponent(String.interpret(value))}return{initialize:function(object){this._object=Object.isHash(object)?object.toObject():Object.clone(object)},_each:function(iterator){for(var key in this._object){var value=this._object[key],pair=[key,value];pair.key=key;pair.value=value;iterator(pair)}},set:function(key,value){return this._object[key]=value},get:function(key){if(this._object[key]!==Object.prototype[key])return this._object[key]},unset:function(key){var value=this._object[key];delete this._object[key];return value},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck('key')},values:function(){return this.pluck('value')},index:function(value){var match=this.detect(function(pair){return pair.value===value});return match&&match.key},merge:function(object){return this.clone().update(object)},update:function(object){return new Hash(object).inject(this,function(result,pair){result.set(pair.key,pair.value);return result})},toQueryString:function(){return this.inject([],function(results,pair){var key=encodeURIComponent(pair.key),values=pair.value;if(values&&typeof values=='object'){if(Object.isArray(values))return results.concat(values.map(toQueryPair.curry(key)))}else results.push(toQueryPair(key,values));return results}).join('&')},inspect:function(){return'#<Hash:{'+this.map(function(pair){return pair.map(Object.inspect).join(': ')}).join(', ')+'}>'},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive},_each:function(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ()}},include:function(value){if(value<this.start)return false;if(this.exclusive)return value<this.end;return value<=this.end}});var $R=function(start,end,exclusive){return new ObjectRange(start,end,exclusive)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(iterator){this.responders._each(iterator)},register:function(responder){if(!this.include(responder))this.responders.push(responder)},unregister:function(responder){this.responders=this.responders.without(responder)},dispatch:function(callback,request,transport,json){this.each(function(responder){if(Object.isFunction(responder[callback])){try{responder[callback].apply(responder,[request,transport,json])}catch(e){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(options){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:'',evalJSON:true,evalJS:true};Object.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters))this.options.parameters=this.options.parameters.toQueryParams();else if(Object.isHash(this.options.parameters))this.options.parameters=this.options.parameters.toObject()}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,url,options){$super(options);this.transport=Ajax.getTransport();this.request(url)},request:function(url){this.url=url;this.method=this.options.method;var params=Object.clone(this.options.parameters);if(!['get','post'].include(this.method)){params['_method']=this.method;this.method='post'}this.parameters=params;if(params=Object.toQueryString(params)){if(this.method=='get')this.url+=(this.url.include('?')?'&':'?')+params;else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))params+='&_='}try{var response=new Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(response);Ajax.Responders.dispatch('onCreate',this,response);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous)this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType)this.onStateChange()}catch(e){this.dispatchException(e)}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete))this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){headers['Content-type']=this.options.contentType+(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)headers['Connection']='close'}if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(Object.isFunction(extras.push))for(var i=0,length=extras.length;i<length;i+=2)headers[extras[i]]=extras[i+1];else $H(extras).each(function(pair){headers[pair.key]=pair.value})}for(var name in headers)this.transport.setRequestHeader(name,headers[name])},success:function(){var status=this.getStatus();return!status||(status>=200&&status<300)},getStatus:function(){try{return this.transport.status||0}catch(e){return 0}},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState],response=new Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(response,response.headerJSON)}catch(e){this.dispatchException(e)}var contentType=response.getHeader('Content-type');if(this.options.evalJS=='force'||(this.options.evalJS&&this.isSameOrigin()&&contentType&&contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))this.evalResponse()}try{(this.options['on'+state]||Prototype.emptyFunction)(response,response.headerJSON);Ajax.Responders.dispatch('on'+state,this,response,response.headerJSON)}catch(e){this.dispatchException(e)}if(state=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var m=this.url.match(/^\s*https?:\/\/[^\/]*/);return!m||(m[0]=='#{protocol}//#{domain}#{port}'.interpolate({protocol:location.protocol,domain:document.domain,port:location.port?':'+location.port:''}))},getHeader:function(name){try{return this.transport.getResponseHeader(name)||null}catch(e){return null}},evalResponse:function(){try{return eval((this.transport.responseText||'').unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception)}});Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Response=Class.create({initialize:function(request){this.request=request;var transport=this.transport=request.transport,readyState=this.readyState=transport.readyState;if((readyState>2&&!Prototype.Browser.IE)||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(transport.responseText);this.headerJSON=this._getHeaderJSON()}if(readyState==4){var xml=transport.responseXML;this.responseXML=Object.isUndefined(xml)?null:xml;this.responseJSON=this._getResponseJSON()}},status:0,statusText:'',getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||''}catch(e){return''}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(e){return null}},getResponseHeader:function(name){return this.transport.getResponseHeader(name)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var json=this.getHeader('X-JSON');if(!json)return null;json=decodeURIComponent(escape(json));try{return json.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(e){this.request.dispatchException(e)}},_getResponseJSON:function(){var options=this.request.options;if(!options.evalJSON||(options.evalJSON!='force'&&!(this.getHeader('Content-type')||'').include('application/json'))||this.responseText.blank())return null;try{return this.responseText.evalJSON(options.sanitizeJSON||!this.request.isSameOrigin())}catch(e){this.request.dispatchException(e)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))};options=Object.clone(options);var onComplete=options.onComplete;options.onComplete=(function(response,json){this.updateContent(response.responseText);if(Object.isFunction(onComplete))onComplete(response,json)}).bind(this);$super(url,options)},updateContent:function(responseText){var receiver=this.container[this.success()?'success':'failure'],options=this.options;if(!options.evalScripts)responseText=responseText.stripScripts();if(receiver=$(receiver)){if(options.insertion){if(Object.isString(options.insertion)){var insertion={};insertion[options.insertion]=responseText;receiver.insert(insertion)}else options.insertion(receiver,responseText)}else receiver.update(responseText)}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,container,url,options){$super(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(response){if(this.options.decay){this.decay=(response.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=response.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)elements.push($(arguments[i]));return elements}if(Object.isString(element))element=document.getElementById(element);return Element.extend(element)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(expression,parentElement){var results=[];var query=document.evaluate(expression,$(parentElement)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=query.snapshotLength;i<length;i++)results.push(Element.extend(query.snapshotItem(i)));return results}}if(!window.Node)var Node={};if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var element=this.Element;this.Element=function(tagName,attributes){attributes=attributes||{};tagName=tagName.toLowerCase();var cache=Element.cache;if(Prototype.Browser.IE&&attributes.name){tagName='<'+tagName+' name="'+attributes.name+'">';delete attributes.name;return Element.writeAttribute(document.createElement(tagName),attributes)}if(!cache[tagName])cache[tagName]=Element.extend(document.createElement(tagName));return Element.writeAttribute(cache[tagName].cloneNode(false),attributes)};Object.extend(this.Element,element||{});if(element)this.Element.prototype=element.prototype}).call(window);Element.cache={};Element.Methods={visible:function(element){return $(element).style.display!='none'},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element},hide:function(element){element=$(element);element.style.display='none';return element},show:function(element){element=$(element);element.style.display='';return element},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element},update:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content))return element.update().insert(content);content=Object.toHTML(content);element.innerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element},replace:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();else if(!Object.isElement(content)){content=Object.toHTML(content);var range=element.ownerDocument.createRange();range.selectNode(element);content.evalScripts.bind(content).defer();content=range.createContextualFragment(content.stripScripts())}element.parentNode.replaceChild(content,element);return element},insert:function(element,insertions){element=$(element);if(Object.isString(insertions)||Object.isNumber(insertions)||Object.isElement(insertions)||(insertions&&(insertions.toElement||insertions.toHTML)))insertions={bottom:insertions};var content,insert,tagName,childNodes;for(var position in insertions){content=insertions[position];position=position.toLowerCase();insert=Element._insertionTranslations[position];if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){insert(element,content);continue}content=Object.toHTML(content);tagName=((position=='before'||position=='after')?element.parentNode:element).tagName.toUpperCase();childNodes=Element._getContentFromAnonymousElement(tagName,content.stripScripts());if(position=='top'||position=='after')childNodes.reverse();childNodes.each(insert.curry(element));content.evalScripts.bind(content).defer()}return element},wrap:function(element,wrapper,attributes){element=$(element);if(Object.isElement(wrapper))$(wrapper).writeAttribute(attributes||{});else if(Object.isString(wrapper))wrapper=new Element(wrapper,attributes);else wrapper=new Element('div',wrapper);if(element.parentNode)element.parentNode.replaceChild(wrapper,element);wrapper.appendChild(element);return wrapper},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last();var value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true)});return result+'>'},recursivelyCollect:function(element,property){element=$(element);var elements=[];while(element=element[property])if(element.nodeType==1)elements.push(Element.extend(element));return elements},ancestors:function(element){return $(element).recursivelyCollect('parentNode')},descendants:function(element){return $(element).select("*")},firstDescendant:function(element){element=$(element).firstChild;while(element&&element.nodeType!=1)element=element.nextSibling;return $(element)},immediateDescendants:function(element){if(!(element=$(element).firstChild))return[];while(element&&element.nodeType!=1)element=element.nextSibling;if(element)return[element].concat($(element).nextSiblings());return[]},previousSiblings:function(element){return $(element).recursivelyCollect('previousSibling')},nextSiblings:function(element){return $(element).recursivelyCollect('nextSibling')},siblings:function(element){element=$(element);return element.previousSiblings().reverse().concat(element.nextSiblings())},match:function(element,selector){if(Object.isString(selector))selector=new Selector(selector);return selector.match($(element))},up:function(element,expression,index){element=$(element);if(arguments.length==1)return $(element.parentNode);var ancestors=element.ancestors();return Object.isNumber(expression)?ancestors[expression]:Selector.findElement(ancestors,expression,index)},down:function(element,expression,index){element=$(element);if(arguments.length==1)return element.firstDescendant();return Object.isNumber(expression)?element.descendants()[expression]:Element.select(element,expression)[index||0]},previous:function(element,expression,index){element=$(element);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(element));var previousSiblings=element.previousSiblings();return Object.isNumber(expression)?previousSiblings[expression]:Selector.findElement(previousSiblings,expression,index)},next:function(element,expression,index){element=$(element);if(arguments.length==1)return $(Selector.handlers.nextElementSibling(element));var nextSiblings=element.nextSiblings();return Object.isNumber(expression)?nextSiblings[expression]:Selector.findElement(nextSiblings,expression,index)},select:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element,args)},adjacent:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element.parentNode,args).without(element)},identify:function(element){element=$(element);var id=element.readAttribute('id'),self=arguments.callee;if(id)return id;do{id='anonymous_element_'+self.counter++}while($(id));element.writeAttribute('id',id);return id},readAttribute:function(element,name){element=$(element);if(Prototype.Browser.IE){var t=Element._attributeTranslations.read;if(t.values[name])return t.values[name](element,name);if(t.names[name])name=t.names[name];if(name.include(':')){return(!element.attributes||!element.attributes[name])?null:element.attributes[name].value}}return element.getAttribute(name)},writeAttribute:function(element,name,value){element=$(element);var attributes={},t=Element._attributeTranslations.write;if(typeof name=='object')attributes=name;else attributes[name]=Object.isUndefined(value)?true:value;for(var attr in attributes){name=t.names[attr]||attr;value=attributes[attr];if(t.values[attr])name=t.values[attr](element,value);if(value===false||value===null)element.removeAttribute(name);else if(value===true)element.setAttribute(name,name);else element.setAttribute(name,value)}return element},getHeight:function(element){return $(element).getDimensions().height},getWidth:function(element){return $(element).getDimensions().width},classNames:function(element){return new Element.ClassNames(element)},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||new RegExp("(^|\\s)"+className+"(\\s|$)").test(elementClassName)))},addClassName:function(element,className){if(!(element=$(element)))return;if(!element.hasClassName(className))element.className+=(element.className?' ':'')+className;return element},removeClassName:function(element,className){if(!(element=$(element)))return;element.className=element.className.replace(new RegExp("(^|\\s+)"+className+"(\\s+|$)"),' ').strip();return element},toggleClassName:function(element,className){if(!(element=$(element)))return;return element[element.hasClassName(className)?'removeClassName':'addClassName'](className)},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue))element.removeChild(node);node=nextNode}return element},empty:function(element){return $(element).innerHTML.blank()},descendantOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);if(element.compareDocumentPosition)return(element.compareDocumentPosition(ancestor)&8)===8;if(ancestor.contains)return ancestor.contains(element)&&ancestor!==element;while(element=element.parentNode)if(element==ancestor)return true;return false},scrollTo:function(element){element=$(element);var pos=element.cumulativeOffset();window.scrollTo(pos[0],pos[1]);return element},getStyle:function(element,style){element=$(element);style=style=='float'?'cssFloat':style.camelize();var value=element.style[style];if(!value||value=='auto'){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null}if(style=='opacity')return value?parseFloat(value):1.0;return value=='auto'?null:value},getOpacity:function(element){return $(element).getStyle('opacity')},setStyle:function(element,styles){element=$(element);var elementStyle=element.style,match;if(Object.isString(styles)){element.style.cssText+=';'+styles;return styles.include('opacity')?element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]):element}for(var property in styles)if(property=='opacity')element.setOpacity(styles[property]);else elementStyle[(property=='float'||property=='cssFloat')?(Object.isUndefined(elementStyle.styleFloat)?'cssFloat':'styleFloat'):property]=styles[property];return element},setOpacity:function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;return element},getDimensions:function(element){element=$(element);var display=element.getStyle('display');if(display!='none'&&display!=null)return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;els.visibility='hidden';els.position='absolute';els.display='block';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight}},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(Prototype.Browser.Opera){element.style.top=0;element.style.left=0}}return element},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right=''}return element},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=Element.getStyle(element,'overflow')||'auto';if(element._overflow!=='hidden')element.style.overflow='hidden';return element},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element},cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent}while(element);return Element._returnOffset(valueL,valueT)},positionedOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(element.tagName.toUpperCase()=='BODY')break;var p=Element.getStyle(element,'position');if(p!=='static')break}}while(element);return Element._returnOffset(valueL,valueT)},absolutize:function(element){element=$(element);if(element.getStyle('position')=='absolute')return element;var offsets=element.positionedOffset();var top=offsets[1];var left=offsets[0];var width=element.clientWidth;var height=element.clientHeight;element._originalLeft=left-parseFloat(element.style.left||0);element._originalTop=top-parseFloat(element.style.top||0);element._originalWidth=element.style.width;element._originalHeight=element.style.height;element.style.position='absolute';element.style.top=top+'px';element.style.left=left+'px';element.style.width=width+'px';element.style.height=height+'px';return element},relativize:function(element){element=$(element);if(element.getStyle('position')=='relative')return element;element.style.position='relative';var top=parseFloat(element.style.top||0)-(element._originalTop||0);var left=parseFloat(element.style.left||0)-(element._originalLeft||0);element.style.top=top+'px';element.style.left=left+'px';element.style.height=element._originalHeight;element.style.width=element._originalWidth;return element},cumulativeScrollOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode}while(element);return Element._returnOffset(valueL,valueT)},getOffsetParent:function(element){if(element.offsetParent)return $(element.offsetParent);if(element==document.body)return $(element);while((element=element.parentNode)&&element!=document.body)if(Element.getStyle(element,'position')!='static')return $(element);return $(document.body)},viewportOffset:function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body&&Element.getStyle(element,'position')=='absolute')break}while(element=element.offsetParent);element=forElement;do{if(!Prototype.Browser.Opera||(element.tagName&&(element.tagName.toUpperCase()=='BODY'))){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0}}while(element=element.parentNode);return Element._returnOffset(valueL,valueT)},clonePosition:function(element,source){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});source=$(source);var p=source.viewportOffset();element=$(element);var delta=[0,0];var parent=null;if(Element.getStyle(element,'position')=='absolute'){parent=element.getOffsetParent();delta=parent.viewportOffset()}if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop}if(options.setLeft)element.style.left=(p[0]-delta[0]+options.offsetLeft)+'px';if(options.setTop)element.style.top=(p[1]-delta[1]+options.offsetTop)+'px';if(options.setWidth)element.style.width=source.offsetWidth+'px';if(options.setHeight)element.style.height=source.offsetHeight+'px';return element}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:'class',htmlFor:'for'},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(proceed,element,style){switch(style){case'left':case'top':case'right':case'bottom':if(proceed(element,'position')==='static')return null;case'height':case'width':if(!Element.visible(element))return null;var dim=parseInt(proceed(element,style),10);if(dim!==element['offset'+style.capitalize()])return dim+'px';var properties;if(style==='height'){properties=['border-top-width','padding-top','padding-bottom','border-bottom-width']}else{properties=['border-left-width','padding-left','padding-right','border-right-width']}return properties.inject(dim,function(memo,property){var val=proceed(element,property);return val===null?memo:memo-parseInt(val,10)})+'px';default:return proceed(element,style)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(proceed,element,attribute){if(attribute==='title')return element.title;return proceed(element,attribute)})}else if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(proceed,element){element=$(element);try{element.offsetParent}catch(e){return $(document.body)}var position=element.getStyle('position');if(position!=='static')return proceed(element);element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value});$w('positionedOffset viewportOffset').each(function(method){Element.Methods[method]=Element.Methods[method].wrap(function(proceed,element){element=$(element);try{element.offsetParent}catch(e){return Element._returnOffset(0,0)}var position=element.getStyle('position');if(position!=='static')return proceed(element);var offsetParent=element.getOffsetParent();if(offsetParent&&offsetParent.getStyle('position')==='fixed')offsetParent.setStyle({zoom:1});element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(proceed,element){try{element.offsetParent}catch(e){return Element._returnOffset(0,0)}return proceed(element)});Element.Methods.getStyle=function(element,style){element=$(element);style=(style=='float'||style=='cssFloat')?'styleFloat':style.camelize();var value=element.style[style];if(!value&&element.currentStyle)value=element.currentStyle[style];if(style=='opacity'){if(value=(element.getStyle('filter')||'').match(/alpha\(opacity=(.*)\)/))if(value[1])return parseFloat(value[1])/100;return 1.0}if(value=='auto'){if((style=='width'||style=='height')&&(element.getStyle('display')!='none'))return element['offset'+style.capitalize()]+'px';return null}return value};Element.Methods.setOpacity=function(element,value){function stripAlpha(filter){return filter.replace(/alpha\([^\)]*\)/gi,'')}element=$(element);var currentStyle=element.currentStyle;if((currentStyle&&!currentStyle.hasLayout)||(!currentStyle&&element.style.zoom=='normal'))element.style.zoom=1;var filter=element.getStyle('filter'),style=element.style;if(value==1||value===''){(filter=stripAlpha(filter))?style.filter=filter:style.removeAttribute('filter');return element}else if(value<0.00001)value=0;style.filter=stripAlpha(filter)+'alpha(opacity='+(value*100)+')';return element};Element._attributeTranslations={read:{names:{'class':'className','for':'htmlFor'},values:{_getAttr:function(element,attribute){return element.getAttribute(attribute,2)},_getAttrNode:function(element,attribute){var node=element.getAttributeNode(attribute);return node?node.value:""},_getEv:function(element,attribute){attribute=element.getAttribute(attribute);return attribute?attribute.toString().slice(23,-2):null},_flag:function(element,attribute){return $(element).hasAttribute(attribute)?attribute:null},style:function(element){return element.style.cssText.toLowerCase()},title:function(element){return element.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:'cellPadding',cellspacing:'cellSpacing'},Element._attributeTranslations.read.names),values:{checked:function(element,value){element.checked=!!value},style:function(element,value){element.style.cssText=value?value:''}}};Element._attributeTranslations.has={};$w('colSpan rowSpan vAlign dateTime accessKey tabIndex '+'encType maxLength readOnly longDesc frameBorder').each(function(attr){Element._attributeTranslations.write.names[attr.toLowerCase()]=attr;Element._attributeTranslations.has[attr.toLowerCase()]=attr});(function(v){Object.extend(v,{href:v._getAttr,src:v._getAttr,type:v._getAttr,action:v._getAttrNode,disabled:v._flag,checked:v._flag,readonly:v._flag,multiple:v._flag,onload:v._getEv,onunload:v._getEv,onclick:v._getEv,ondblclick:v._getEv,onmousedown:v._getEv,onmouseup:v._getEv,onmouseover:v._getEv,onmousemove:v._getEv,onmouseout:v._getEv,onfocus:v._getEv,onblur:v._getEv,onkeypress:v._getEv,onkeydown:v._getEv,onkeyup:v._getEv,onsubmit:v._getEv,onreset:v._getEv,onselect:v._getEv,onchange:v._getEv})})(Element._attributeTranslations.read.values)}else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1)?0.999999:(value==='')?'':(value<0.00001)?0:value;return element}}else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;if(value==1)if(element.tagName.toUpperCase()=='IMG'&&element.width){element.width++;element.width--}else try{var n=document.createTextNode(' ');element.appendChild(n);element.removeChild(n)}catch(e){}return element};Element.Methods.cumulativeOffset=function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)if(Element.getStyle(element,'position')=='absolute')break;element=element.offsetParent}while(element);return Element._returnOffset(valueL,valueT)}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content))return element.update().insert(content);content=Object.toHTML(content);var tagName=element.tagName.toUpperCase();if(tagName in Element._insertionTranslations.tags){$A(element.childNodes).each(function(node){element.removeChild(node)});Element._getContentFromAnonymousElement(tagName,content.stripScripts()).each(function(node){element.appendChild(node)})}else element.innerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element}}if('outerHTML'in document.createElement('div')){Element.Methods.replace=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){element.parentNode.replaceChild(content,element);return element}content=Object.toHTML(content);var parent=element.parentNode,tagName=parent.tagName.toUpperCase();if(Element._insertionTranslations.tags[tagName]){var nextSibling=element.next();var fragments=Element._getContentFromAnonymousElement(tagName,content.stripScripts());parent.removeChild(element);if(nextSibling)fragments.each(function(node){parent.insertBefore(node,nextSibling)});else fragments.each(function(node){parent.appendChild(node)})}else element.outerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element}}Element._returnOffset=function(l,t){var result=[l,t];result.left=l;result.top=t;return result};Element._getContentFromAnonymousElement=function(tagName,html){var div=new Element('div'),t=Element._insertionTranslations.tags[tagName];if(t){div.innerHTML=t[0]+html+t[1];t[2].times(function(){div=div.firstChild})}else div.innerHTML=html;return $A(div.childNodes)};Element._insertionTranslations={before:function(element,node){element.parentNode.insertBefore(node,element)},top:function(element,node){element.insertBefore(node,element.firstChild)},bottom:function(element,node){element.appendChild(node)},after:function(element,node){element.parentNode.insertBefore(node,element.nextSibling)},tags:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(element,attribute){attribute=Element._attributeTranslations.has[attribute]||attribute;var node=$(element).getAttributeNode(attribute);return!!(node&&node.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement('div')['__proto__']){window.HTMLElement={};window.HTMLElement.prototype=document.createElement('div')['__proto__'];Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions)return Prototype.K;var Methods={},ByTag=Element.Methods.ByTag;var extend=Object.extend(function(element){if(!element||element._extendedByPrototype||element.nodeType!=1||element==window)return element;var methods=Object.clone(Methods),tagName=element.tagName.toUpperCase(),property,value;if(ByTag[tagName])Object.extend(methods,ByTag[tagName]);for(property in methods){value=methods[property];if(Object.isFunction(value)&&!(property in element))element[property]=value.methodize()}element._extendedByPrototype=Prototype.emptyFunction;return element},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(Methods,Element.Methods);Object.extend(Methods,Element.Methods.Simulated)}}});extend.refresh();return extend})();Element.hasAttribute=function(element,attribute){if(element.hasAttribute)return element.hasAttribute(attribute);return Element.Methods.Simulated.hasAttribute(element,attribute)};Element.addMethods=function(methods){var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;if(!methods){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods)})}if(arguments.length==2){var tagName=methods;methods=arguments[1]}if(!tagName)Object.extend(Element.Methods,methods||{});else{if(Object.isArray(tagName))tagName.each(extend);else extend(tagName)}function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag[tagName])Element.Methods.ByTag[tagName]={};Object.extend(Element.Methods.ByTag[tagName],methods)}function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;for(var property in methods){var value=methods[property];if(!Object.isFunction(value))continue;if(!onlyIfAbsent||!(property in destination))destination[property]=value.methodize()}}function findDOMClass(tagName){var klass;var trans={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(trans[tagName])klass='HTML'+trans[tagName]+'Element';if(window[klass])return window[klass];klass='HTML'+tagName+'Element';if(window[klass])return window[klass];klass='HTML'+tagName.capitalize()+'Element';if(window[klass])return window[klass];window[klass]={};window[klass].prototype=document.createElement(tagName)['__proto__'];return window[klass]}if(F.ElementExtensions){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true)}if(F.SpecificElementExtensions){for(var tag in Element.Methods.ByTag){var klass=findDOMClass(tag);if(Object.isUndefined(klass))continue;copy(T[tag],klass.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh)Element.extend.refresh();Element.cache={}};document.viewport={getDimensions:function(){var dimensions={},B=Prototype.Browser;$w('width height').each(function(d){var D=d.capitalize();if(B.WebKit&&!document.evaluate){dimensions[d]=self['inner'+D]}else if(B.Opera&&parseFloat(window.opera.version())<9.5){dimensions[d]=document.body['client'+D]}else{dimensions[d]=document.documentElement['client'+D]}});return dimensions},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(expression){this.expression=expression.strip();if(this.shouldUseSelectorsAPI()){this.mode='selectorsAPI'}else if(this.shouldUseXPath()){this.mode='xpath';this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath)return false;var e=this.expression;if(Prototype.Browser.WebKit&&(e.include("-of-type")||e.include(":empty")))return false;if((/(\[[\w-]*?:|:checked)/).test(e))return false;return true},shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI)return false;if(!Selector._div)Selector._div=new Element('div');try{Selector._div.querySelector(this.expression)}catch(e){return false}return true},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],'');break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join('\n'));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var e=this.expression,ps=Selector.patterns,x=Selector.xpath,le,m;if(Selector._cache[e]){this.xpath=Selector._cache[e];return}this.matcher=['.//*'];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){if(m=e.match(ps[i])){this.matcher.push(Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m));e=e.replace(m[0],'');break}}}this.xpath=this.matcher.join('');Selector._cache[this.expression]=this.xpath},findElements:function(root){root=root||document;var e=this.expression,results;switch(this.mode){case'selectorsAPI':if(root!==document){var oldId=root.id,id=$(root).identify();e="#"+id+" "+e}results=$A(root.querySelectorAll(e)).map(Element.extend);root.id=oldId;return results;case'xpath':return document._getElementsByXPath(this.xpath,root);default:return this.matcher(root)}},match:function(element){this.tokens=[];var e=this.expression,ps=Selector.patterns,as=Selector.assertions;var le,p,m;while(e&&le!==e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){if(as[i]){this.tokens.push([i,Object.clone(m)]);e=e.replace(m[0],'')}else{return this.findElements(document).include(element)}}}}var match=true,name,matches;for(var i=0,token;token=this.tokens[i];i++){name=token[0],matches=token[1];if(!Selector.assertions[name](element,matches)){match=false;break}}return match},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:'/following-sibling::*',tagName:function(m){if(m[1]=='*')return'';return"[local-name()='"+m[1].toLowerCase()+"' or local-name()='"+m[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(m){m[1]=m[1].toLowerCase();return new Template("[@#{1}]").evaluate(m)},attr:function(m){m[1]=m[1].toLowerCase();m[3]=m[5]||m[6];return new Template(Selector.xpath.operators[m[2]]).evaluate(m)},pseudo:function(m){var h=Selector.xpath.pseudos[m[1]];if(!h)return'';if(Object.isFunction(h))return h(m);return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m)},operators:{'=':"[@#{1}='#{3}']",'!=':"[@#{1}!='#{3}']",'^=':"[starts-with(@#{1}, '#{3}')]",'$=':"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",'*=':"[contains(@#{1}, '#{3}')]",'~=':"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",'|=':"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{'first-child':'[not(preceding-sibling::*)]','last-child':'[not(following-sibling::*)]','only-child':'[not(preceding-sibling::* or following-sibling::*)]','empty':"[count(*) = 0 and (count(text()) = 0)]",'checked':"[@checked]",'disabled':"[(@disabled) and (@type!='hidden')]",'enabled':"[not(@disabled) and (@type!='hidden')]",'not':function(m){var e=m[6],p=Selector.patterns,x=Selector.xpath,le,v;var exclusion=[];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in p){if(m=e.match(p[i])){v=Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m);exclusion.push("("+v.substring(1,v.length-1)+")");e=e.replace(m[0],'');break}}}return"[not("+exclusion.join(" and ")+")]"},'nth-child':function(m){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",m)},'nth-last-child':function(m){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",m)},'nth-of-type':function(m){return Selector.xpath.pseudos.nth("position() ",m)},'nth-last-of-type':function(m){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",m)},'first-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-of-type'](m)},'last-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-last-of-type'](m)},'only-of-type':function(m){var p=Selector.xpath.pseudos;return p['first-of-type'](m)+p['last-of-type'](m)},nth:function(fragment,m){var mm,formula=m[6],predicate;if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';if(mm=formula.match(/^(\d+)$/))return'['+fragment+"= "+mm[1]+']';if(mm=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(mm[1]=="-")mm[1]=-1;var a=mm[1]?Number(mm[1]):1;var b=mm[2]?Number(mm[2]):0;predicate="[((#{fragment} - #{b}) mod #{a} = 0) and "+"((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(predicate).evaluate({fragment:fragment,a:a,b:b})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(m){m[3]=(m[5]||m[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m)},pseudo:function(m){if(m[6])m[6]=m[6].replace(/"/g,'\\"');return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[((?:[\w]+:)?[\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(element,matches){return matches[1].toUpperCase()==element.tagName.toUpperCase()},className:function(element,matches){return Element.hasClassName(element,matches[1])},id:function(element,matches){return element.id===matches[1]},attrPresence:function(element,matches){return Element.hasAttribute(element,matches[1])},attr:function(element,matches){var nodeValue=Element.readAttribute(element,matches[1]);return nodeValue&&Selector.operators[matches[2]](nodeValue,matches[5]||matches[6])}},handlers:{concat:function(a,b){for(var i=0,node;node=b[i];i++)a.push(node);return a},mark:function(nodes){var _true=Prototype.emptyFunction;for(var i=0,node;node=nodes[i];i++)node._countedByPrototype=_true;return nodes},unmark:function(nodes){for(var i=0,node;node=nodes[i];i++)node._countedByPrototype=undefined;return nodes},index:function(parentNode,reverse,ofType){parentNode._countedByPrototype=Prototype.emptyFunction;if(reverse){for(var nodes=parentNode.childNodes,i=nodes.length-1,j=1;i>=0;i--){var node=nodes[i];if(node.nodeType==1&&(!ofType||node._countedByPrototype))node.nodeIndex=j++}}else{for(var i=0,j=1,nodes=parentNode.childNodes;node=nodes[i];i++)if(node.nodeType==1&&(!ofType||node._countedByPrototype))node.nodeIndex=j++}},unique:function(nodes){if(nodes.length==0)return nodes;var results=[],n;for(var i=0,l=nodes.length;i<l;i++)if(!(n=nodes[i])._countedByPrototype){n._countedByPrototype=Prototype.emptyFunction;results.push(Element.extend(n))}return Selector.handlers.unmark(results)},descendant:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++)h.concat(results,node.getElementsByTagName('*'));return results},child:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++){for(var j=0,child;child=node.childNodes[j];j++)if(child.nodeType==1&&child.tagName!='!')results.push(child)}return results},adjacent:function(nodes){for(var i=0,results=[],node;node=nodes[i];i++){var next=this.nextElementSibling(node);if(next)results.push(next)}return results},laterSibling:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++)h.concat(results,Element.nextSiblings(node));return results},nextElementSibling:function(node){while(node=node.nextSibling)if(node.nodeType==1)return node;return null},previousElementSibling:function(node){while(node=node.previousSibling)if(node.nodeType==1)return node;return null},tagName:function(nodes,root,tagName,combinator){var uTagName=tagName.toUpperCase();var results=[],h=Selector.handlers;if(nodes){if(combinator){if(combinator=="descendant"){for(var i=0,node;node=nodes[i];i++)h.concat(results,node.getElementsByTagName(tagName));return results}else nodes=this[combinator](nodes);if(tagName=="*")return nodes}for(var i=0,node;node=nodes[i];i++)if(node.tagName.toUpperCase()===uTagName)results.push(node);return results}else return root.getElementsByTagName(tagName)},id:function(nodes,root,id,combinator){var targetNode=$(id),h=Selector.handlers;if(!targetNode)return[];if(!nodes&&root==document)return[targetNode];if(nodes){if(combinator){if(combinator=='child'){for(var i=0,node;node=nodes[i];i++)if(targetNode.parentNode==node)return[targetNode]}else if(combinator=='descendant'){for(var i=0,node;node=nodes[i];i++)if(Element.descendantOf(targetNode,node))return[targetNode]}else if(combinator=='adjacent'){for(var i=0,node;node=nodes[i];i++)if(Selector.handlers.previousElementSibling(targetNode)==node)return[targetNode]}else nodes=h[combinator](nodes)}for(var i=0,node;node=nodes[i];i++)if(node==targetNode)return[targetNode];return[]}return(targetNode&&Element.descendantOf(targetNode,root))?[targetNode]:[]},className:function(nodes,root,className,combinator){if(nodes&&combinator)nodes=this[combinator](nodes);return Selector.handlers.byClassName(nodes,root,className)},byClassName:function(nodes,root,className){if(!nodes)nodes=Selector.handlers.descendant([root]);var needle=' '+className+' ';for(var i=0,results=[],node,nodeClassName;node=nodes[i];i++){nodeClassName=node.className;if(nodeClassName.length==0)continue;if(nodeClassName==className||(' '+nodeClassName+' ').include(needle))results.push(node)}return results},attrPresence:function(nodes,root,attr,combinator){if(!nodes)nodes=root.getElementsByTagName("*");if(nodes&&combinator)nodes=this[combinator](nodes);var results=[];for(var i=0,node;node=nodes[i];i++)if(Element.hasAttribute(node,attr))results.push(node);return results},attr:function(nodes,root,attr,value,operator,combinator){if(!nodes)nodes=root.getElementsByTagName("*");if(nodes&&combinator)nodes=this[combinator](nodes);var handler=Selector.operators[operator],results=[];for(var i=0,node;node=nodes[i];i++){var nodeValue=Element.readAttribute(node,attr);if(nodeValue===null)continue;if(handler(nodeValue,value))results.push(node)}return results},pseudo:function(nodes,name,value,root,combinator){if(nodes&&combinator)nodes=this[combinator](nodes);if(!nodes)nodes=root.getElementsByTagName("*");return Selector.pseudos[name](nodes,value,root)}},pseudos:{'first-child':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(Selector.handlers.previousElementSibling(node))continue;results.push(node)}return results},'last-child':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(Selector.handlers.nextElementSibling(node))continue;results.push(node)}return results},'only-child':function(nodes,value,root){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++)if(!h.previousElementSibling(node)&&!h.nextElementSibling(node))results.push(node);return results},'nth-child':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root)},'nth-last-child':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,true)},'nth-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,false,true)},'nth-last-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,true,true)},'first-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,"1",root,false,true)},'last-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,"1",root,true,true)},'only-of-type':function(nodes,formula,root){var p=Selector.pseudos;return p['last-of-type'](p['first-of-type'](nodes,formula,root),formula,root)},getIndices:function(a,b,total){if(a==0)return b>0?[b]:[];return $R(1,total).inject([],function(memo,i){if(0==(i-b)%a&&(i-b)/a>=0)memo.push(i);return memo})},nth:function(nodes,formula,root,reverse,ofType){if(nodes.length==0)return[];if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';var h=Selector.handlers,results=[],indexed=[],m;h.mark(nodes);for(var i=0,node;node=nodes[i];i++){if(!node.parentNode._countedByPrototype){h.index(node.parentNode,reverse,ofType);indexed.push(node.parentNode)}}if(formula.match(/^\d+$/)){formula=Number(formula);for(var i=0,node;node=nodes[i];i++)if(node.nodeIndex==formula)results.push(node)}else if(m=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(m[1]=="-")m[1]=-1;var a=m[1]?Number(m[1]):1;var b=m[2]?Number(m[2]):0;var indices=Selector.pseudos.getIndices(a,b,nodes.length);for(var i=0,node,l=indices.length;node=nodes[i];i++){for(var j=0;j<l;j++)if(node.nodeIndex==indices[j])results.push(node)}}h.unmark(nodes);h.unmark(indexed);return results},'empty':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(node.tagName=='!'||node.firstChild)continue;results.push(node)}return results},'not':function(nodes,selector,root){var h=Selector.handlers,selectorType,m;var exclusions=new Selector(selector).findElements(root);h.mark(exclusions);for(var i=0,results=[],node;node=nodes[i];i++)if(!node._countedByPrototype)results.push(node);h.unmark(exclusions);return results},'enabled':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++)if(!node.disabled&&(!node.type||node.type!=='hidden'))results.push(node);return results},'disabled':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++)if(node.disabled)results.push(node);return results},'checked':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++)if(node.checked)results.push(node);return results}},operators:{'=':function(nv,v){return nv==v},'!=':function(nv,v){return nv!=v},'^=':function(nv,v){return nv==v||nv&&nv.startsWith(v)},'$=':function(nv,v){return nv==v||nv&&nv.endsWith(v)},'*=':function(nv,v){return nv==v||nv&&nv.include(v)},'$=':function(nv,v){return nv.endsWith(v)},'*=':function(nv,v){return nv.include(v)},'~=':function(nv,v){return(' '+nv+' ').include(' '+v+' ')},'|=':function(nv,v){return('-'+(nv||"").toUpperCase()+'-').include('-'+(v||"").toUpperCase()+'-')}},split:function(expression){var expressions=[];expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(m){expressions.push(m[1].strip())});return expressions},matchElements:function(elements,expression){var matches=$$(expression),h=Selector.handlers;h.mark(matches);for(var i=0,results=[],element;element=elements[i];i++)if(element._countedByPrototype)results.push(element);h.unmark(matches);return results},findElement:function(elements,expression,index){if(Object.isNumber(expression)){index=expression;expression=false}return Selector.matchElements(elements,expression||'*')[index||0]},findChildElements:function(element,expressions){expressions=Selector.split(expressions.join(','));var results=[],h=Selector.handlers;for(var i=0,l=expressions.length,selector;i<l;i++){selector=new Selector(expressions[i].strip());h.concat(results,selector.findElements(element))}return(l>1)?h.unique(results):results}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(a,b){for(var i=0,node;node=b[i];i++)if(node.tagName!=="!")a.push(node);return a},unmark:function(nodes){for(var i=0,node;node=nodes[i];i++)node.removeAttribute('_countedByPrototype');return nodes}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(form){$(form).reset();return form},serializeElements:function(elements,options){if(typeof options!='object')options={hash:!!options};else if(Object.isUndefined(options.hash))options.hash=true;var key,value,submitted=false,submit=options.submit;var data=elements.inject({},function(result,element){if(!element.disabled&&element.name){key=element.name;value=$(element).getValue();if(value!=null&&element.type!='file'&&(element.type!='submit'||(!submitted&&submit!==false&&(!submit||key==submit)&&(submitted=true)))){if(key in result){if(!Object.isArray(result[key]))result[key]=[result[key]];result[key].push(value)}else result[key]=value}}return result});return options.hash?data:Object.toQueryString(data)}};Form.Methods={serialize:function(form,options){return Form.serializeElements(Form.getElements(form),options)},getElements:function(form){return $A($(form).getElementsByTagName('*')).inject([],function(elements,child){if(Form.Element.Serializers[child.tagName.toLowerCase()])elements.push(Element.extend(child));return elements})},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs=[],length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name))continue;matchingInputs.push(Element.extend(input))}return matchingInputs},disable:function(form){form=$(form);Form.getElements(form).invoke('disable');return form},enable:function(form){form=$(form);Form.getElements(form).invoke('enable');return form},findFirstElement:function(form){var elements=$(form).getElements().findAll(function(element){return'hidden'!=element.type&&!element.disabled});var firstByIndex=elements.findAll(function(element){return element.hasAttribute('tabIndex')&&element.tabIndex>=0}).sortBy(function(element){return element.tabIndex}).first();return firstByIndex?firstByIndex:elements.find(function(element){return['input','select','textarea'].include(element.tagName.toLowerCase())})},focusFirstElement:function(form){form=$(form);form.findFirstElement().activate();return form},request:function(form,options){form=$(form),options=Object.clone(options||{});var params=options.parameters,action=form.readAttribute('action')||'';if(action.blank())action=window.location.href;options.parameters=form.serialize(true);if(params){if(Object.isString(params))params=params.toQueryParams();Object.extend(options.parameters,params)}if(form.hasAttribute('method')&&!options.method)options.method=form.method;return new Ajax.Request(action,options)}};Form.Element={focus:function(element){$(element).focus();return element},select:function(element){$(element).select();return element}};Form.Element.Methods={serialize:function(element){element=$(element);if(!element.disabled&&element.name){var value=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;return Object.toQueryString(pair)}}return''},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();return Form.Element.Serializers[method](element)},setValue:function(element,value){element=$(element);var method=element.tagName.toLowerCase();Form.Element.Serializers[method](element,value);return element},clear:function(element){$(element).value='';return element},present:function(element){return $(element).value!=''},activate:function(element){element=$(element);try{element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!['button','reset','submit'].include(element.type)))element.select()}catch(e){}return element},disable:function(element){element=$(element);element.disabled=true;return element},enable:function(element){element=$(element);element.disabled=false;return element}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(element,value){switch(element.type.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inputSelector(element,value);default:return Form.Element.Serializers.textarea(element,value)}},inputSelector:function(element,value){if(Object.isUndefined(value))return element.checked?element.value:null;else element.checked=!!value},textarea:function(element,value){if(Object.isUndefined(value))return element.value;else element.value=value},select:function(element,value){if(Object.isUndefined(value))return this[element.type=='select-one'?'selectOne':'selectMany'](element);else{var opt,currentValue,single=!Object.isArray(value);for(var i=0,length=element.length;i<length;i++){opt=element.options[i];currentValue=this.optionValue(opt);if(single){if(currentValue==value){opt.selected=true;return}}else opt.selected=value.include(currentValue)}}},selectOne:function(element){var index=element.selectedIndex;return index>=0?this.optionValue(element.options[index]):null},selectMany:function(element){var values,length=element.length;if(!length)return null;for(var i=0,values=[];i<length;i++){var opt=element.options[i];if(opt.selected)values.push(this.optionValue(opt))}return values},optionValue:function(opt){return Element.extend(opt).hasAttribute('value')?opt.value:opt.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,element,frequency,callback){$super(callback,frequency);this.element=$(element);this.lastValue=this.getValue()},execute:function(){var value=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(value)?this.lastValue!=value:String(this.lastValue)!=String(value)){this.callback(this.element,value);this.lastValue=value}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form')this.registerFormCallbacks();else this.registerCallback(this.element)},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case'checkbox':case'radio':Event.observe(element,'click',this.onElementEvent.bind(this));break;default:Event.observe(element,'change',this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event)var Event={};Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(event){var element;switch(event.type){case'mouseover':element=event.fromElement;break;case'mouseout':element=event.toElement;break;default:return null}return Element.extend(element)}});Event.Methods=(function(){var isButton;if(Prototype.Browser.IE){var buttonMap={0:1,1:4,2:2};isButton=function(event,code){return event.button==buttonMap[code]}}else if(Prototype.Browser.WebKit){isButton=function(event,code){switch(code){case 0:return event.which==1&&!event.metaKey;case 1:return event.which==1&&event.metaKey;default:return false}}}else{isButton=function(event,code){return event.which?(event.which===code+1):(event.button===code)}}return{isLeftClick:function(event){return isButton(event,0)},isMiddleClick:function(event){return isButton(event,1)},isRightClick:function(event){return isButton(event,2)},element:function(event){event=Event.extend(event);var node=event.target,type=event.type,currentTarget=event.currentTarget;if(currentTarget&&currentTarget.tagName){if(type==='load'||type==='error'||(type==='click'&&currentTarget.tagName.toLowerCase()==='input'&&currentTarget.type==='radio'))node=currentTarget}if(node.nodeType==Node.TEXT_NODE)node=node.parentNode;return Element.extend(node)},findElement:function(event,expression){var element=Event.element(event);if(!expression)return element;var elements=[element].concat(element.ancestors());return Selector.findElement(elements,expression,0)},pointer:function(event){var docElement=document.documentElement,body=document.body||{scrollLeft:0,scrollTop:0};return{x:event.pageX||(event.clientX+(docElement.scrollLeft||body.scrollLeft)-(docElement.clientLeft||0)),y:event.pageY||(event.clientY+(docElement.scrollTop||body.scrollTop)-(docElement.clientTop||0))}},pointerX:function(event){return Event.pointer(event).x},pointerY:function(event){return Event.pointer(event).y},stop:function(event){Event.extend(event);event.preventDefault();event.stopPropagation();event.stopped=true}}})();Event.extend=(function(){var methods=Object.keys(Event.Methods).inject({},function(m,name){m[name]=Event.Methods[name].methodize();return m});if(Prototype.Browser.IE){Object.extend(methods,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(event){if(!event)return false;if(event._extendedByPrototype)return event;event._extendedByPrototype=Prototype.emptyFunction;var pointer=Event.pointer(event);Object.extend(event,{target:event.srcElement,relatedTarget:Event.relatedTarget(event),pageX:pointer.x,pageY:pointer.y});return Object.extend(event,methods)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents")['__proto__'];Object.extend(Event.prototype,methods);return Prototype.K}})();Object.extend(Event,(function(){var cache=Event.cache;function getEventID(element){if(element._prototypeEventID)return element._prototypeEventID[0];arguments.callee.id=arguments.callee.id||1;return element._prototypeEventID=[++arguments.callee.id]}function getDOMEventName(eventName){if(eventName&&eventName.include(':'))return"dataavailable";return eventName}function getCacheForID(id){return cache[id]=cache[id]||{}}function getWrappersForEventName(id,eventName){var c=getCacheForID(id);return c[eventName]=c[eventName]||[]}function createWrapper(element,eventName,handler){var id=getEventID(element);var c=getWrappersForEventName(id,eventName);if(c.pluck("handler").include(handler))return false;var wrapper=function(event){if(!Event||!Event.extend||(event.eventName&&event.eventName!=eventName))return false;Event.extend(event);handler.call(element,event)};wrapper.handler=handler;c.push(wrapper);return wrapper}function findWrapper(id,eventName,handler){var c=getWrappersForEventName(id,eventName);return c.find(function(wrapper){return wrapper.handler==handler})}function destroyWrapper(id,eventName,handler){var c=getCacheForID(id);if(!c[eventName])return false;c[eventName]=c[eventName].without(findWrapper(id,eventName,handler))}function destroyCache(){for(var id in cache)for(var eventName in cache[id])cache[id][eventName]=null}if(window.attachEvent){window.attachEvent("onunload",destroyCache)}if(Prototype.Browser.WebKit){window.addEventListener('unload',Prototype.emptyFunction,false)}return{observe:function(element,eventName,handler){element=$(element);var name=getDOMEventName(eventName);var wrapper=createWrapper(element,eventName,handler);if(!wrapper)return element;if(element.addEventListener){element.addEventListener(name,wrapper,false)}else{element.attachEvent("on"+name,wrapper)}return element},stopObserving:function(element,eventName,handler){element=$(element);var id=getEventID(element),name=getDOMEventName(eventName);if(!handler&&eventName){getWrappersForEventName(id,eventName).each(function(wrapper){element.stopObserving(eventName,wrapper.handler)});return element}else if(!eventName){Object.keys(getCacheForID(id)).each(function(eventName){element.stopObserving(eventName)});return element}var wrapper=findWrapper(id,eventName,handler);if(!wrapper)return element;if(element.removeEventListener){element.removeEventListener(name,wrapper,false)}else{element.detachEvent("on"+name,wrapper)}destroyWrapper(id,eventName,handler);return element},fire:function(element,eventName,memo){element=$(element);if(element==document&&document.createEvent&&!element.dispatchEvent)element=document.documentElement;var event;if(document.createEvent){event=document.createEvent("HTMLEvents");event.initEvent("dataavailable",true,true)}else{event=document.createEventObject();event.eventType="ondataavailable"}event.eventName=eventName;event.memo=memo||{};if(document.createEvent){element.dispatchEvent(event)}else{element.fireEvent(event.eventType,event)}return Event.extend(event)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var timer;function fireContentLoadedEvent(){if(document.loaded)return;if(timer)window.clearInterval(timer);document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){timer=window.setInterval(function(){if(/loaded|complete/.test(document.readyState))fireContentLoadedEvent()},0);Event.observe(window,"load",fireContentLoadedEvent)}else{document.addEventListener("DOMContentLoaded",fireContentLoadedEvent,false)}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;fireContentLoadedEvent()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(element,content){return Element.insert(element,{before:content})},Top:function(element,content){return Element.insert(element,{top:content})},Bottom:function(element,content){return Element.insert(element,{bottom:content})},After:function(element,content){return Element.insert(element,{after:content})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(element,x,y){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=Element.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth)},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=Element.cumulativeScrollOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=Element.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth)},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical')return((this.offset[1]+element.offsetHeight)-this.ycomp)/element.offsetHeight;if(mode=='horizontal')return((this.offset[0]+element.offsetWidth)-this.xcomp)/element.offsetWidth},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(element){Position.prepare();return Element.absolutize(element)},relativize:function(element){Position.prepare();return Element.relativize(element)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(source,target,options){options=options||{};return Element.clonePosition(target,source,options)}};if(!document.getElementsByClassName)document.getElementsByClassName=function(instanceMethods){function iter(name){return name.blank()?null:"[contains(concat(' ', @class, ' '), ' "+name+" ')]"}instanceMethods.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(element,className){className=className.toString().strip();var cond=/\s/.test(className)?$w(className).map(iter).join(''):iter(className);return cond?document._getElementsByXPath('.//*'+cond,element):[]}:function(element,className){className=className.toString().strip();var elements=[],classNames=(/\s/.test(className)?$w(className):null);if(!classNames&&!className)return elements;var nodes=$(element).getElementsByTagName('*');className=' '+className+' ';for(var i=0,child,cn;child=nodes[i];i++){if(child.className&&(cn=' '+child.className+' ')&&(cn.include(className)||(classNames&&classNames.all(function(name){return!name.toString().blank()&&cn.include(' '+name+' ')}))))elements.push(Element.extend(child))}return elements};return function(className,parentElement){return $(parentElement||document.body).getElementsByClassName(className)}}(Element.Methods);Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element)},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0})._each(iterator)},set:function(className){this.element.className=className},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '))},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '))},toString:function(){return $A(this).join(' ')}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();Observable = Class.create();  Observable.prototype = {  initialize: function() {  this.state = false;  this.eventLists = new Object();  },        checkObserverEventExist: function(observer, eventName ){  var k = undefined;  for( functionName in observer ){  if( functionName.toLowerCase() == eventName.toLowerCase() ){  k = observer[functionName];  break;  }  }  return k;  },    checkEventNameExist: function(eventName){  var exists = false;  for( k in this.eventLists ){  if( k.toLowerCase() == eventName.toLowerCase() ){  exists = true;  break;  }  }  return exists;  },    setChanged: function (){  this.state = true;  },    clearChanged: function (){  this.state = false;  },    hasChanged: function(){  return this.state;  },    registerObserver: function(observer, eventName){  if( typeof observer != 'object' || typeof this.checkObserverEventExist(observer, eventName ) != 'function' )  throw "Observable.js The Observer object must implement the '"+ eventName.toString() +"( params )' function to be notified when the '"+ eventName.toString() +"' event occurs.";  if( !this.checkEventNameExist("TT_"+ eventName ) ){  this.eventLists["TT_"+ eventName] = new Array();  }  var len = this.eventLists["TT_"+ eventName].length;  this.eventLists["TT_"+ eventName][len] = observer ;  },    unRegisterObserver: function(observer, eventName){  var success = false;  if( this.checkEventNameExist("TT_"+ eventName ) ){  for(var i=0;i<this.eventLists[ "TT_"+ eventName].length;i++){  if(observer == this.eventLists[ "TT_"+ eventName][i]){  this.eventLists[ "TT_"+ eventName][i] = null;  success = true;  break;  }  }  }  return success;  },    unRegisterAllObserver: function(){  this.eventLists = [];  },    notifyObservers: function(eventName, msg){  var el = null;  if( this.checkEventNameExist("TT_"+ eventName) ){  for( var i=0; i < this.eventLists[ "TT_"+ eventName].length; i++){  if( this.eventLists["TT_"+ eventName][i] != null ){  try{  el = this.eventLists["TT_"+ eventName ][i];  var callbackFunction = "el." + eventName + "(msg)" ; eval(callbackFunction);  }catch( e ){  var msg = "Observable.js  notifyObservers" + e.toString();    }  }  }  }  },    notifyAllObservers: function( msg ){  var el = null;  for(eventType in this.eventLists){  for( var i=0; i < this.eventLists[eventType].length; i++){  if( this.eventLists[eventType][i] != null ){  try{  el = this.eventLists[eventType][i];  var eventName = eventType.replace("TT_","");  var callbackFunction = "el." + eventName + "(msg)";  eval(callbackFunction);  }catch( e ){  var msg = "Observable.js notifyAllObservers";  alert(msg);  }  }  }  }  },    deleteObservers: function(){  this.eventList = null;  this.eventList = new Object();  },    getEventNameArray: function(){  var eventNames = new Array();  for( evnts in this.eventLists )  eventNames.push( evnts );  return eventNames;  },    getEventNameListSizeArray: function(){  var eventSizes = new Array();  for( evnts in this.eventLists )  eventSizes.push( this.eventList[evnts].length );  return eventSizes;  }  };TT_MetaDictionary = Class.create();  TT_MetaDictionary.prototype = {  initialize: function() {    this.tt_convertLang();    this.tt_convertCSS_IE();    this.metadicSearch = $('metadicSearch') ;  this.Advanced_DE_VI = $('Advanced_DE_VI') ;  this.inputWord = $('inputWord');  this.tt_MetaDictionaryModel = new TT_MetaDictionaryModel();  this.handleOnClickMetadicSearch = this.handleOnClickMetadicSearch.bindAsEventListener(this);  Event.observe(this.metadicSearch, 'click', this.handleOnClickMetadicSearch, false );  this.handleOnClickAdvanced_DE_VI = this.handleOnClickAdvanced_DE_VI.bindAsEventListener(this);  Event.observe(this.Advanced_DE_VI, 'click', this.handleOnClickAdvanced_DE_VI, false );  this.handleonkeydown = this.handleonkeydown.bindAsEventListener(this);  Event.observe(this.inputWord, 'keydown', this.handleonkeydown, false );  this.handleOnChenge = this.handleOnChenge.bindAsEventListener(this);  Event.observe($("Dict_kind"), 'change', this.handleOnChenge, false );  this.onclickCheckAll = this.onclickCheckAll.bindAsEventListener(this);  Event.observe($("checkall_DIC_LEO"), 'click', this.onclickCheckAll, false );  Event.observe($("checkall_wiki"), 'click', this.onclickCheckAll, false );  this.onClickLabel_Wiki = this.onClickLabel_Wiki.bindAsEventListener(this);  this.onClickLabel_Dicleo = this.onClickLabel_Dicleo.bindAsEventListener(this);  this.onMouseMoveSearch = this.onMouseMoveSearch.bindAsEventListener(this);  this.onMouseOutSearch = this.onMouseOutSearch.bindAsEventListener(this);  Event.observe($('metadicSearch'), 'mousemove', this.onMouseMoveSearch, false );  Event.observe($('metadicSearch'), 'mouseout', this.onMouseOutSearch, false );    for(var i=0;i < LANG_WIKI.length;i++)  Event.observe($(LANG_WIKI[i]), 'click', this.onClickLabel_Wiki, false );  for(var i=0;i < LANG_DIC_LEO.length;i++)  Event.observe($(LANG_DIC_LEO[i]), 'click', this.onClickLabel_Dicleo, false );  if(KindSite =='TUM'){  $('Grammar').disabled='false';  $('Grammar_Label').disabled='false';  }    },  tt_convertLang:function(){  $('Grammar_Label').innerHTML = GRAMMAR_LABEL;  $('Meaning_Label').innerHTML = MEANING_LABEL;  $('Advanced_DE_VI').value = ADVANCED_LABEL;          var strHTML = "<SELECT class = 'cboInputKindDict' name='tt_tudien_conbobox' id = 'Dict_kind' style='width:14em; font-size:90%; border:none;'>\  <option i18n:translate='label_select_dic' value=''>"+SELECT_DICTIONARY_LABEL+"</option>\  <option value='WIKI'>"+WIKI_LABEL+"</option>\  <option value='DIC_LEO'>"+DICLEO_LABEL+"</option>\  <option value='DWDS'>"+DWDS_LABEL+"</option>\  <option value='DE_VI'>"+DI_VI_LABEL+"</option>\                          </SELECT>";  if(navigator.userAgent.toString().indexOf('MSIE 6.0')> 0){              strHTML = "<SELECT class = 'cboInputKindDict' name='tt_tudien_conbobox' id = 'Dict_kind' style='width:13.7em; font-size:90%; border:none; margin-right:-11px !important;'>\  <option i18n:translate='label_select_dic' value=''>"+SELECT_DICTIONARY_LABEL+"</option>\  <option value='WIKI'>"+WIKI_LABEL+"</option>\  <option value='DIC_LEO'>"+DICLEO_LABEL+"</option>\  <option value='DWDS'>"+DWDS_LABEL+"</option>\  <option value='DE_VI'>"+DI_VI_LABEL+"</option>\                          </SELECT>";  }  $('InputKindDict').innerHTML = strHTML ; $('metadicSearch').title = BUTTON_SEARCH_TITLE_METADICT;  var TagLabelWikis = $('kind_wiki').getElementsByTagName('label');  for(var i=0;i<TagLabelWikis.length;i++)  $(TagLabelWikis[i]).innerHTML = WIKI_KIND_LABEL[$(TagLabelWikis[i]).id];  var TagLabelDicleos = $('kind_dict_DIC_LEO').getElementsByTagName('label');  for(var i=0;i<TagLabelDicleos.length;i++)  $(TagLabelDicleos[i]).innerHTML = DICLEO_KIND_LABEL[$(TagLabelDicleos[i]).id];    },  tt_convertCSS_IE:function(){  if(Prototype.Browser.IE){  for(var i=0;i<LANG_WIKI.length;i++){  $(LANG_WIKI[i]).style.background = TAB_SELETC_BACKGROUND;  $(LANG_WIKI[i]).style.border = '0px';  }  for(var i=0;i<LANG_DIC_LEO.length;i++){  $(LANG_DIC_LEO[i]).style.background = TAB_SELETC_BACKGROUND;  $(LANG_DIC_LEO[i]).style.border = '0px';  }  $("checkall_wiki").style.background = TAB_SELETC_BACKGROUND;  $("checkall_wiki").style.border = '0px';  $("checkall_DIC_LEO").style.background = TAB_SELETC_BACKGROUND;  $("checkall_DIC_LEO").style.border = '0px';  $("Grammar").style.background = TAB_SELETC_BACKGROUND;  $("Grammar").style.border = '0px';  $("Meaning").style.background = TAB_SELETC_BACKGROUND;  $("Meaning").style.border = '0px';  }  },  onMouseMoveSearch:function(){  if($('inputWord').value.strip() == '')  $('inputWord').value = BUTTON_SEARCH_TITLE_METADICT;  $('inputWord').focus();  },  onMouseOutSearch:function(){  if($('inputWord').value  == BUTTON_SEARCH_TITLE_METADICT)  $('inputWord').value = "";  },  onclickCheckAll : function(event){  var id = event.target.id;  var label = null;  if(id == 'checkall_wiki')  label = LANG_WIKI;  else  label = LANG_DIC_LEO;  for(var i=0;i<label.length;i++)  $(label[i]).checked = $(id).checked ;  },  onClickLabel_Wiki:function(event){  $('checkall_wiki').checked = true;  for(var i=0;i<LANG_WIKI.length;i++)  if($(LANG_WIKI[i]).checked == false){  $('checkall_wiki').checked = false;  break;  }  },  onClickLabel_Dicleo:function(event){  $('checkall_DIC_LEO').checked = true;  for(var i=0;i<LANG_DIC_LEO.length;i++)  if($(LANG_DIC_LEO[i]).checked == false){  $('checkall_DIC_LEO').checked = false;  break;  }  },  handleOnClickAdvanced_DE_VI: function() {  var flag = false;  var dict_requet = {};  dict_requet['tt_word'] = "";  dict_requet['tt_type'] = $("Dict_kind").value.strip();  dict_requet['tt_option'] = "";  dict_requet['service_kind'] = "HTML";  dict_requet['Dict_kind'] = $("Dict_kind").value ;  var tt_option = OPTION_DE_VI;  dict_requet['service_kind'] = "SQL";  dict_requet['next'] = '0';  if($('Meaning').checked == true){  dict_requet['tt_option'] = $('Meaning').value + '<*>head_';  flag = true;  }  if($('Grammar').checked == true){  dict_requet['tt_option'] += $('Grammar').value + "<*>head";  flag = true;  }    if(flag == false){              ContentMyMetadict.innerHTML = "<div class = 'errorServer'>\  <table><tr><td align='center' class = 'headerrorServer'><b>"+DI_VI_LABEL+"</b><i>("+ADVANCED_LABEL+")</i></td></tr>\                                                          <tr><td align='center'>"+MSG_DI_VI_02+"</i></td></tr></table></div>";  return;  }  tt_Show_ProtectiveScreen();  this.tt_MetaDictionaryModel.tt_getDataAdvacnde_DE_VI(dict_requet);  },    handleOnClickMetadicSearch: function() {  if($('maincontentwrapper')){  $('maincontentwrapper').innerHTML = "<div id = 'Content_MyMetaDict' class = 'MyMetaDictionary'></div>",  ContentMyMetadict = $('Content_MyMetaDict');  }  else{  ContentMyMetadict = $('region-content')  }  if (($('inputWord').value.strip() == "" || $('inputWord').value.strip() == BUTTON_SEARCH_TITLE_METADICT)){              ContentMyMetadict.innerHTML = "<div class = 'errorServer'>\  <table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center'>&nbsp;</td></tr>\  <tr><td align='center' class = 'headerrorServer'><b>"+INPUT_LABEL+"</b></td></tr>\  <tr><td align='center'>&nbsp;</td></tr>\  <tr><td align='center'>"+MSG_INPUT +"</td></tr>\                                                              <tr><td align='center'>&nbsp;</td></tr></table></div>";  return;  }  if ($("Dict_kind").value == "" ){  $('Dict_kind').value = 'DE_VI';  $('kind_dict_SQL').style.display = "block";  var tt_option = OPTION_DE_VI;  $('Grammar').checked = false;  $('Meaning').checked = true;  }  ContentMyMetadict.innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif'/></center>";  var flag = false;  var dict_requet = {};  dict_requet['tt_word'] = $('inputWord').value.strip();  dict_requet['tt_type'] = $("Dict_kind").value.strip();  dict_requet['tt_option'] = "";  dict_requet['tt_option_list'] = "";  dict_requet['service_kind'] = "HTML";  dict_requet['next'] = '0';  dict_requet['Dict_kind'] = $("Dict_kind").value ; if($("Dict_kind").value == "DE_VI"){  var tt_option = OPTION_DE_VI;  dict_requet['tt_option'] = "Meaning,Grammar";  dict_requet['service_kind'] = "SQL";  for (var index = 0;index < tt_option.length; index ++)  if($(tt_option[index]).checked == true){  dict_requet['tt_option_list'] += $(tt_option[index]).value + ",";  flag = true;  }  if(flag == false){                  ContentMyMetadict.innerHTML = "<div class = 'errorServer'>\  <table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center'>&nbsp;</td></tr>\  <tr><td align='center' class = 'headerrorServer'><b>"+DI_VI_LABEL+"</b></td></tr>\  <tr><td align='center'>&nbsp;</td></tr>\  <tr><td align='center'>"+MSG_DI_VI_01+"<i>"+ADVANCED_LABEL+"</i></td></tr>\                                                          <tr><td align='center'>&nbsp;</td></tr></table></div>";  return;  }  }  if($("Dict_kind").value == "WIKI"){    var flagLang = false;  for (var index = 0;index < LANG_WIKI.length; index ++)  if($(LANG_WIKI[index]).checked == true){  if(LangCurrent_WIKI == $(LANG_WIKI[index]).value) flagLang = true ; dict_requet['tt_option_list'] += $(LANG_WIKI[index]).value + ",";  flag = true;  }  if(flagLang)  dict_requet['tt_option'] = LangCurrent_WIKI;  else  dict_requet['tt_option'] = dict_requet['tt_option_list'].split(',')[0];  if(flag == false){                  ContentMyMetadict.innerHTML = "<div class = 'errorServer'>\  <table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center'>&nbsp;</td></tr>\  <tr><td align='center' class = 'headerrorServer'><b>Wikipedia</b></td></tr>\  <tr><td align='center'>&nbsp;</td></tr>\  <tr><td align='center'>"+MSG_WIKI_01+"</td></tr>\                                                          <tr><td align='center'>&nbsp;</td></tr></table></div>";  return;  }  }  if($("Dict_kind").value == "DIC_LEO"){  var flagLang = false;  for (var index = 0;index < LANG_DIC_LEO.length; index ++)  if($(LANG_DIC_LEO[index]).checked == true){  if(LangCurrent_DICLEO == $(LANG_DIC_LEO[index]).value) flagLang = true ; dict_requet['tt_option_list'] += $(LANG_DIC_LEO[index]).value + ",";  flag = true;  }  if(flagLang)  dict_requet['tt_option'] = LangCurrent_DICLEO;  else  dict_requet['tt_option'] = dict_requet['tt_option_list'].split(',')[0];  if(flag == false){                  ContentMyMetadict.innerHTML = "<div class = 'errorServer'>\  <table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center'>&nbsp;</td></tr>\  <tr><td align='center' class = 'headerrorServer'><b>Dic.leo.org</b></td></tr>\  <tr><td align='center'>&nbsp;</td></tr>\  <tr><td align='center'>"+MSG_DICLEO_01+"</td></tr>\                                                          <tr><td align='center'>&nbsp;</td></tr></table></div>";  return;  }  }    tt_Show_ProtectiveScreen();  this.tt_MetaDictionaryModel.tt_getData(dict_requet);  },    handleonkeydown: function(event) {  if (event.keyCode == 13)  this.handleOnClickMetadicSearch();  },  handleOnChenge: function() {  if($('maincontentwrapper')){  $('maincontentwrapper').innerHTML = "<div id = 'Content_MyMetaDict' class = 'MyMetaDictionary'></div>",  ContentMyMetadict = $('Content_MyMetaDict');  }  else{  ContentMyMetadict = $('region-content')  }  ContentMyMetadict.innerHTML = "<center><div><b>"+MYMETADICT_LABEL+"</b></div></center>";  $('kind_wiki').style.display = "none";  $('kind_dict_SQL').style.display = "none";  $('kind_dict_DIC_LEO').style.display = "none";  if ($("Dict_kind").value =='WIKI') {  $('kind_wiki').style.display = "block";  for (var index = 0;index < LANG_WIKI.length; index ++)  $(LANG_WIKI[index]).checked = false;  }  if($("Dict_kind").value =='DE_VI'){  $('kind_dict_SQL').style.display = "block";  var tt_option = OPTION_DE_VI;  $('Grammar').checked = false;  $('Meaning').checked = true;  }  if($("Dict_kind").value =='DIC_LEO'){  $('kind_dict_DIC_LEO').style.display = "block";  for (var index = 0;index < LANG_DIC_LEO.length; index ++)  $(LANG_DIC_LEO[index]).checked = false;  }  }  };TT_MetaDictionaryModel = Class.create();  TT_MetaDictionaryModel.prototype = {  initialize: function() {  /*---Create Cache for MyMetaDictionary on Wed Browser*/  this.dictResultWIKI = {};  for(var i=0;i<LANG_WIKI.length;i++)  this.dictResultWIKI[LANG_WIKI[i]] = {};  this.dictResultDIC_LEO = {};  for(var i=0;i<LANG_DIC_LEO.length;i++)  this.dictResultDIC_LEO[LANG_DIC_LEO[i]] = {};  this.dictResultTableDIC_LEO = {};  this.dictResultDWDS = {};  this.dictResultDE_VI = {};  this.dictResultAdvancedDE_VI = {};  this.dictResultAdvancedDE_VI['Meaning'] = {};  this.dictResultAdvancedDE_VI['Grammar'] = {};  /*----End-----*/    this.dictRequest = null;  this.dictRequest_Advanced_DE_VI = null;  this.tt_getData = this.tt_getData.bind(this);    this.DisplayResult_WIKI = new TT_DisplayResult_WIKI;  this.DisplayResult_WIKI.tt_getDisplayResultObservable().registerObserver(this, "tt_getData");  this.tt_ViewResult_WIKI = this.tt_ViewResult_WIKI.bind(this);    this.DisplayResult_DWDS = new TT_DisplayResult_DWDS;  this.DisplayResult_DWDS.tt_getDisplayResultObservable().registerObserver(this, "tt_getData");  this.tt_ViewResult_DWDS = this.tt_ViewResult_DWDS.bind(this);    this.DisplayResult_DIC_LEO = new TT_DisplayResult_DIC_LEO;  this.DisplayResult_DIC_LEO.tt_getDisplayResultObservable().registerObserver(this, "tt_getData");  this.tt_ViewResult_DIC_LEO = this.tt_ViewResult_DIC_LEO.bind(this);  this.DisplayResult_DIC_LEO.tt_getDisplayResultTable_DIC_LEOObservable().registerObserver(this, "tt_getDataTable_DIC_LEO");  this.tt_ViewResultTable_DIC_LEO = this.tt_ViewResultTable_DIC_LEO.bind(this);    this.DisplayResult_DE_VI = new TT_DisplayResult_DE_VI;  this.tt_ViewResult_DE_VI = this.tt_ViewResult_DE_VI.bind(this);    this.TT_DisplayResult_Advanced_DE_VI = new TT_DisplayResult_Advanced_DE_VI;  this.tt_ViewResult_Advanced = this.tt_ViewResult_Advanced.bind(this);  this.tt_ViewResult_Advanced_word = this.tt_ViewResult_Advanced_word.bind(this);  this.TT_DisplayResult_Advanced_DE_VI.tt_getDisplayResultObservable().registerObserver(this, "tt_getDataAdvacnde_DE_VI");  this.TT_DisplayResult_Advanced_DE_VI.tt_getObservable_word().registerObserver(this, "tt_getDataAdvacnde_DE_VI_word");  },    tt_isDataDictExist:function(value, dict){  var keys = $H(dict).keys();  if( keys.indexOf(value) >=0) return true;  return false;  },    tt_getData: function(tmp) {  this.dictRequest = tmp;  if(this.dictRequest['Dict_kind'] == 'WIKI'){  this.DisplayResult_WIKI.tt_setdictRequest(this.dictRequest);  if(this.dictRequest['next'] == '0')  this.DisplayResult_WIKI.tt_create_Tab_wiki();  if( this.tt_isDataDictExist(this.dictRequest['tt_word'],this.dictResultWIKI[this.dictRequest['tt_option']])){  this.DisplayResult_WIKI.tt_setResult(this.dictResultWIKI[this.dictRequest['tt_option']][this.dictRequest['tt_word']]);  this.DisplayResult_WIKI.tt_dislayResult();  }  else  this.tt_sendRequest("TT_MetaDictionary/runMyMetaDictionary", tmp, "Public",this.tt_ViewResult_WIKI);  }  if(this.dictRequest['Dict_kind'] == 'DIC_LEO'){  this.DisplayResult_DIC_LEO.tt_setdictRequest(this.dictRequest);  if(this.dictRequest['next'] == '0')  this.DisplayResult_DIC_LEO.tt_create_Tab_DIC_LEO();  if(this.tt_isDataDictExist(this.dictRequest['tt_word'],this.dictResultDIC_LEO[this.dictRequest['tt_option']])){  this.DisplayResult_DIC_LEO.tt_setResult(this.dictResultDIC_LEO[this.dictRequest['tt_option']][this.dictRequest['tt_word']]);  this.DisplayResult_DIC_LEO.tt_dislayResult();  }  else  this.tt_sendRequest("TT_MetaDictionary/runMyMetaDictionary", tmp, "Public",this.tt_ViewResult_DIC_LEO);  }  if(this.dictRequest['Dict_kind'] == 'DWDS')  this.tt_sendRequest("TT_MetaDictionary/runMyMetaDictionary", tmp, "Public",this.tt_ViewResult_DWDS);  if(this.dictRequest['Dict_kind'] == 'DE_VI'){  this.DisplayResult_DE_VI.tt_setdictRequest(this.dictRequest);  this.DisplayResult_DE_VI.tt_create_Tab_DE_VI();  if(this.tt_isDataDictExist(this.dictRequest['tt_word'],this.dictResultDE_VI)){  this.DisplayResult_DE_VI.tt_setResult(this.dictResultDE_VI[this.dictRequest['tt_word']]);  this.DisplayResult_DE_VI.tt_dislayResult();  }  else  this.tt_sendRequest("TT_MetaDictionary/runMyMetaDictionary", tmp, "Public",this.tt_ViewResult_DE_VI);  }  },    tt_getDataAdvacnde_DE_VI: function(tmp) {  this.dictRequest_Advanced_DE_VI = tmp;  this.TT_DisplayResult_Advanced_DE_VI.tt_setdictRequest(this.dictRequest_Advanced_DE_VI);  if(this.dictRequest_Advanced_DE_VI['next'] == '0')  this.TT_DisplayResult_Advanced_DE_VI.tt_Create_Tab();  tt_option = this.dictRequest_Advanced_DE_VI['tt_option'].split('_')[0];  if(this.tt_isDataDictExist(this.dictRequest_Advanced_DE_VI['tt_option'],this.dictResultAdvancedDE_VI[tt_option.split('<*>')[0]])){  this.TT_DisplayResult_Advanced_DE_VI.tt_setResult(this.dictResultAdvancedDE_VI[tt_option.split('<*>')[0]][this.dictRequest_Advanced_DE_VI['tt_option']]);  this.TT_DisplayResult_Advanced_DE_VI.tt_dislayResult();  }  else  this.tt_sendRequest("TT_MetaDictionary/runMyMetaDictionary", tmp, "advanced_DE_VI",this.tt_ViewResult_Advanced);  },    tt_getDataAdvacnde_DE_VI_word: function(tmp) {  this.dictRequest_Advanced_DE_VI = tmp;  this.tt_sendRequest("TT_MetaDictionary/runMyMetaDictionary", tmp, "Public",this.tt_ViewResult_Advanced_word);  },    tt_getDataTable_DIC_LEO: function(tmp) {  this.dictRequest = tmp;  if(this.tt_isDataDictExist(this.dictRequest['tt_word'],this.dictResultTableDIC_LEO)){  this.DisplayResult_DIC_LEO.tt_setResultTable_DIC_LEO(this.dictResultTableDIC_LEO[this.dictRequest['tt_word']]);  this.DisplayResult_DIC_LEO.tt_dislayResultTable_DIC_LEO();  }  else  this.tt_sendRequest("TT_MetaDictionary/runMyMetaDictionary", tmp, "DIC_LEO",this.tt_ViewResultTable_DIC_LEO);  },    tt_sendRequest: function (url, dataInput, actCmd, callback) {  var asyn = false;  if (typeof callback == 'function')  asyn = true;  var data = $H({actionCommand:actCmd, content:dataInput}).toJSON();  if (asyn) {  var myAjax = new Ajax.Request(  url, {  parameters: {data:data},  onComplete: callback  });  return null;  } else {  var myAjax = new Ajax.Request(  url, {  asynchronous: false,  parameters: {data:data}  });  try {  var temp = eval("obj="+myAjax.transport.responseText);  }  catch (e) {  var temp = myAjax.transport.responseText;  }  return temp;  }  },    tt_ViewResult_WIKI: function(transport){  try {  var tmp = eval("obj="+transport.responseText);  try{  this.dictResultWIKI[this.dictRequest['tt_option']][this.dictRequest['tt_word']] = tmp;  this.DisplayResult_WIKI.tt_setResult(tmp);  this.DisplayResult_WIKI.tt_dislayResult();  }catch(e){  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "";  }  } catch (e) {  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "<div id = 'errorServer' class = 'errorServer'></div>";              var strHTLM =   "<table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center' class = 'headerrorServer'><b>"+ERROR_LABEL['Error']+"</b></td></tr>\  <tr><td align='center'><br>&nbsp;<br>" + ERROR_LABEL[transport.responseText]  +" <br>&nbsp;<br> "+ERROR_LABEL['Start or Restart ExternServer please']+"<br>&nbsp;<br>&nbsp;<br>&nbsp;<br></td></tr>\                              </table>" ; $('errorServer').innerHTML = strHTLM;  }  },    tt_ViewResult_DWDS: function(transport){  try {  var tmp = eval("obj="+transport.responseText);  try{  this.DisplayResult_DWDS.tt_setResult(tmp);  this.DisplayResult_DWDS.tt_setdictRequest(this.dictRequest);  this.DisplayResult_DWDS.tt_dislayResult();  }catch(e){  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "";  }  } catch (e) {  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "<div id = 'errorServer' class = 'errorServer'></div>";              var strHTLM =   "<table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center' class = 'headerrorServer'><b>"+ERROR_LABEL['Error']+"</b></td></tr>\  <tr><td align='center'><br>&nbsp;<br>" + ERROR_LABEL[transport.responseText]  +" <br>&nbsp;<br> "+ERROR_LABEL['Start or Restart ExternServer please']+"<br>&nbsp;<br>&nbsp;<br>&nbsp;<br></td></tr>\                              </table>" ; $('errorServer').innerHTML = strHTLM;  }  },    tt_ViewResult_DIC_LEO: function(transport){  try {  var tmp = eval("obj="+transport.responseText);  try{  this.DisplayResult_DIC_LEO.tt_setResult(tmp);  this.dictResultDIC_LEO[this.dictRequest['tt_option']][this.dictRequest['tt_word']] = tmp;  this.DisplayResult_DIC_LEO.tt_dislayResult();  }catch(e){  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "";  }  } catch (e) {  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "<div id = 'errorServer' class = 'errorServer'></div>";              var strHTLM =   "<table  cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center' class = 'headerrorServer'><b>"+ERROR_LABEL['Error']+"</b></td></tr>\  <tr><td align='center'><br>&nbsp;<br>" + ERROR_LABEL[transport.responseText]  +" <br>&nbsp;<br> "+ERROR_LABEL['Start or Restart ExternServer please']+"<br>&nbsp;<br>&nbsp;<br>&nbsp;<br></td></tr>\                              </table>" ; $('errorServer').innerHTML = strHTLM;  }  },    tt_ViewResultTable_DIC_LEO: function(transport){  try {  var tmp = transport.responseText;  try{  this.dictResultTableDIC_LEO[this.dictRequest['tt_word']] = tmp;  this.DisplayResult_DIC_LEO.tt_setResultTable_DIC_LEO(tmp);  this.DisplayResult_DIC_LEO.tt_dislayResultTable_DIC_LEO();  }catch(e){  tt_Hide_ProtectiveScreen();  }  } catch (e) {  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "<div id = 'errorServer' class = 'errorServer'></div>";              var strHTLM =   "<table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center' class = 'headerrorServer'><b>"+ERROR_LABEL['Error']+"</b></td></tr>\  <tr><td align='center'><br>&nbsp;<br>" + ERROR_LABEL[transport.responseText]  +" <br>&nbsp;<br> "+ERROR_LABEL['Start or Restart ExternServer please']+"<br>&nbsp;<br>&nbsp;<br>&nbsp;<br></td></tr>\                              </table>" ; $('errorServer').innerHTML = strHTLM;  }  },    tt_ViewResult_DE_VI: function(transport){  try {  var tmp = eval("obj="+transport.responseText);  try{  this.DisplayResult_DE_VI.tt_setResult(tmp);  this.dictResultDE_VI[this.dictRequest['tt_word']] = tmp;  this.DisplayResult_DE_VI.tt_dislayResult();  }catch(e){  tt_Hide_ProtectiveScreen();  }  } catch (e) {  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "<div id = 'errorServer' class = 'errorServer'></div>";              var strHTLM =   "<table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center' class = 'headerrorServer'><b>"+ERROR_LABEL['Error']+"</b></td></tr>\  <tr><td align='center'><br>&nbsp;<br>" + ERROR_LABEL[transport.responseText]  +" <br>&nbsp;<br> "+ERROR_LABEL['Start or Restart ExternServer please']+"<br>&nbsp;<br>&nbsp;<br>&nbsp;<br></td></tr>\                              </table>" ; $('errorServer').innerHTML = strHTLM;  }  },    tt_ViewResult_Advanced: function(transport){  try {  var tmp = eval("obj="+transport.responseText);  try{  this.TT_DisplayResult_Advanced_DE_VI.tt_setResult(tmp);  tt_option = this.dictRequest_Advanced_DE_VI['tt_option'].split('_')[0];  this.dictResultAdvancedDE_VI[tt_option.split('<*>')[0]][this.dictRequest_Advanced_DE_VI['tt_option']] = tmp;  this.TT_DisplayResult_Advanced_DE_VI.tt_dislayResult();  }catch(e){  tt_Hide_ProtectiveScreen();  }  } catch (e) {  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "<div id = 'errorServer' class = 'errorServer'></div>";              var strHTLM =   "<table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center' class = 'headerrorServer'><b>"+ERROR_LABEL['Error']+"</b></td></tr>\  <tr><td align='center'><br>&nbsp;<br>" + ERROR_LABEL[transport.responseText]  +" <br>&nbsp;<br> "+ERROR_LABEL['Start or Restart ExternServer please']+"<br>&nbsp;<br>&nbsp;<br>&nbsp;<br></td></tr>\                              </table>" ; $('errorServer').innerHTML = strHTLM;  }  },    tt_ViewResult_Advanced_word: function(transport){  try {  var tmp = eval("obj="+transport.responseText);  try{  this.TT_DisplayResult_Advanced_DE_VI.tt_setResult(tmp);  this.TT_DisplayResult_Advanced_DE_VI.tt_setdictRequest(this.dictRequest_Advanced_DE_VI);  this.TT_DisplayResult_Advanced_DE_VI.tt_dislayResult_word();  }catch(e){  tt_Hide_ProtectiveScreen();  }  } catch (e) {  tt_Hide_ProtectiveScreen();  ContentMyMetadict.innerHTML = "<div id = 'errorServer' class = 'errorServer'></div>";              var strHTLM =   "<table cellspacing='0' cellpadding='0' border='0'>\  <tr><td align='center' class = 'headerrorServer'><b>"+ERROR_LABEL['Error']+"</b></td></tr>\  <tr><td align='center'><br>&nbsp;<br>" + ERROR_LABEL[transport.responseText]  +" <br>&nbsp;<br> "+ERROR_LABEL['Start or Restart ExternServer please']+"<br>&nbsp;<br>&nbsp;<br>&nbsp;<br></td></tr>\                              </table>" ; $('errorServer').innerHTML = strHTLM;  }  }  }  ;langList = {} ; langList["en"] = tt_setLanguage_en;  langList["de"] = tt_setLanguage_de;  langList["vi"] = tt_setLanguage_vi;  function tt_setLanguage (lang) {  if (langList[lang] != undefined)  langList[lang]();  else  langList["en"]();  }    function tt_setLanguage_en() {  /*------Portal colum one--*/  BUTTON_SEARCH_TITLE_METADICT = "Search in Dictionary";  SHOW_ALL_MEANING = "Show all meaning";  MYMETADICT_LABEL = " Bach Viet Dictionary";  INPUT_LABEL = "Input null";  MSG_INPUT = "Input Word to Search, please !";  SELECT_ALL_LABEL = 'Select all';  SEARCH_ALL_LABEL = 'Search in all Dictionanies';  WIKI_LABEL ='Wikipedia';  MSG_WIKI_01 = "Chọn một trong các ngôn ngữ phía dưới để tra" ; DICLEO_LABEL = 'dict.leo.org';  MSG_DICLEO_01 = "Chọn một trong các bộ từ điển phía dưới để tra";  DWDS_LABEL = 'Deutsch-Deutsch';  DI_VI_LABEL = 'Deutsch->Vietnamese';  MSG_DI_VI_01 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa, nếu muốn tra nâng cao hay nhấn vào ';  MSG_DI_VI_02 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa';  SELECT_DICTIONARY_LABEL = 'Select Dictionary';  SHOW_ALL = 'Show all';  /*---Dialog Help Advanced-*/  DIALOG_ADVANCED_TITLE1 = 'Help Advanced Search';  DIALOG_ADVANCED_TITLE2 = '(Có hiệu lực khi không đánh dấu vào ô Absolute)';  DIALOG_ADVANCED_CONTENT_01 = 'Tìm kiếm tất cả các từ';  DIALOG_ADVANCED_CONTENT_02 = 'Tìm kiếm tất cả các từ có A';  DIALOG_ADVANCED_CONTENT_03 = 'Tím tất cả các từ có từ đầu là A';  DIALOG_ADVANCED_CONTENT_04 = 'Tím tất cả các từ có từ đầu là A và phía sau là số ký tự từ x đến y';  DIALOG_ADVANCED_CONTENT_05 = 'Tìm tất cả các từ kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_06 = 'Tìm tất cả các từ có từ x đế y số ký tự ban đầu kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_07 = 'Tìm tất cả các từ bắt đầu bằng A và kết thúc bằng B';  DIALOG_ADVANCED_CONTENT_08 = 'Tìm tất cả các từ bắt đầu bằng A, ở giữa có x đến y số ký tự và kết thúc bằng B';  DIALOG_ADVANCED_NOTE_01 = 'Nếu muốn tìm chình xác số ký tự ta chỉ cần giữ lại x';  DIALOG_ADVANCED_NOTE_02 = 'Nếu bạn chuyền vào 1 chuỗi tìm kiếm với định dạng Regular Expressions, việc tìm kiếm vẫn đảm bảo và hoạt động tốt';  DIALOG_ADVANCED_NOTE_03 = 'A,B : có thể là 1 từ hay 1 cụm từ. Nếu bạn muốn chi tiết hơn trong tìm kiếm thì tại A hay B đặt các ký tự trong dấu [], sẽ có kết quả phong phú hơn';  DIALOG_ADVANCED_NOTE_04 = '[Show Example]';  DIALOG_ADVANCED_NOTE_05 = '2 từ đầu cụm chữ ab, từ thứ 3 là 1 trong 3 chữ E,e hay F, từ cuối là c';  DIALOG_ADVANCED_NOTE_06 = 'bao gồm 1 trong 3 chữ E,e hay F';  DIALOG_ADVANCED_NOTE_07 = '[Hide Example]';    /*----Advanced Search  DEUTSCH - VIETNAMESE DICTIONARY---------*/  GRAMMAR_LABEL = 'Grammar';  MEANING_LABEL = 'Meaning';  GRAMMAR_ADVANCED_LABEL = 'Advanced Grammar';  MEANING_ADVANCED_LABEL = 'Advanced Meaning';  ADVANCED_LABEL = 'Advanced Search';  WORD_ADVANCED_LABEL = 'Word';  TYPE_SEARCH_LABEL = 'Absolute' ; BUTTON_PREVIOUS_LABEL = 'Previous';  BUTTON_NEXT_LABEL = 'Next';  BUTTON_SEARCH_LABEL = 'Search' ; RESULT = 'Result';  CBO_BRANCH_LABEL = 'Lĩnh vực';  CBO_PROFESSIONAL_LABEL = 'Chuyên ngành';  CBO_OTHERTYPE_LABEL = 'Other type;' ; CBO_INFLECTION_CLASS = 'Inflection class';  CBO_KIND_WORD_LABEL = 'Word kind';  EXAMPLE_LABEL = 'Example';  MEANING_DETAIL_LABEL = 'Detail Meaning';  GRAMMAR_DETAIL_LABEL = 'Detail Grammar';  WORD_LABEL = 'Word';  ADJECTIVE_LABEL = 'Adjective';  ADVERB_LABEL ='Adverd';  BUCHSTABE_LABEL ='Buchstabe';  CONJUNCTION_LABEL ='Conjunction';  INTERJECTION_LABEL = 'Interjection';  NOUN_LABEL = 'Noun';  PRONOUN_LABEL = 'Pronoun';  PREPOSITION_LABEL ='Preposition';  VERB_LABEL = 'Verb';        /*---Gramar--de_vi--------------------*/  GRAMMAR_CONTENT_LABEL ={'Features':'Features',  'Inflection_class':'Inflection class',  'InflectionForm':'Inflection form',  'Principalparts':'Principal parts',  'comperative':'Inflected forms comparative',  'Nominative':'Nominative',  'Accusative':'Accusative',  'Dative':'Dative',  'Genitive':'Genitive',  'positive':'Inflected forms positive',  'superlative':'Inflected forms comparative',  'Genitive_Singular':'Genitive Singular',  'Nominative_Plural':'Nominative Plural',  'Article':'Article',  'Person':'Person',  'Number':'Number',  'Gender':'Gender',  'Auxiliary':'Auxiliary',  'Singular':'Singular',  'Plural':'Plural',  'Neuter':'Neuter',  'Feminin':'Feminin',  'Maskulin':'Maskulin',  'Person':'Person',  'Participle':'Participle',  'Infinitive':'Infinitive',  'present':'Present',  'present_subordinate_clause':'Present subordinate clause',  'present_main_clause':'Present main clause',  'preterite':'Preterite',  'imperative':'Imperative',  'infi_present':'Infinitive present',  'present_participle':'Present participle',  'past_participle':'Past participle',  'perfect':'Perfect',  'infi_perfect':'Infinitive perfect',  'past_perfect':'Past perfec',  'future_i':'Future I',  'infi_future_i':'Infinitive Future I',  'future_ii':'Future II',  'infi_future_ii':'Infinitive Future II',  'Indicative':'Indicative',  'Subjuntive I':'Subjuntive I',  'Subjuntive II':'Subjuntive II',  'mixed':'Mixed inflection',  'weak':'Weak inflection',  'strong':'Strong inflection',  'adjective':'Adjective',  'adverb':'Adverb',  'buchstabe':'Buchstabe',  'conjunction':'Conjunction',  'interjection':'Interjection',  'noun':'Noun',  'pronoun':'Pronoun',  'preposition':'Preposition',  'verb':'Verb'  };  ERROR_LABEL = { 'Error':'Error',  'Portal Extern Services Tool, TT_MyMetaDictionary Service not found':'Portal Extern Services Tool, TT_MyMetaDictionary Service not found !',  'Start or Restart ExternServer please':'Start or Restart ExternServer please !'  };  WIKI_KIND_LABEL = { 'da_label' : 'Danisk',  'de_label' : 'Deutsch',  'en_label' : 'English',  'fr_label' : 'Français',  'it_label' : 'Italiano',  'pt_label' : 'Português',  'ru_label' : 'Русский',  'tr_label' : 'Türkçe',  'vi_label' : 'Việt nam',  'ja_label' : '日本語',  'ko_label' : '한국어',  'zh_label' : '中文',  'checkall_wiki_label':'Select all'  };  DICLEO_KIND_LABEL = {  'deen_label':'Deutsch-Englisch',  'ende_label':'Englisch-Deutsch',  'defr_label':'Deutsch-Französisch',  'frde_label':'Französisch-Deutsch',  'dees_label':'Deutsch-Spanisch',  'esde_label':'Spanisch-Deutsch',  'checkall_DIC_LEO_label' : 'Select all'  };  }    function tt_setLanguage_de() {  /*------Portal colum one--*/  BUTTON_SEARCH_TITLE_METADICT = "im Wörterbuch nachschlagen";  SHOW_ALL_MEANING = "Hiện tất cả ý nghĩa";  MYMETADICT_LABEL = " Bach Viet Dictionary";  INPUT_LABEL = "keine Eingabe";  MSG_INPUT =   "Bitte, geben Sie ein Suchbegriff ein!";  SELECT_ALL_LABEL = 'alles auswählen';  SEARCH_ALL_LABEL = 'in allen Wörterbüchern suchen';  WIKI_LABEL ='Wikipedia';  MSG_WIKI_01 = "Chọn một trong các ngôn ngữ phía dưới để tra";  DICLEO_LABEL = 'dict.leo.org';  MSG_DICLEO_01 = "Chọn một trong các bộ từ điển phía dưới để tra";  DWDS_LABEL = 'Deutsch-Deutsch';  DI_VI_LABEL = 'Deutsch->Vietnamesisch';  MSG_DI_VI_01 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa, nếu muốn tra nâng cao hay nhấn vào ';  MSG_DI_VI_02 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa';  SELECT_DICTIONARY_LABEL = 'Wörterbuch wählen';  SHOW_ALL = 'alles anzeigen';  /*---Dialog Help Advanced-*/  DIALOG_ADVANCED_TITLE1 = 'Trợ giúp tìm kiếm chi tiết';  DIALOG_ADVANCED_TITLE2 = '(Có hiệu lực khi không đánh dấu vào ô Tuyệt đối)';  DIALOG_ADVANCED_CONTENT_01 = 'Tìm kiếm tất cả các từ';  DIALOG_ADVANCED_CONTENT_02 = 'Tìm kiếm tất cả các từ có A';  DIALOG_ADVANCED_CONTENT_03 = 'Tím tất cả các từ có từ đầu là A';  DIALOG_ADVANCED_CONTENT_04 = 'Tím tất cả các từ có từ đầu là A và phía sau là số ký tự từ x đến y';  DIALOG_ADVANCED_CONTENT_05 = 'Tìm tất cả các từ kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_06 = 'Tìm tất cả các từ có từ x đế y số ký tự ban đầu kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_07 = 'Tìm tất cả các từ bắt đầu bằng A và kết thúc bằng B';  DIALOG_ADVANCED_CONTENT_08 = 'Tìm tất cả các từ bắt đầu bằng A, ở giữa có x đến y số ký tự và kết thúc bằng B';  DIALOG_ADVANCED_NOTE_01 = 'Nếu muốn tìm chình xác số ký tự ta chỉ cần giữ lại x';  DIALOG_ADVANCED_NOTE_02 = 'Nếu bạn chuyền vào 1 chuỗi tìm kiếm với định dạng Regular Expressions, việc tìm kiếm vẫn đảm bảo và hoạt động tốt';  DIALOG_ADVANCED_NOTE_03 = 'A,B : có thể là 1 từ hay 1 cụm từ. Nếu bạn muốn chi tiết hơn trong tìm kiếm thì tại A hay B đặt các ký tự trong dấu [], sẽ có kết quả phong phú hơn';  DIALOG_ADVANCED_NOTE_04 = '[Hiện ra ví dụ]';  DIALOG_ADVANCED_NOTE_05 = '2 từ đầu cụm chữ ab, từ thứ 3 là 1 trong 3 chữ E,e hay F, từ cuối là c';  DIALOG_ADVANCED_NOTE_06 = 'bao gồm 1 trong 3 chữ E,e hay F';  DIALOG_ADVANCED_NOTE_07 = '[Ẩn đi ví dụ]';    /*----Advanced Search  DEUTSCH - VIETNAMESE DICTIONARY---------*/  GRAMMAR_LABEL = 'Grammatik';  MEANING_LABEL = 'Bedeutung';  GRAMMAR_ADVANCED_LABEL = 'Tìm chi tiết cho Ngữ pháp';  MEANING_ADVANCED_LABEL = 'Tìm chi tiết cho Nghĩa';  ADVANCED_LABEL = 'Erweiterte Suche';  WORD_ADVANCED_LABEL = 'Từ muốn tìm';  TYPE_SEARCH_LABEL = 'Tuyệt đối';  BUTTON_PREVIOUS_LABEL = 'Quay lại';  BUTTON_NEXT_LABEL = 'Kế tiếp';  BUTTON_SEARCH_LABEL = 'Tìm kiếm';  RESULT = 'Kết quả';  CBO_BRANCH_LABEL = 'Lĩnh vực';  CBO_PROFESSIONAL_LABEL = 'Chuyên ngành';  CBO_OTHERTYPE_LABEL = 'Loại khác';  CBO_INFLECTION_CLASS = 'Lớp biến tố';  CBO_KIND_WORD_LABEL = 'Loại từ';  EXAMPLE_LABEL = 'Ví dụ';  MEANING_DETAIL_LABEL = 'Chi tiết về Nghĩa';  GRAMMAR_DETAIL_LABEL = 'Chi tiết về Ngữ pháp';  WORD_LABEL = 'Từ';  ADJECTIVE_LABEL = 'Tính từ';  ADVERB_LABEL ='Trang từ';  BUCHSTABE_LABEL ='Chữ cái';  CONJUNCTION_LABEL ='Từ nối';  INTERJECTION_LABEL = 'Thán từ';  NOUN_LABEL = 'Danh từ';  PRONOUN_LABEL = 'Đại từ';  PREPOSITION_LABEL ='Giới từ';  VERB_LABEL = 'Động từ';    /*---Gramar--de_vi--------------------*/  GRAMMAR_CONTENT_LABEL ={'Features':'Besonderheiten',  'Inflection_class':'Flexionsklasse',  'InflectionForm':'Inflection form',  'Principalparts':'Stammformen',  'comperative':'Flektierte Formen Komparativ',  'Nominative':'Nominativ',  'Accusative':'Akkusativ',  'Dative':'Dativ',  'Genitive':'Genitiv',  'positive':'Flektierte Formen Positiv',  'superlative':'Flektierte Formen Superlativ',  'Genitive_Singular':'Genitiv Singular',  'Nominative_Plural':'Nominativ Plural',  'Article':'Artikel',  'Person':'Person',  'Number':'Numerus',  'Gender':'Gender',  'Auxiliary':'Hilfsverb',  'Singular':'Singular',  'Plural':'Plural',  'Neuter':'Neutrum',  'Feminin':'Feminin',  'Maskulin':'Masculine',  'Person':'Person',  'Participle':'Partizip',  'Infinitive':'Infinitiv',  'present':'Präsens',  'present_subordinate_clause':'Präsens Nebensatz',  'present_main_clause':'Präsens Hauptsatz',  'preterite':'Präteritum',  'imperative':'Imperativ',  'infi_present':'Infinitiv Präsens',  'present_participle':'Partizip Präsens',  'past_participle':'Partizip Perfekt',  'perfect':'Perfekt',  'infi_perfect':'Infinitiv Perfekt',  'past_perfect':'Plusquamperfekt',  'future_i':'Futur I',  'infi_future_i':'Infinitiv Futur I',  'future_ii':'Futur II',  'infi_future_ii':'Infinitiv Futur II',  'Indicative':'Indikativ',  'Subjuntive I':'Konjunktiv I',  'Subjuntive II':'Konjunktiv II',  'mixed':'Gemischte Flexion',  'weak':'Schwache Flexion',  'strong':'Starke Flexion',  'adjective':'Adjektiv',  'adverb':'Adverb',  'buchstabe':'Buchstabe',  'conjunction':'Konjunktion',  'interjection':'Interjektion',  'noun':'Nomen',  'pronoun':'Pronomen',  'preposition':'Präposition',  'verb':'Verb'  };  ERROR_LABEL = { 'Error':'Lỗi',  'Portal Extern Services Tool, TT_MyMetaDictionary Service not found':'Không tìm thấy Portal Extern Services Tool hoặc TT_MyMetaDictionary Service !',  'Start or Restart ExternServer please':'Xin vui lòng khởi động hoặc khởi động lại ExternServer !'  };  WIKI_KIND_LABEL = { 'da_label' : 'Danisk',  'de_label' : 'Deutsch',  'en_label' : 'English',  'fr_label' : 'Français',  'it_label' : 'Italiano',  'pt_label' : 'Português',  'ru_label' : 'Русский',  'tr_label' : 'Türkçe',  'vi_label' : 'Việt nam',  'ja_label' : '日本語',  'ko_label' : '한국어',  'zh_label' : '中文',  'checkall_wiki_label':'alles auswählen'  };  DICLEO_KIND_LABEL = {  'deen_label':'Deutsch-Englisch',  'ende_label':'Englisch-Deutsch',  'defr_label':'Deutsch-Französisch',  'frde_label':'Französisch-Deutsch',  'dees_label':'Deutsch-Spanisch',  'esde_label':'Spanisch-Deutsch',  'checkall_DIC_LEO_label':'alles auswählen'  };  }    function tt_setLanguage_vi() {  /*------Portal colum one--*/  BUTTON_SEARCH_TITLE_METADICT = "Tra trong Từ điển";  SHOW_ALL_MEANING = "Hiện tất cả ý nghĩa";  MYMETADICT_LABEL = " Từ điển Bách Việt";  INPUT_LABEL = "Ô tìm kiếm trống";  MSG_INPUT =   "Hãy nhập một từ bạn muốn tìm !";  SELECT_ALL_LABEL = 'Chọn tất cả';  SEARCH_ALL_LABEL = 'Tìm trong tất cả bộ từ điển';  WIKI_LABEL ='Bách khoa toàn thư';  MSG_WIKI_01 = "Chọn một trong các ngôn ngữ phía dưới để tra";  DICLEO_LABEL = 'Đức-Anh, -Pháp, -TBN';  MSG_DICLEO_01 = "Chọn một trong các bộ từ điển phía dưới để tra";  DWDS_LABEL = 'Đại từ điển Đức Đức';  DI_VI_LABEL = 'Từ điển Đức -> Việt';  MSG_DI_VI_01 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa, nếu muốn tra nâng cao hay nhấn vào ';  MSG_DI_VI_02 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa';  SELECT_DICTIONARY_LABEL = 'Chọn từ điển';  SHOW_ALL = 'Hiển thị tất cả';  /*---Dialog Help Advanced-*/  DIALOG_ADVANCED_TITLE1 = 'Trợ giúp tìm kiếm chi tiết';  DIALOG_ADVANCED_TITLE2 = '(Có hiệu lực khi không đánh dấu vào ô Tuyệt đối)';  DIALOG_ADVANCED_CONTENT_01 = 'Tìm kiếm tất cả các từ';  DIALOG_ADVANCED_CONTENT_02 = 'Tìm kiếm tất cả các từ có A';  DIALOG_ADVANCED_CONTENT_03 = 'Tím tất cả các từ có từ đầu là A';  DIALOG_ADVANCED_CONTENT_04 = 'Tím tất cả các từ có từ đầu là A và phía sau là số ký tự từ x đến y';  DIALOG_ADVANCED_CONTENT_05 = 'Tìm tất cả các từ kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_06 = 'Tìm tất cả các từ có từ x đế y số ký tự ban đầu kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_07 = 'Tìm tất cả các từ bắt đầu bằng A và kết thúc bằng B';  DIALOG_ADVANCED_CONTENT_08 = 'Tìm tất cả các từ bắt đầu bằng A, ở giữa có x đến y số ký tự và kết thúc bằng B';  DIALOG_ADVANCED_NOTE_01 = 'Nếu muốn tìm chình xác số ký tự ta chỉ cần giữ lại x';  DIALOG_ADVANCED_NOTE_02 = 'Nếu bạn chuyền vào 1 chuỗi tìm kiếm với định dạng Regular Expressions, việc tìm kiếm vẫn đảm bảo và hoạt động tốt';  DIALOG_ADVANCED_NOTE_03 = 'A,B : có thể là 1 từ hay 1 cụm từ. Nếu bạn muốn chi tiết hơn trong tìm kiếm thì tại A hay B đặt các ký tự trong dấu [], sẽ có kết quả phong phú hơn';  DIALOG_ADVANCED_NOTE_04 = '[Hiện ra ví dụ]';  DIALOG_ADVANCED_NOTE_05 = '2 từ đầu cụm chữ ab, từ thứ 3 là 1 trong 3 chữ E,e hay F, từ cuối là c';  DIALOG_ADVANCED_NOTE_06 = 'bao gồm 1 trong 3 chữ E,e hay F';  DIALOG_ADVANCED_NOTE_07 = '[Ẩn đi ví dụ]';    /*----Advanced Search  DEUTSCH - VIETNAMESE DICTIONARY---------*/  GRAMMAR_LABEL = 'Ngữ pháp';  MEANING_LABEL = 'Ý nghĩa';  GRAMMAR_ADVANCED_LABEL = 'Tìm kiếm chi tiết cho Ngữ pháp';  MEANING_ADVANCED_LABEL = 'Tìm kiếm chi tiết cho Nghĩa';  ADVANCED_LABEL = 'Tìm chi tiết';  WORD_ADVANCED_LABEL = 'Từ muốn tìm';  TYPE_SEARCH_LABEL = 'Tuyệt đối';  BUTTON_PREVIOUS_LABEL = 'Quay lại';  BUTTON_NEXT_LABEL = 'Kế tiếp';  BUTTON_SEARCH_LABEL = 'Tìm kiếm';  RESULT = 'Kết quả';  CBO_BRANCH_LABEL = 'Lĩnh vực';  CBO_PROFESSIONAL_LABEL = 'Chuyên ngành';  CBO_OTHERTYPE_LABEL = 'Loại khác';  CBO_INFLECTION_CLASS = 'Lớp biến tố' ; CBO_KIND_WORD_LABEL = 'Loại từ';  EXAMPLE_LABEL = 'Ví dụ';  MEANING_DETAIL_LABEL = 'Chi tiết về Nghĩa';  GRAMMAR_DETAIL_LABEL = 'Chi tiết về Ngữ pháp';  WORD_LABEL = 'Từ';  ADJECTIVE_LABEL = 'Tính từ';  ADVERB_LABEL ='Trang từ';  BUCHSTABE_LABEL ='Chữ cái';  CONJUNCTION_LABEL ='Từ nối';  INTERJECTION_LABEL = 'Thán từ';  NOUN_LABEL = 'Danh từ';  PRONOUN_LABEL = 'Đại từ';  PREPOSITION_LABEL ='Giới từ';  VERB_LABEL = 'Động từ';    /*---Gramar--de_vi--------------------*/  GRAMMAR_CONTENT_LABEL ={'Features':'Besonderheiten',  'Inflection_class':'Flexionsklasse',  'InflectionForm':'Inflection form',  'Principalparts':'Stammformen',  'comperative':'Flektierte Formen Komparativ',  'Nominative':'Nominativ',  'Accusative':'Akkusativ',  'Dative':'Dativ',  'Genitive':'Genitiv',  'positive':'Flektierte Formen Positiv',  'superlative':'Flektierte Formen Superlativ',  'Genitive_Singular':'Genitiv Singular',  'Nominative_Plural':'Nominativ Plural',  'Article':'Artikel',  'Person':'Person',  'Number':'Numerus',  'Gender':'Gender',  'Auxiliary':'Hilfsverb',  'Singular':'Singular',  'Plural':'Plural',  'Neuter':'Neutrum',  'Feminin':'Feminin',  'Maskulin':'Masculine',  'Person':'Person',  'Participle':'Partizip',  'Infinitive':'Infinitiv',  'present':'Präsens',  'present_subordinate_clause':'Präsens Nebensatz',  'present_main_clause':'Präsens Hauptsatz',  'preterite':'Präteritum',  'imperative':'Imperativ',  'infi_present':'Infinitiv Präsens',  'present_participle':'Partizip Präsens',  'past_participle':'Partizip Perfekt',  'perfect':'Perfekt',  'infi_perfect':'Infinitiv Perfekt',  'past_perfect':'Plusquamperfekt',  'future_i':'Futur I',  'infi_future_i':'Infinitiv Futur I',  'future_ii':'Futur II',  'infi_future_ii':'Infinitiv Futur II',  'Indicative':'Indikativ',  'Subjuntive I':'Konjunktiv I',  'Subjuntive II':'Konjunktiv II',  'mixed':'Gemischte Flexion',  'weak':'Schwache Flexion',  'strong':'Starke Flexion',  'adjective':'Adjektiv',  'adverb':'Adverb',  'buchstabe':'Buchstabe',  'conjunction':'Konjunktion',  'interjection':'Interjektion',  'noun':'Nomen',  'pronoun':'Pronomen',  'preposition':'Präposition',  'verb':'Verb'  };  ERROR_LABEL = { 'Error':'Lỗi',  'Portal Extern Services Tool, TT_MyMetaDictionary Service not found':'Không tìm thấy Portal Extern Services Tool hoặc TT_MyMetaDictionary Service !',  'Start or Restart ExternServer please':'Xin vui lòng khởi động hoặc khởi động lại ExternServer !'  };  WIKI_KIND_LABEL = { 'da_label' : 'Đan Mạch',  'de_label' : 'Đức',  'en_label' : 'Anh',  'fr_label' : 'Pháp',  'it_label' : 'Ý',  'pt_label' : 'Bồ Đào Nha',  'ru_label' : 'Nga',  'tr_label' : 'Thổ Nhĩ Kỳ',  'vi_label' : 'Việt nam',  'ja_label' : 'Nhật',  'ko_label' : 'Hàn Quốc',  'zh_label' : 'Trung Quốc',  'checkall_wiki_label':'Chọn tất cả'  };  DICLEO_KIND_LABEL = {  'deen_label':'Đức - Anh',  'ende_label':'Anh - Đức',  'defr_label':'Đức - Pháp',  'frde_label':'Pháp - Đức',  'dees_label':'Đức - TBN',  'esde_label':'TBN - Đức',  'checkall_DIC_LEO_label':'Chọn tất cả'  };  }langList = {} ; langList["en"] = tt_setLanguage_en;  langList["de"] = tt_setLanguage_de;  langList["vi"] = tt_setLanguage_vi;  function tt_setLanguage (lang) {  if (langList[lang] != undefined)  langList[lang]();  else  langList["en"]();  }    function tt_setLanguage_en() {  /*------Portal colum one--*/  BUTTON_SEARCH_TITLE_METADICT = "Search in Dictionary";  SHOW_ALL_MEANING = "Show all meaning";  MYMETADICT_LABEL = " Bach Viet Dictionary";  INPUT_LABEL = "Input null";  MSG_INPUT = "Input Word to Search, please !";  SELECT_ALL_LABEL = 'Select all';  SEARCH_ALL_LABEL = 'Search in all Dictionanies';  WIKI_LABEL ='Wikipedia';  MSG_WIKI_01 = "Chọn một trong các ngôn ngữ phía dưới để tra" ; DICLEO_LABEL = 'dict.leo.org';  MSG_DICLEO_01 = "Chọn một trong các bộ từ điển phía dưới để tra";  DWDS_LABEL = 'Deutsch-Deutsch';  DI_VI_LABEL = 'Deutsch->Vietnamese';  MSG_DI_VI_01 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa, nếu muốn tra nâng cao hay nhấn vào ';  MSG_DI_VI_02 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa';  SELECT_DICTIONARY_LABEL = 'Select Dictionary';  SHOW_ALL = 'Show all';  /*---Dialog Help Advanced-*/  DIALOG_ADVANCED_TITLE1 = 'Help Advanced Search';  DIALOG_ADVANCED_TITLE2 = '(Có hiệu lực khi không đánh dấu vào ô Absolute)';  DIALOG_ADVANCED_CONTENT_01 = 'Tìm kiếm tất cả các từ';  DIALOG_ADVANCED_CONTENT_02 = 'Tìm kiếm tất cả các từ có A';  DIALOG_ADVANCED_CONTENT_03 = 'Tím tất cả các từ có từ đầu là A';  DIALOG_ADVANCED_CONTENT_04 = 'Tím tất cả các từ có từ đầu là A và phía sau là số ký tự từ x đến y';  DIALOG_ADVANCED_CONTENT_05 = 'Tìm tất cả các từ kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_06 = 'Tìm tất cả các từ có từ x đế y số ký tự ban đầu kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_07 = 'Tìm tất cả các từ bắt đầu bằng A và kết thúc bằng B';  DIALOG_ADVANCED_CONTENT_08 = 'Tìm tất cả các từ bắt đầu bằng A, ở giữa có x đến y số ký tự và kết thúc bằng B';  DIALOG_ADVANCED_NOTE_01 = 'Nếu muốn tìm chình xác số ký tự ta chỉ cần giữ lại x';  DIALOG_ADVANCED_NOTE_02 = 'Nếu bạn chuyền vào 1 chuỗi tìm kiếm với định dạng Regular Expressions, việc tìm kiếm vẫn đảm bảo và hoạt động tốt';  DIALOG_ADVANCED_NOTE_03 = 'A,B : có thể là 1 từ hay 1 cụm từ. Nếu bạn muốn chi tiết hơn trong tìm kiếm thì tại A hay B đặt các ký tự trong dấu [], sẽ có kết quả phong phú hơn';  DIALOG_ADVANCED_NOTE_04 = '[Show Example]';  DIALOG_ADVANCED_NOTE_05 = '2 từ đầu cụm chữ ab, từ thứ 3 là 1 trong 3 chữ E,e hay F, từ cuối là c';  DIALOG_ADVANCED_NOTE_06 = 'bao gồm 1 trong 3 chữ E,e hay F';  DIALOG_ADVANCED_NOTE_07 = '[Hide Example]';    /*----Advanced Search  DEUTSCH - VIETNAMESE DICTIONARY---------*/  GRAMMAR_LABEL = 'Grammar';  MEANING_LABEL = 'Meaning';  GRAMMAR_ADVANCED_LABEL = 'Advanced Grammar';  MEANING_ADVANCED_LABEL = 'Advanced Meaning';  ADVANCED_LABEL = 'Advanced Search';  WORD_ADVANCED_LABEL = 'Word';  TYPE_SEARCH_LABEL = 'Absolute' ; BUTTON_PREVIOUS_LABEL = 'Previous';  BUTTON_NEXT_LABEL = 'Next';  BUTTON_SEARCH_LABEL = 'Search' ; RESULT = 'Result';  CBO_BRANCH_LABEL = 'Lĩnh vực';  CBO_PROFESSIONAL_LABEL = 'Chuyên ngành';  CBO_OTHERTYPE_LABEL = 'Other type;' ; CBO_INFLECTION_CLASS = 'Inflection class';  CBO_KIND_WORD_LABEL = 'Word kind';  EXAMPLE_LABEL = 'Example';  MEANING_DETAIL_LABEL = 'Detail Meaning';  GRAMMAR_DETAIL_LABEL = 'Detail Grammar';  WORD_LABEL = 'Word';  ADJECTIVE_LABEL = 'Adjective';  ADVERB_LABEL ='Adverd';  BUCHSTABE_LABEL ='Buchstabe';  CONJUNCTION_LABEL ='Conjunction';  INTERJECTION_LABEL = 'Interjection';  NOUN_LABEL = 'Noun';  PRONOUN_LABEL = 'Pronoun';  PREPOSITION_LABEL ='Preposition';  VERB_LABEL = 'Verb';        /*---Gramar--de_vi--------------------*/  GRAMMAR_CONTENT_LABEL ={'Features':'Features',  'Inflection_class':'Inflection class',  'InflectionForm':'Inflection form',  'Principalparts':'Principal parts',  'comperative':'Inflected forms comparative',  'Nominative':'Nominative',  'Accusative':'Accusative',  'Dative':'Dative',  'Genitive':'Genitive',  'positive':'Inflected forms positive',  'superlative':'Inflected forms comparative',  'Genitive_Singular':'Genitive Singular',  'Nominative_Plural':'Nominative Plural',  'Article':'Article',  'Person':'Person',  'Number':'Number',  'Gender':'Gender',  'Auxiliary':'Auxiliary',  'Singular':'Singular',  'Plural':'Plural',  'Neuter':'Neuter',  'Feminin':'Feminin',  'Maskulin':'Maskulin',  'Person':'Person',  'Participle':'Participle',  'Infinitive':'Infinitive',  'present':'Present',  'present_subordinate_clause':'Present subordinate clause',  'present_main_clause':'Present main clause',  'preterite':'Preterite',  'imperative':'Imperative',  'infi_present':'Infinitive present',  'present_participle':'Present participle',  'past_participle':'Past participle',  'perfect':'Perfect',  'infi_perfect':'Infinitive perfect',  'past_perfect':'Past perfec',  'future_i':'Future I',  'infi_future_i':'Infinitive Future I',  'future_ii':'Future II',  'infi_future_ii':'Infinitive Future II',  'Indicative':'Indicative',  'Subjuntive I':'Subjuntive I',  'Subjuntive II':'Subjuntive II',  'mixed':'Mixed inflection',  'weak':'Weak inflection',  'strong':'Strong inflection',  'adjective':'Adjective',  'adverb':'Adverb',  'buchstabe':'Buchstabe',  'conjunction':'Conjunction',  'interjection':'Interjection',  'noun':'Noun',  'pronoun':'Pronoun',  'preposition':'Preposition',  'verb':'Verb'  };  ERROR_LABEL = { 'Error':'Error',  'Portal Extern Services Tool, TT_MyMetaDictionary Service not found':'Portal Extern Services Tool, TT_MyMetaDictionary Service not found !',  'Start or Restart ExternServer please':'Start or Restart ExternServer please !'  };  WIKI_KIND_LABEL = { 'da_label' : 'Danisk',  'de_label' : 'Deutsch',  'en_label' : 'English',  'fr_label' : 'Français',  'it_label' : 'Italiano',  'pt_label' : 'Português',  'ru_label' : 'Русский',  'tr_label' : 'Türkçe',  'vi_label' : 'Việt nam',  'ja_label' : '日本語',  'ko_label' : '한국어',  'zh_label' : '中文',  'checkall_wiki_label':'Select all'  };  DICLEO_KIND_LABEL = {  'deen_label':'Deutsch-Englisch',  'ende_label':'Englisch-Deutsch',  'defr_label':'Deutsch-Französisch',  'frde_label':'Französisch-Deutsch',  'dees_label':'Deutsch-Spanisch',  'esde_label':'Spanisch-Deutsch',  'checkall_DIC_LEO_label' : 'Select all'  };  }    function tt_setLanguage_de() {  /*------Portal colum one--*/  BUTTON_SEARCH_TITLE_METADICT = "im Wörterbuch nachschlagen";  SHOW_ALL_MEANING = "Hiện tất cả ý nghĩa";  MYMETADICT_LABEL = " Bach Viet Dictionary";  INPUT_LABEL = "keine Eingabe";  MSG_INPUT =   "Bitte, geben Sie ein Suchbegriff ein!";  SELECT_ALL_LABEL = 'alles auswählen';  SEARCH_ALL_LABEL = 'in allen Wörterbüchern suchen';  WIKI_LABEL ='Wikipedia';  MSG_WIKI_01 = "Chọn một trong các ngôn ngữ phía dưới để tra";  DICLEO_LABEL = 'dict.leo.org';  MSG_DICLEO_01 = "Chọn một trong các bộ từ điển phía dưới để tra";  DWDS_LABEL = 'Deutsch-Deutsch';  DI_VI_LABEL = 'Deutsch->Vietnamesisch';  MSG_DI_VI_01 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa, nếu muốn tra nâng cao hay nhấn vào ';  MSG_DI_VI_02 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa';  SELECT_DICTIONARY_LABEL = 'Wörterbuch wählen';  SHOW_ALL = 'alles anzeigen';  /*---Dialog Help Advanced-*/  DIALOG_ADVANCED_TITLE1 = 'Trợ giúp tìm kiếm chi tiết';  DIALOG_ADVANCED_TITLE2 = '(Có hiệu lực khi không đánh dấu vào ô Tuyệt đối)';  DIALOG_ADVANCED_CONTENT_01 = 'Tìm kiếm tất cả các từ';  DIALOG_ADVANCED_CONTENT_02 = 'Tìm kiếm tất cả các từ có A';  DIALOG_ADVANCED_CONTENT_03 = 'Tím tất cả các từ có từ đầu là A';  DIALOG_ADVANCED_CONTENT_04 = 'Tím tất cả các từ có từ đầu là A và phía sau là số ký tự từ x đến y';  DIALOG_ADVANCED_CONTENT_05 = 'Tìm tất cả các từ kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_06 = 'Tìm tất cả các từ có từ x đế y số ký tự ban đầu kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_07 = 'Tìm tất cả các từ bắt đầu bằng A và kết thúc bằng B';  DIALOG_ADVANCED_CONTENT_08 = 'Tìm tất cả các từ bắt đầu bằng A, ở giữa có x đến y số ký tự và kết thúc bằng B';  DIALOG_ADVANCED_NOTE_01 = 'Nếu muốn tìm chình xác số ký tự ta chỉ cần giữ lại x';  DIALOG_ADVANCED_NOTE_02 = 'Nếu bạn chuyền vào 1 chuỗi tìm kiếm với định dạng Regular Expressions, việc tìm kiếm vẫn đảm bảo và hoạt động tốt';  DIALOG_ADVANCED_NOTE_03 = 'A,B : có thể là 1 từ hay 1 cụm từ. Nếu bạn muốn chi tiết hơn trong tìm kiếm thì tại A hay B đặt các ký tự trong dấu [], sẽ có kết quả phong phú hơn';  DIALOG_ADVANCED_NOTE_04 = '[Hiện ra ví dụ]';  DIALOG_ADVANCED_NOTE_05 = '2 từ đầu cụm chữ ab, từ thứ 3 là 1 trong 3 chữ E,e hay F, từ cuối là c';  DIALOG_ADVANCED_NOTE_06 = 'bao gồm 1 trong 3 chữ E,e hay F';  DIALOG_ADVANCED_NOTE_07 = '[Ẩn đi ví dụ]';    /*----Advanced Search  DEUTSCH - VIETNAMESE DICTIONARY---------*/  GRAMMAR_LABEL = 'Grammatik';  MEANING_LABEL = 'Bedeutung';  GRAMMAR_ADVANCED_LABEL = 'Tìm chi tiết cho Ngữ pháp';  MEANING_ADVANCED_LABEL = 'Tìm chi tiết cho Nghĩa';  ADVANCED_LABEL = 'Erweiterte Suche';  WORD_ADVANCED_LABEL = 'Từ muốn tìm';  TYPE_SEARCH_LABEL = 'Tuyệt đối';  BUTTON_PREVIOUS_LABEL = 'Quay lại';  BUTTON_NEXT_LABEL = 'Kế tiếp';  BUTTON_SEARCH_LABEL = 'Tìm kiếm';  RESULT = 'Kết quả';  CBO_BRANCH_LABEL = 'Lĩnh vực';  CBO_PROFESSIONAL_LABEL = 'Chuyên ngành';  CBO_OTHERTYPE_LABEL = 'Loại khác';  CBO_INFLECTION_CLASS = 'Lớp biến tố';  CBO_KIND_WORD_LABEL = 'Loại từ';  EXAMPLE_LABEL = 'Ví dụ';  MEANING_DETAIL_LABEL = 'Chi tiết về Nghĩa';  GRAMMAR_DETAIL_LABEL = 'Chi tiết về Ngữ pháp';  WORD_LABEL = 'Từ';  ADJECTIVE_LABEL = 'Tính từ';  ADVERB_LABEL ='Trang từ';  BUCHSTABE_LABEL ='Chữ cái';  CONJUNCTION_LABEL ='Từ nối';  INTERJECTION_LABEL = 'Thán từ';  NOUN_LABEL = 'Danh từ';  PRONOUN_LABEL = 'Đại từ';  PREPOSITION_LABEL ='Giới từ';  VERB_LABEL = 'Động từ';    /*---Gramar--de_vi--------------------*/  GRAMMAR_CONTENT_LABEL ={'Features':'Besonderheiten',  'Inflection_class':'Flexionsklasse',  'InflectionForm':'Inflection form',  'Principalparts':'Stammformen',  'comperative':'Flektierte Formen Komparativ',  'Nominative':'Nominativ',  'Accusative':'Akkusativ',  'Dative':'Dativ',  'Genitive':'Genitiv',  'positive':'Flektierte Formen Positiv',  'superlative':'Flektierte Formen Superlativ',  'Genitive_Singular':'Genitiv Singular',  'Nominative_Plural':'Nominativ Plural',  'Article':'Artikel',  'Person':'Person',  'Number':'Numerus',  'Gender':'Gender',  'Auxiliary':'Hilfsverb',  'Singular':'Singular',  'Plural':'Plural',  'Neuter':'Neutrum',  'Feminin':'Feminin',  'Maskulin':'Masculine',  'Person':'Person',  'Participle':'Partizip',  'Infinitive':'Infinitiv',  'present':'Präsens',  'present_subordinate_clause':'Präsens Nebensatz',  'present_main_clause':'Präsens Hauptsatz',  'preterite':'Präteritum',  'imperative':'Imperativ',  'infi_present':'Infinitiv Präsens',  'present_participle':'Partizip Präsens',  'past_participle':'Partizip Perfekt',  'perfect':'Perfekt',  'infi_perfect':'Infinitiv Perfekt',  'past_perfect':'Plusquamperfekt',  'future_i':'Futur I',  'infi_future_i':'Infinitiv Futur I',  'future_ii':'Futur II',  'infi_future_ii':'Infinitiv Futur II',  'Indicative':'Indikativ',  'Subjuntive I':'Konjunktiv I',  'Subjuntive II':'Konjunktiv II',  'mixed':'Gemischte Flexion',  'weak':'Schwache Flexion',  'strong':'Starke Flexion',  'adjective':'Adjektiv',  'adverb':'Adverb',  'buchstabe':'Buchstabe',  'conjunction':'Konjunktion',  'interjection':'Interjektion',  'noun':'Nomen',  'pronoun':'Pronomen',  'preposition':'Präposition',  'verb':'Verb'  };  ERROR_LABEL = { 'Error':'Lỗi',  'Portal Extern Services Tool, TT_MyMetaDictionary Service not found':'Không tìm thấy Portal Extern Services Tool hoặc TT_MyMetaDictionary Service !',  'Start or Restart ExternServer please':'Xin vui lòng khởi động hoặc khởi động lại ExternServer !'  };  WIKI_KIND_LABEL = { 'da_label' : 'Danisk',  'de_label' : 'Deutsch',  'en_label' : 'English',  'fr_label' : 'Français',  'it_label' : 'Italiano',  'pt_label' : 'Português',  'ru_label' : 'Русский',  'tr_label' : 'Türkçe',  'vi_label' : 'Việt nam',  'ja_label' : '日本語',  'ko_label' : '한국어',  'zh_label' : '中文',  'checkall_wiki_label':'alles auswählen'  };  DICLEO_KIND_LABEL = {  'deen_label':'Deutsch-Englisch',  'ende_label':'Englisch-Deutsch',  'defr_label':'Deutsch-Französisch',  'frde_label':'Französisch-Deutsch',  'dees_label':'Deutsch-Spanisch',  'esde_label':'Spanisch-Deutsch',  'checkall_DIC_LEO_label':'alles auswählen'  };  }    function tt_setLanguage_vi() {  /*------Portal colum one--*/  BUTTON_SEARCH_TITLE_METADICT = "Tra trong Từ điển";  SHOW_ALL_MEANING = "Hiện tất cả ý nghĩa";  MYMETADICT_LABEL = " Từ điển Bách Việt";  INPUT_LABEL = "Ô tìm kiếm trống";  MSG_INPUT =   "Hãy nhập một từ bạn muốn tìm !";  SELECT_ALL_LABEL = 'Chọn tất cả';  SEARCH_ALL_LABEL = 'Tìm trong tất cả bộ từ điển';  WIKI_LABEL ='Bách khoa toàn thư';  MSG_WIKI_01 = "Chọn một trong các ngôn ngữ phía dưới để tra";  DICLEO_LABEL = 'Đức-Anh, -Pháp, -TBN';  MSG_DICLEO_01 = "Chọn một trong các bộ từ điển phía dưới để tra";  DWDS_LABEL = 'Đại từ điển Đức Đức';  DI_VI_LABEL = 'Từ điển Đức -> Việt';  MSG_DI_VI_01 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa, nếu muốn tra nâng cao hay nhấn vào ';  MSG_DI_VI_02 = 'Chọn tra theo Ngữ pháp hoặc Nghĩa';  SELECT_DICTIONARY_LABEL = 'Chọn từ điển';  SHOW_ALL = 'Hiển thị tất cả';  /*---Dialog Help Advanced-*/  DIALOG_ADVANCED_TITLE1 = 'Trợ giúp tìm kiếm chi tiết';  DIALOG_ADVANCED_TITLE2 = '(Có hiệu lực khi không đánh dấu vào ô Tuyệt đối)';  DIALOG_ADVANCED_CONTENT_01 = 'Tìm kiếm tất cả các từ';  DIALOG_ADVANCED_CONTENT_02 = 'Tìm kiếm tất cả các từ có A';  DIALOG_ADVANCED_CONTENT_03 = 'Tím tất cả các từ có từ đầu là A';  DIALOG_ADVANCED_CONTENT_04 = 'Tím tất cả các từ có từ đầu là A và phía sau là số ký tự từ x đến y';  DIALOG_ADVANCED_CONTENT_05 = 'Tìm tất cả các từ kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_06 = 'Tìm tất cả các từ có từ x đế y số ký tự ban đầu kết thúc bằng A';  DIALOG_ADVANCED_CONTENT_07 = 'Tìm tất cả các từ bắt đầu bằng A và kết thúc bằng B';  DIALOG_ADVANCED_CONTENT_08 = 'Tìm tất cả các từ bắt đầu bằng A, ở giữa có x đến y số ký tự và kết thúc bằng B';  DIALOG_ADVANCED_NOTE_01 = 'Nếu muốn tìm chình xác số ký tự ta chỉ cần giữ lại x';  DIALOG_ADVANCED_NOTE_02 = 'Nếu bạn chuyền vào 1 chuỗi tìm kiếm với định dạng Regular Expressions, việc tìm kiếm vẫn đảm bảo và hoạt động tốt';  DIALOG_ADVANCED_NOTE_03 = 'A,B : có thể là 1 từ hay 1 cụm từ. Nếu bạn muốn chi tiết hơn trong tìm kiếm thì tại A hay B đặt các ký tự trong dấu [], sẽ có kết quả phong phú hơn';  DIALOG_ADVANCED_NOTE_04 = '[Hiện ra ví dụ]';  DIALOG_ADVANCED_NOTE_05 = '2 từ đầu cụm chữ ab, từ thứ 3 là 1 trong 3 chữ E,e hay F, từ cuối là c';  DIALOG_ADVANCED_NOTE_06 = 'bao gồm 1 trong 3 chữ E,e hay F';  DIALOG_ADVANCED_NOTE_07 = '[Ẩn đi ví dụ]';    /*----Advanced Search  DEUTSCH - VIETNAMESE DICTIONARY---------*/  GRAMMAR_LABEL = 'Ngữ pháp';  MEANING_LABEL = 'Ý nghĩa';  GRAMMAR_ADVANCED_LABEL = 'Tìm kiếm chi tiết cho Ngữ pháp';  MEANING_ADVANCED_LABEL = 'Tìm kiếm chi tiết cho Nghĩa';  ADVANCED_LABEL = 'Tìm chi tiết';  WORD_ADVANCED_LABEL = 'Từ muốn tìm';  TYPE_SEARCH_LABEL = 'Tuyệt đối';  BUTTON_PREVIOUS_LABEL = 'Quay lại';  BUTTON_NEXT_LABEL = 'Kế tiếp';  BUTTON_SEARCH_LABEL = 'Tìm kiếm';  RESULT = 'Kết quả';  CBO_BRANCH_LABEL = 'Lĩnh vực';  CBO_PROFESSIONAL_LABEL = 'Chuyên ngành';  CBO_OTHERTYPE_LABEL = 'Loại khác';  CBO_INFLECTION_CLASS = 'Lớp biến tố' ; CBO_KIND_WORD_LABEL = 'Loại từ';  EXAMPLE_LABEL = 'Ví dụ';  MEANING_DETAIL_LABEL = 'Chi tiết về Nghĩa';  GRAMMAR_DETAIL_LABEL = 'Chi tiết về Ngữ pháp';  WORD_LABEL = 'Từ';  ADJECTIVE_LABEL = 'Tính từ';  ADVERB_LABEL ='Trang từ';  BUCHSTABE_LABEL ='Chữ cái';  CONJUNCTION_LABEL ='Từ nối';  INTERJECTION_LABEL = 'Thán từ';  NOUN_LABEL = 'Danh từ';  PRONOUN_LABEL = 'Đại từ';  PREPOSITION_LABEL ='Giới từ';  VERB_LABEL = 'Động từ';    /*---Gramar--de_vi--------------------*/  GRAMMAR_CONTENT_LABEL ={'Features':'Besonderheiten',  'Inflection_class':'Flexionsklasse',  'InflectionForm':'Inflection form',  'Principalparts':'Stammformen',  'comperative':'Flektierte Formen Komparativ',  'Nominative':'Nominativ',  'Accusative':'Akkusativ',  'Dative':'Dativ',  'Genitive':'Genitiv',  'positive':'Flektierte Formen Positiv',  'superlative':'Flektierte Formen Superlativ',  'Genitive_Singular':'Genitiv Singular',  'Nominative_Plural':'Nominativ Plural',  'Article':'Artikel',  'Person':'Person',  'Number':'Numerus',  'Gender':'Gender',  'Auxiliary':'Hilfsverb',  'Singular':'Singular',  'Plural':'Plural',  'Neuter':'Neutrum',  'Feminin':'Feminin',  'Maskulin':'Masculine',  'Person':'Person',  'Participle':'Partizip',  'Infinitive':'Infinitiv',  'present':'Präsens',  'present_subordinate_clause':'Präsens Nebensatz',  'present_main_clause':'Präsens Hauptsatz',  'preterite':'Präteritum',  'imperative':'Imperativ',  'infi_present':'Infinitiv Präsens',  'present_participle':'Partizip Präsens',  'past_participle':'Partizip Perfekt',  'perfect':'Perfekt',  'infi_perfect':'Infinitiv Perfekt',  'past_perfect':'Plusquamperfekt',  'future_i':'Futur I',  'infi_future_i':'Infinitiv Futur I',  'future_ii':'Futur II',  'infi_future_ii':'Infinitiv Futur II',  'Indicative':'Indikativ',  'Subjuntive I':'Konjunktiv I',  'Subjuntive II':'Konjunktiv II',  'mixed':'Gemischte Flexion',  'weak':'Schwache Flexion',  'strong':'Starke Flexion',  'adjective':'Adjektiv',  'adverb':'Adverb',  'buchstabe':'Buchstabe',  'conjunction':'Konjunktion',  'interjection':'Interjektion',  'noun':'Nomen',  'pronoun':'Pronomen',  'preposition':'Präposition',  'verb':'Verb'  };  ERROR_LABEL = { 'Error':'Lỗi',  'Portal Extern Services Tool, TT_MyMetaDictionary Service not found':'Không tìm thấy Portal Extern Services Tool hoặc TT_MyMetaDictionary Service !',  'Start or Restart ExternServer please':'Xin vui lòng khởi động hoặc khởi động lại ExternServer !'  };  WIKI_KIND_LABEL = { 'da_label' : 'Đan Mạch',  'de_label' : 'Đức',  'en_label' : 'Anh',  'fr_label' : 'Pháp',  'it_label' : 'Ý',  'pt_label' : 'Bồ Đào Nha',  'ru_label' : 'Nga',  'tr_label' : 'Thổ Nhĩ Kỳ',  'vi_label' : 'Việt nam',  'ja_label' : 'Nhật',  'ko_label' : 'Hàn Quốc',  'zh_label' : 'Trung Quốc',  'checkall_wiki_label':'Chọn tất cả'  };  DICLEO_KIND_LABEL = {  'deen_label':'Đức - Anh',  'ende_label':'Anh - Đức',  'defr_label':'Đức - Pháp',  'frde_label':'Pháp - Đức',  'dees_label':'Đức - TBN',  'esde_label':'TBN - Đức',  'checkall_DIC_LEO_label':'Chọn tất cả'  };  };TT_DisplayResult_WIKI = Class.create();  TT_DisplayResult_WIKI.prototype = {  initialize: function() {  this.TT_DisplayResultObservable = new Observable();  this.result = null;  this.dictRequest = null;  this.currentTab = null;  this.handleOnTabClick_wiki = this.handleOnTabClick_wiki.bindAsEventListener(this);  this.handleOnTagaClick_wiki = this.handleOnTagaClick_wiki.bindAsEventListener(this);  },    tt_getDisplayResultObservable: function() {  return this.TT_DisplayResultObservable;  },    tt_setResult : function(result){  tt_Hide_ProtectiveScreen();  try{  this.result = $H(result);  }catch(e){  this.result = result;  }  },    tt_setdictRequest : function(dictRequest){  this.dictRequest = dictRequest;  },    tt_dislayResult: function () {  if (typeof this.result == "string") {  ContentMyMetadict.innerHTML = tt_decode_utf8(this.result);  return;  }  var keys = this.result.keys();  if(keys.length > 0){  this.currentTab.style.background = TAB_NOTSELETC_BACKGROUND;  this.currentTab = $(keys[0] + "_tab");  this.currentTab.style.background = TAB_SELETC_BACKGROUND;  if(Prototype.Version == '1.6.0_rc0')  $('divWikiTabContent').innerHTML = tt_decode_utf8(this.result[keys[0]]);  else  $('divWikiTabContent').innerHTML = tt_decode_utf8(this.result.get(keys[0]));  try{    $('jump-to-nav').remove();  }catch(e){}  var aElement = $('divWikiTabContent').getElementsByTagName("a");  for (var index = 0;index < aElement.length;index ++){  try{  if ( aElement[index].href.indexOf('mymetadictionary') < 0){  aElement[index].target = '_blank';  }  else{  var linkTemp = aElement[index].href.split('mymetadictionary');  var testTemp = linkTemp[1].split('/');  if(testTemp[1]=='w'){                              aElement[index].href = 'http://' + keys[0] + '.wikipedia.org' + linkTemp[1];  aElement[index].target = '_blank';  }  else{  if((linkTemp[1].indexOf('Image:')>0) ||(linkTemp[1].indexOf(':')>0)) {                                  aElement[index].href = 'http://' + keys[0] + '.wikipedia.org' + linkTemp[1];  aElement[index].target = '_blank';  }  else{  if (linkTemp[1].indexOf('#')==0){  myLocaltion = window.location.toString().split("#")[0];  while (myLocaltion[myLocaltion.length-1] == "#" || myLocaltion[myLocaltion.length-1] == "/")  myLocaltion = myLocaltion.substring(0, myLocaltion.length-1);  aElement[index].href = myLocaltion + linkTemp[1];  }  else{                                      aElement[index].href = 'javascript://';                                      Event.observe(aElement[index], 'click', this.handleOnTagaClick_wiki, false );  }  }  }  }  }  catch(e){}  }  }  else {  $('divWikiTabContent').innerHTML = "<div><center></center></div>";  }  },    handleOnTabClick_wiki:function(event){  $('divWikiTabContent').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  var key = event.target.id.split('_')[0];  this.currentTab.style.background = TAB_NOTSELETC_BACKGROUND;  this.currentTab = $(event.target.id);  this.currentTab.style.background = TAB_SELETC_BACKGROUND;  this.dictRequest['tt_option'] = this.currentTab.id.split('_')[0];  this.dictRequest['next'] = '1';  LangCurrent_WIKI = this.currentTab.id.split('_')[0];  tt_Show_ProtectiveScreen();  this.TT_DisplayResultObservable.notifyObservers("tt_getData", this.dictRequest)  },    handleOnTagaClick_wiki:function(event){  $('inputWord').value = event.target.title.strip();  $('divWikiTabContent').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  this.dictRequest['tt_word'] = $('inputWord').value;  this.dictRequest['tt_option'] = this.currentTab.id.split('_')[0];  if($(this.dictRequest['tt_option']).checked == false)  $(this.dictRequest['tt_option']).checked = true;  this.dictRequest['next'] = '0';  this.dictRequest['tt_option_list'] = "";  for (var index = 0;index < LANG_WIKI.length; index ++)  if($(LANG_WIKI[index]).checked == true)  this.dictRequest['tt_option_list'] += $(LANG_WIKI[index]).value + ",";  tt_Show_ProtectiveScreen();  this.TT_DisplayResultObservable.notifyObservers("tt_getData", this.dictRequest)  },    tt_create_Tab_wiki :function(){  ContentMyMetadict.innerHTML = "" ; ContentMyMetadict.style.overflow = "auto";  var arrKeys =this.dictRequest['tt_option_list'].split(",");  if(arrKeys[0] != ""){  if(arrKeys.indexOf(LangCurrent_WIKI)<=0)  LangCurrent_WIKI = arrKeys[0];  var htmlStr = "<div id='heatIndex'><ul class = 'Tab_Dict'>" ; for (i=0; i<arrKeys.length-1; i++) {  if(arrKeys[i] == LangCurrent_WIKI)                      htmlStr += "<li ><a id='"+LangCurrent_WIKI+"_tab' href='javascript://' class = 'Tab_Search_selected'>" + WIKI_KIND_LABEL[LangCurrent_WIKI+ '_label'] + "</a></li>" ; else                      htmlStr += "<li ><a id='"+arrKeys[i]+"_tab' href='javascript://'>" + WIKI_KIND_LABEL[arrKeys[i] + '_label'] + "</a></li>"  }              htmlStr += "</ul>\                  <div id='divWikiTabContent' class = 'Content_dict_WIKI'></div></div>" ; ContentMyMetadict.innerHTML =  htmlStr;  for (var index = 0;index< arrKeys.length-1; index ++)  Event.observe($(arrKeys[index] + "_tab"), 'click', this.handleOnTabClick_wiki, false );  this.currentTab = $(LangCurrent_WIKI + "_tab");  $('divWikiTabContent').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif'/></center>";  }  }  };TT_DisplayResult_DIC_LEO = Class.create();  TT_DisplayResult_DIC_LEO.prototype = {  initialize: function() {  this.TT_DisplayResultObservable = new Observable();  this.TT_DisplayResultTable_DIC_LEOObservable = new Observable();  this.result = null;  this.resultTable_DIC_LEO = null;  this.dictRequest = null;  this.dictRequestTable_DIC_LEO = null;  this.xDialog_Table_DIC_LEO = 0;  this.yDialog_Table_DIC_LEO = 0;  this.scrOfY = 0;  this.scrOfX = 0;  this.currentTab_DIC_LEO = null;  this.currentImg_DIC_LEO = null;  this.COUTN_DIC_LEO = 15;  this.position = null;  this.lenDictResult = 0;  this.handleOnTabClick_DIC_LEO = this.handleOnTabClick_DIC_LEO.bindAsEventListener(this);  this.handleOnTagaClick_DIC_LEO = this.handleOnTagaClick_DIC_LEO.bindAsEventListener(this);  this.handleOnHeadRowClick_DIC_LEO = this.handleOnHeadRowClick_DIC_LEO.bindAsEventListener(this);  this.handleOnClickMore_DIC_LEO = this.handleOnClickMore_DIC_LEO.bindAsEventListener(this);  this.handleOnClickImg_DIC_LEO = this.handleOnClickImg_DIC_LEO.bindAsEventListener(this);  this.tt_dislayResultTable_DIC_LEO = this.tt_dislayResultTable_DIC_LEO.bind(this);  this.handleOnMouseMove_Table_DIC_LEO = this.handleOnMouseMove_Table_DIC_LEO.bindAsEventListener(this);  this.handleOnClick_Showall_dicleo = this.handleOnClick_Showall_dicleo.bindAsEventListener(this);  },    tt_getDisplayResultObservable: function() {  return this.TT_DisplayResultObservable;  },    tt_getDisplayResultTable_DIC_LEOObservable: function() {  return this.TT_DisplayResultTable_DIC_LEOObservable;  },    tt_setResult : function(result){  tt_Hide_ProtectiveScreen();  try{  this.result = $H(result);  }catch(e){  this.result = result;  }  },    tt_setResultTable_DIC_LEO : function(result){  tt_Hide_ProtectiveScreen();  this.resultTable_DIC_LEO = result;  },    tt_setdictRequest : function(dictRequest){  this.dictRequest = dictRequest;  },    tt_dislayResult: function () {  if (typeof this.result == "string") {  ContentMyMetadict.innerHTML = tt_decode_utf8(this.result);  return  }  var keyArr = this.result.keys();  if(keyArr.length > 0){  this.currentTab_DIC_LEO.style.background = TAB_NOTSELETC_BACKGROUND;  this.currentTab_DIC_LEO = $(keyArr[0] + '_tab');  this.currentTab_DIC_LEO.style.background = TAB_SELETC_BACKGROUND;  if(Prototype.Version == '1.6.0_rc0')  this.tt_create_table_DIC_LEO(this.result[keyArr[0]],keyArr[0]);  else  this.tt_create_table_DIC_LEO(this.result.get(keyArr[0]),keyArr[0]);  }  else {  $('divDIC_LEOTabContent').innerHTML = "<div><center></center></div>";  }  },    handleOnMouseMove_Table_DIC_LEO:function(event){  var dialog = $('dialog_table');  try {  if (parseInt(event.clientX)+ parseInt(this.scrOfX) < parseInt(dialog.nw['x'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Table_DIC_LEO, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientY)+ parseInt(this.scrOfY) < parseInt(dialog.nw['y'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Table_DIC_LEO, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientX) + parseInt(this.scrOfX) > parseInt(dialog.se['x'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Table_DIC_LEO, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientY) + parseInt(this.scrOfY) > parseInt(dialog.se['y'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Table_DIC_LEO, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  }catch(e){}  },  tt_dislayResultTable_DIC_LEO: function () {  var imgElement = this.currentImg_DIC_LEO.getElementsByTagName("img");  imgElement[0].style.display = 'block';  imgElement[1].style.display = 'none';  var dialog = document.createElement("div");  document.body.appendChild(dialog);  dialog.innerHTML = this.resultTable_DIC_LEO ;  if(Prototype.Browser.IE){  dialog.style.position = "absolute";  dialog.style.border = "1px solid #B2B2B2";  dialog.style.background = "#FFE381";    }  else  dialog.setAttribute("class","dialog");  dialog.style.width = dialog.clientWidth + "px";  dialog.style.height = dialog.clientHeight + "px";  if(this.position == 'left'){  dialog.style.top = this.yDialog_Table_DIC_LEO.toString() + "px";  dialog.style.left = this.xDialog_Table_DIC_LEO.toString() + "px";  }  else{  dialog.style.top = this.yDialog_Table_DIC_LEO + "px";  dialog.style.left = (this.xDialog_Table_DIC_LEO -dialog.clientWidth + 10) + "px";  }  if(dialog.offsetTop + dialog.clientHeight > this.scrOfY  + dialog.offsetTop)  dialog.style.top = (dialog.offsetTop - dialog.clientHeight +10) + "px";  dialog.setAttribute("id","dialog_table");  var imgElements = $('dialog_table').getElementsByTagName("img");  dialog.style.display = 'none';  tt_Effect = new Effect.SlideDown($('dialog_table'));  for(var index=0;index<imgElements.length;index++)              if(imgElements[index].src == 'http://dict.leo.org/p.gif')  imgElements[index].src = "TT_MetaDictionary/image/p_"+KindSite+".gif";  dialog.nw={'x': parseInt(dialog.style.left),'y': parseInt(dialog.style.top)};  dialog.se={'x': parseInt(dialog.style.left) + parseInt(dialog.style.width),'y': parseInt(dialog.style.top) + parseInt(dialog.style.height)};  Event.observe(document, 'mousemove', this.handleOnMouseMove_Table_DIC_LEO, false );  },    handleOnTabClick_DIC_LEO:function(event){  $('divDIC_LEOTabContent').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  this.currentTab_DIC_LEO.style.background = TAB_NOTSELETC_BACKGROUND;  this.currentTab_DIC_LEO = $(event.target.id);  this.currentTab_DIC_LEO.style.background = TAB_SELETC_BACKGROUND;  this.dictRequest['tt_option'] = this.currentTab_DIC_LEO.id.split('_')[0];  this.dictRequest['next'] = '1';  if($('inputWord').value.strip() != '')  this.dictRequest['tt_word'] = $('inputWord').value.strip();  else  $('inputWord').value = this.dictRequest['tt_word'];  LangCurrent_DICLEO = this.currentTab_DIC_LEO.id.split('_')[0];  tt_Show_ProtectiveScreen();  this.TT_DisplayResultObservable.notifyObservers("tt_getData", this.dictRequest);  },    handleOnTagaClick_DIC_LEO:function(event){  var tt_word = "";  $('divDIC_LEOTabContent').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  if(Prototype.Browser.IE){  tt_word = event.target.title;  }  else{  if (event.target.tagName == 'B')  tt_word = event.target.parentNode.textContent ;  else  tt_word = event.target.textContent ;  }  $('inputWord').value = tt_word.strip();    this.dictRequest['tt_word'] = $('inputWord').value;    this.dictRequest['tt_option'] = this.currentTab_DIC_LEO.id.split('_')[0];    if($(this.dictRequest['tt_option']).checked == false)  $(this.dictRequest['tt_option']).checked = true;    this.dictRequest['next'] = '0';    this.dictRequest['tt_option_list'] = "";    for (var index = 0;index < LANG_DIC_LEO.length; index ++)  if($(LANG_DIC_LEO[index]).checked == true)  this.dictRequest['tt_option_list'] += $(LANG_DIC_LEO[index]).value + ",";  tt_Show_ProtectiveScreen();    this.TT_DisplayResultObservable.notifyObservers("tt_getData", this.dictRequest)  },    tt_create_Tab_DIC_LEO :function(){  ContentMyMetadict.innerHTML = "" ; ContentMyMetadict.style.overflow = "auto";  var arrKeys =this.dictRequest['tt_option_list'].split(",");  if(arrKeys[0] != ""){  var htmlStr = "<div id='heatIndex'><ul class = 'Tab_Dict' style='border:none;'>" ; if(arrKeys.indexOf(LangCurrent_DICLEO)<=0)  LangCurrent_DICLEO = arrKeys[0];  for (i=0; i<arrKeys.length-1; i++) {  if(arrKeys[i] == LangCurrent_DICLEO)                      htmlStr += "<li><a id='"+arrKeys[i]+"_tab' href='javascript://' class = 'Tab_Search_selected'>" + DICLEO_KIND_LABEL[arrKeys[i]+'_label'] + "</a></li>" ; else                      htmlStr += "<li><a id='"+arrKeys[i]+"_tab' href='javascript://'>" + DICLEO_KIND_LABEL[arrKeys[i] +'_label'] + "</a></li>"  }              htmlStr += "</ul>\                  <div id='divDIC_LEOTabContent' class = 'Content_dict_DIC_LEO'></div></div>" ; ContentMyMetadict.innerHTML  = htmlStr;  for (var index = 0;index< arrKeys.length-1; index ++){  Event.observe($(arrKeys[index] + "_tab"), 'click', this.handleOnTabClick_DIC_LEO, false );  }  this.currentTab_DIC_LEO = $(LangCurrent_DICLEO + "_tab");  $('divDIC_LEOTabContent').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  }  },    handleOnHeadRowClick_DIC_LEO:function(event){  var key = event.target.id.split('_')[0];  if($(key+"_tdDetail").style.display == "none"){  $(key+"_hinh").src='TT_MetaDictionary/image/arrowDown.gif';  $(key+"_tdDetail").style.display = "none";  tt_Effect = new Effect.SlideDown($(key+"_tdDetail"));  try {  $(key+"_more").style.display = "block";  }catch(e){}  }  else {  $(key+"_hinh").src='TT_MetaDictionary/image/arrowRight.gif';  tt_Effect = new Effect.SlideUp($(key+"_tdDetail"));  try {  $(key+"_more").style.display = "none";  }catch(e){}  }  },    handleOnClickImg_DIC_LEO:function(event){  var tt_word = "" ; if (event.target.tagName == 'IMG'){  tt_word = event.target.parentNode.id;  this.currentImg_DIC_LEO = $(event.target.parentNode.id);  }  else{  tt_word = event.target.id;  this.currentImg_DIC_LEO = $(event.target.id);  }    var imgElement = this.currentImg_DIC_LEO.getElementsByTagName("img");  imgElement[0].style.display = 'none';  imgElement[1].style.display = 'block';  if(Prototype.Browser.IE){  this.scrOfY = document.documentElement.scrollTop;  this.scrOfX = document.documentElement.scrollLeft;  }  else{  this.scrOfY = window.pageYOffset;  this.scrOfX = window.pageXOffset;  }  this.xDialog_Table_DIC_LEO = parseInt(event.clientX + this.scrOfX);  this.yDialog_Table_DIC_LEO = parseInt(event.clientY + this.scrOfY);  if(tt_word.split('_')[1] == 'de')  this.position = 'right';  else  this.position = 'left';  this.dictRequestTable_DIC_LEO = {};  this.dictRequestTable_DIC_LEO['tt_word'] = tt_word.toString();  this.dictRequestTable_DIC_LEO['tt_option'] = this.currentTab_DIC_LEO.id.split('_')[0];  this.dictRequestTable_DIC_LEO['tt_img'] = imgElement[0].src;  tt_Show_ProtectiveScreen();  this.TT_DisplayResultTable_DIC_LEOObservable.notifyObservers("tt_getDataTable_DIC_LEO", this.dictRequestTable_DIC_LEO)  },    handleOnClickMore_DIC_LEO:function(event){  var Parentkeys = event.target.parentNode.parentNode.id.split('_');  var keys = event.target.id.split('_');  var dict = null;  var dictkeys = null;  var arrTd = null;  if(Prototype.Version == '1.6.0_rc0'){  dict = $H(this.result[Parentkeys[1]]);  dictkeys = dict.keys();  arrTd = eval(dict[dictkeys[Parentkeys[0]]]);  }  else{  dict = $H(this.result.get(Parentkeys[1]));  dictkeys = dict.keys();  arrTd = eval(dict.get(dictkeys[Parentkeys[0]]));  }  var curentCount = parseInt(Parentkeys[2]);  var strHTML = "";  if(keys[1] == 'pre'){  if(curentCount >this.COUTN_DIC_LEO){  var stop = 0;  var start = 0;  var tt = curentCount % this.COUTN_DIC_LEO;  if(tt == 0){  stop = curentCount - this.COUTN_DIC_LEO - tt;  start =  stop - this.COUTN_DIC_LEO;  if(start <this.COUTN_DIC_LEO){  start = 0;  stop = this.COUTN_DIC_LEO;  }  }  else{  stop = curentCount - tt;  start =  stop - this.COUTN_DIC_LEO;  }  for(var index =start;index<stop;index++){  strHTML+= tt_decode_utf8(arrTd[index]);  }  event.target.parentNode.parentNode.id = Parentkeys[0] + "_" + Parentkeys[1] + "_" + stop.toString();  $(keys[0] + '_tdDetail').innerHTML = "<table id = '"+keys[0]+"_table_content' style = 'width: 100%;'>" + strHTML + "</table>";  var trElement  = $(keys[0]+'_table_content').getElementsByTagName("tr");    for(var indextr =0;indextr < trElement.length;indextr++){  try{  if((trElement[indextr].getAttribute('bgcolor')=="#FFF8CC")||(trElement[indextr].getAttribute('bgcolor')=="#fff8cc")){  trElement[indextr].setAttribute('bgcolor',"#FFF");  trElement[indextr].setAttribute("class","rowDialog");  }  }catch(e){}  }  }  }  else{  try{  var temp = arrTd.length  }catch(e){return}  if(curentCount < arrTd.length){  var start = curentCount;  var stop = arrTd.length;  if(start + this.COUTN_DIC_LEO < arrTd.length)  stop = start + this.COUTN_DIC_LEO;  for(var index =start;index<stop;index++){  strHTML+= tt_decode_utf8(arrTd[index]);  }  event.target.parentNode.parentNode.id = Parentkeys[0] + "_" + Parentkeys[1] + "_" + stop.toString();  $(keys[0] + '_tdDetail').innerHTML = "<table id = '"+keys[0]+"_table_content' style = 'width: 100%;'>" + strHTML + "</table>"  ;  var trElement  = $(keys[0]+'_table_content').getElementsByTagName("tr");  for(var indextr =0;indextr < trElement.length;indextr++){  try{  if((trElement[indextr].getAttribute('bgcolor')=="#FFF8CC")||(trElement[indextr].getAttribute('bgcolor')=="#fff8cc")){  trElement[indextr].setAttribute('bgcolor',"#FFF");  trElement[indextr].setAttribute("class","rowDialog");  }  }catch(e){}  }  }  }  var aElement = $(keys[0] + '_tdDetail').getElementsByTagName("A");  for(var index = 0; index < aElement.length; index ++){               aElement[index].href = 'javascript://';  aElement[index].id = keys[0]+"_"+index+'a_dicleo';  if(Prototype.Browser.IE){  aElement[index].title = aElement[index].innerText;  var bElement  = aElement[index].getElementsByTagName("B");  if(bElement.length > 0)  bElement[0].title = aElement[index].innerText;  }  Event.observe(aElement[index], 'click', this.handleOnTagaClick_DIC_LEO, false );  }  var imgElement  = $(keys[0] + '_tdDetail').getElementsByTagName("IMG");  for(var index = 0; index < imgElement.length; index ++){  try{  var parent = imgElement[index].parentNode;  var strimg = imgElement[index].src.split('/');  var imgTemp = strimg[strimg.length-1].split('.');  var funcOnclick =  imgElement[index].onclick.toString();  parent.removeChild(imgElement[index]);  var id_parent = "";  if(Prototype.Browser.IE)                      id_parent =  funcOnclick.split("'")[1];  else                      id_parent =  funcOnclick.split('"')[1];                      parent.id = id_parent;  parent.style.cursor =  "pointer";                  parent.innerHTML = "<img id = '" + parent.id+ "_hinh' src='TT_MetaDictionary/image/"+ imgTemp[0] +"_"+KindSite+ "."+imgTemp[1]+"'/>\                                      <img id = '" + parent.id+ "_hinh1' style = 'display: none;' src='TT_MetaDictionary/image/indicator.gif'/>";  Event.observe(parent, 'click', this.handleOnClickImg_DIC_LEO, false );  if(id_parent.split('_')[1] == 'b')  $(parent.id+ "_hinh").style.display = "none";  }catch(e){}  }  },  handleOnClick_Showall_dicleo:function(event){  var id = event.target.id ; var style = 'block';  var image = 'TT_MetaDictionary/image/arrowDown.gif';  if($(id).checked == false){  image = 'TT_MetaDictionary/image/arrowRight.gif';  style = 'none';  }  for(var i=0;i<this.lenDictResult;i++){  $(i+ "_tdDetail").style.display = style;  try {  $(i+"_more").style.display = style;  }catch(e){}  $(i+"_hinh").src = image;  }  },  tt_create_table_DIC_LEO :function(dict,key){  dict = $H(dict);  var keys = dict.keys();  this.lenDictResult = keys.length;  var strHTML = "<div style = 'width : 100%; height : 100%;'>";  var flag = [];  strHTML += "<div style = 'width : 100%;'><table style = 'width : 100%;'><tr><td class = 'trHead1'></td>";  if(Prototype.Version == '1.6.0_rc0'){              strHTML += "<td class = 'trHead2' align='center'>"+ tt_decode_utf8(LANG_DIC_LEO_CONTENT[key].split('-')[0])+"</td>\  <td class = 'trHead3'></td>\  <td class = 'trHead2' align='center'>" + tt_decode_utf8(LANG_DIC_LEO_CONTENT[key].split('-')[1])+"</td>\                  <td class = 'trHead3'></td>";  }  else{              strHTML += "<td class = 'trHead2' align='center'>"+ LANG_DIC_LEO_CONTENT.get(key).split('-')[0]+"</td>\  <td class = 'trHead3'></td>\  <td class = 'trHead2' align='center'>" + LANG_DIC_LEO_CONTENT.get(key).split('-')[1]+"</td>\                  <td class = 'trHead3'></td>";  }          strHTML += "</tr><tr><td colspan='4' align='right' class = 'ShowallDicleo'>\  <input type='checkbox' id='ShowallDicleo_"+key+"' name='ShowallDicleo' value='ShowallDicleo' checked = true >\  <label for = 'ShowallDicleo_"+key+"'> "+SHOW_ALL+"</label>\                              </td></tr></table></div>";          for(var index = 0;index< keys.length;index++){              strHTML += "<div><table style = 'width : 100%;'><tr> \  <td class = 'trHead1' id = '" + index.toString()+ "_head' style = 'cursor: pointer;'> <img id = '" + index.toString() + "_hinh' style = 'cursor: pointer;' src='TT_MetaDictionary/image/arrowRight.gif'/> </td>\  <td class = 'trHead2'>" + keys[index] + "</td></tr></table></div>\                          <div id = '"+ index.toString() +"_tdDetail'style = 'width: 100%;' class = 'Dicleo_detail'><table id = '"+index.toString()+"_table_content' style = 'width: 100%;'>" ; var tt_tds = [];  if(Prototype.Version == '1.6.0_rc0')  tt_tds = eval((dict[keys[index]]));  else  tt_tds = eval((dict.get(keys[index])));  for(var index_tr =0;index_tr < tt_tds.length;index_tr++)  if(index_tr <= this.COUTN_DIC_LEO)  strHTML +=  tt_decode_utf8(tt_tds[index_tr]);  strHTML += "</table></div>";  if(tt_tds.length > this.COUTN_DIC_LEO){  flag.push(index);                  strHTML += "<div id ='" + index.toString() + "_more' style = 'width: 100%;' class = 'Dicleo_more'><table style = 'width: 100%;' border = '0'>\  <tr id = '" + index.toString()+ "_" + key + "_" + this.COUTN_DIC_LEO.toString() + "'>\  <td class = 'trMore1' ></td>\  <td class = 'trMore'><input class='commandButton_Pre' type='button' value='zurück' id = '"+index.toString() +"_pre'/></td>\  <td class = 'trMore'><input class='commandButton_Next' type='button' value='mehr' id = '"+index.toString() +"_next'/></td>\  <tr>\                                   </table></div>";  }  }  strHTML += "</div>";  $('divDIC_LEOTabContent').innerHTML = strHTML;  Event.observe($("ShowallDicleo_"+key), 'click', this.handleOnClick_Showall_dicleo, false );  for(var index = 0;index< keys.length;index++){  Event.observe($(index.toString() + "_head"), 'click', this.handleOnHeadRowClick_DIC_LEO, false );  }  for(var indexkey = 0; indexkey < keys.length; indexkey ++){  var aElement  = $(indexkey.toString() + '_tdDetail').getElementsByTagName("A");  for(var index = 0; index < aElement.length; index ++){                   aElement[index].href = 'javascript://';  aElement[index].id = indexkey + "_"+ index + 'a_dicleo';  if(Prototype.Browser.IE){  aElement[index].title = aElement[index].innerText;  var bElement  = aElement[index].getElementsByTagName("B");  if(bElement.length > 0)  bElement[0].title = aElement[index].innerText;  }  Event.observe(aElement[index], 'click', this.handleOnTagaClick_DIC_LEO, false );  }  var imgElement  = $(indexkey.toString() + '_tdDetail').getElementsByTagName("IMG");  for(var index = 0; index < imgElement.length; index ++){  try{  var parent = imgElement[index].parentNode;  var strimg = imgElement[index].src.split('/');  var imgTemp = strimg[strimg.length-1].split('.');  var funcOnclick =  imgElement[index].onclick.toString();  parent.removeChild(imgElement[index]);  var id_parent = "";  if(Prototype.Browser.IE)                          id_parent =  funcOnclick.split("'")[1];  else                          id_parent =  funcOnclick.split('"')[1];                      parent.id = id_parent;  parent.style.cursor =  "pointer";                      parent.innerHTML = "<img id = '" + parent.id+ "_hinh' src='TT_MetaDictionary/image/"+ imgTemp[0] +"_"+KindSite+ "."+imgTemp[1]+"'/>\                                          <img id = '" + parent.id+ "_hinh1' style = 'display: none;' src='TT_MetaDictionary/image/indicator.gif'/>";  Event.observe(parent, 'click', this.handleOnClickImg_DIC_LEO, false );  if(id_parent.split('_')[1] == 'b')  $(parent.id+ "_hinh").style.display = "none";  }catch(e){}  }  }  for(var index = 0;index <flag.length;index ++){  var tdElement = $(flag[index].toString() + '_more').getElementsByTagName("td");  for(var indextd = 0;indextd<tdElement.length;indextd++)  Event.observe(tdElement[indextd], 'click', this.handleOnClickMore_DIC_LEO, false );  }    for(var index = 0;index< keys.length;index++){  var trElement  = $(index .toString()+'_table_content').getElementsByTagName("tr");  for(var indextr =0;indextr < trElement.length;indextr++){  if((trElement[indextr].getAttribute('bgcolor')=="#FFF8CC")||(trElement[indextr].getAttribute('bgcolor')=="#fff8cc")){  trElement[indextr].setAttribute('bgcolor',"#FFF");  if((Prototype.Browser.IE) && (KindSite =='TUM'))  trElement[indextr].style.background = "#F5F7F6";  trElement[indextr].setAttribute("class","rowDialog");        }  }  }  }  };TT_DisplayResult_DWDS = Class.create();  TT_DisplayResult_DWDS.prototype = {  initialize: function() {  this.TT_DisplayResultObservable = new Observable();  this.result = null;  this.dictRequest = null;  this.currentTab_DWDS = null;  this.Dict_kind = null;  },    tt_getDisplayResultObservable: function() {  return this.TT_DisplayResultObservable;  },    tt_setResult : function(result){  tt_Hide_ProtectiveScreen();  this.result = result;  },    tt_setdictRequest : function(dictRequest){  this.dictRequest = dictRequest;  },    tt_dislayResult: function () {  ContentMyMetadict.innerHTML = "<div></div>";  ContentMyMetadict.style.overflow = "auto";  if (typeof this.result == "string") {  ContentMyMetadict.innerHTML = tt_decode_utf8(this.result);  return  }  this.result = $H(this.result);  var keyArr = this.result.keys();  if(keyArr.length > 0){  this.handleOnTabClick_DWDS = this.handleOnTabClick_DWDS.bindAsEventListener(this);  this.handleOnTagaClick_DWDS = this.handleOnTagaClick_DWDS.bindAsEventListener(this);  ContentMyMetadict.innerHTML  = this.tt_create_Tab_DWDS();  this.tt_setDefault_DWDS(0);  for (var index = 0;index< 4; index ++){  Event.observe($(index.toString() + "_tabDWDS"), 'click', this.handleOnTabClick_DWDS, false );  }  }  },    handleOnTabClick_DWDS:function(event){  var key = event.target.id.split('_')[0];  this.currentTab_DWDS.style.background = TAB_NOTSELETC_BACKGROUND;  this.currentTab_DWDS = $(event.target.id);  this.currentTab_DWDS.style.background = TAB_SELETC_BACKGROUND;  try{  if(Prototype.Version == '1.6.0_rc0')  $('divDWDSTabContent').innerHTML = "<center>" + tt_decode_utf8(this.result[key]) + "</center>";  else  $('divDWDSTabContent').innerHTML = "<center>" + tt_decode_utf8(this.result.get(key)) + "</center>";  }  catch(e){  if(Prototype.Version == '1.6.0_rc0')  $('divDWDSTabContent').innerHTML = this.result[key];  else  $('divDWDSTabContent').innerHTML = this.result.get(key);  }  var divElement = $('divDWDSTabContent').getElementsByTagName("div");  if(divElement.length < 1) return;  divElement[0].style.width = "100%";  divElement[0].style.height = "100%";  divElement[0].style.border = "none";  var mapElement= $('divDWDSTabContent').getElementsByTagName("map");  if(mapElement.length > 0){  var areaElement= $('divDWDSTabContent').getElementsByTagName("area");  for (var index = 0;index < areaElement.length;index ++){  areaElement[index].id = areaElement[index].title;                  areaElement[index].href = 'javascript://';  Event.observe(areaElement[index], 'click', this.handleOnTagaClick_DWDS, false );  }  var aElement = $('divDWDSTabContent').getElementsByTagName("a");  for (var index = 0;index < aElement.length;index ++)  aElement[index].target = '_blank';  }  else{  var aElement = $('divDWDSTabContent').getElementsByTagName("a");  for (var index = 0;index < aElement.length;index ++){  if(aElement[index].href.indexOf('kompakt=1&qu=') > 0) {  var id = aElement[index].href.split('=');  if(id[id.length-1] == '1')  aElement[index].title = aElement[index].textContent;  else  aElement[index].title = decodeURIComponent(id[id.length-1]);                      aElement[index].href = 'javascript://';  Event.observe(aElement[index], 'click', this.handleOnTagaClick_DWDS, false );  }  else{  aElement[index].target = '_blank';  }  }  }  var imgElement = $('divDWDSTabContent').getElementsByTagName("IMG");  if (key == '0')  for (var index = 0;index < imgElement.length;index++){  imgElement[index].src = 'TT_MetaDictionary/image/kr_bl14.gif';  imgElement[index]._base_href = '';  }  if(key == '3')  {  var srcimg = imgElement[0].src.split('search_coll_graph2') ;             imgElement[0].src = 'http://www.dwds.de/search_coll_graph2'+ srcimg[srcimg.length-1];  }  },    handleOnTagaClick_DWDS:function(event){  if (event.target.tagName == 'IMG')  $('inputWord').value = event.target.parentNode.title.strip();  else  $('inputWord').value = event.target.title.strip();  ContentMyMetadict.innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  this.dictRequest['tt_word'] = $('inputWord').value;  tt_Show_ProtectiveScreen();  this.TT_DisplayResultObservable.notifyObservers("tt_getData", this.dictRequest)  },    tt_setDefault_DWDS :function(key){  this.currentTab_DWDS = $(key.toString() + "_tabDWDS");  if(Prototype.Version == '1.6.0_rc0')  $('divDWDSTabContent').innerHTML = '' + tt_decode_utf8(this.result[key.toString()]);  else  $('divDWDSTabContent').innerHTML = tt_decode_utf8(this.result.get(key.toString()));  var divElement = $('divDWDSTabContent').getElementsByTagName("div");  divElement[0].style.width  = "100%";  divElement[0].style.height = "100%";  divElement[0].style.border = "none";  var aElement = $('divDWDSTabContent').getElementsByTagName("a");  for (var index = 0;index < aElement.length;index ++){  if(aElement[index].href.indexOf('kompakt=1&qu=') > 0) {  var id = aElement[index].href.split('=');  if(id[id.length-1] == '1')  aElement[index].title = aElement[index].textContent;  else  aElement[index].title = decodeURIComponent(id[id.length-1]);                  aElement[index].href = 'javascript://';  Event.observe(aElement[index], 'click', this.handleOnTagaClick_DWDS, false );  }  else{  aElement[index].target = '_blank';  }  }  var imgElement = $('divDWDSTabContent').getElementsByTagName("IMG");  for (var index = 0;index < imgElement.length;index++){  imgElement[index].src = 'TT_MetaDictionary/image/kr_bl14.gif';  imgElement[index]._base_href = '';  }  },    tt_create_Tab_DWDS :function(){  var TabTaile  = {0:'Wörterbuchartikel aus dem WDG',  1:'Automatisch berechnete semantische Relationen aus dem WDG',  2:'Textbeispiele aus dem DWDS Kerncorpus',  3:'Automatisch berechnete Kollokationen aus dem DWDS Kerncorpus'};  var tt = 0;  var htmlStr = "<div><ul class = 'Tab_Dict' style='border:none;' align='right'>" ;         htmlStr += "<li><a id='"+tt.toString()+"_tabDWDS' href='javascript://' class = 'Tab_Search_selected'>" + TabTaile[0] + "</a></li>" ; for (i=1; i<4; i++)              htmlStr += "<li><a id='"+i.toString()+"_tabDWDS' href='javascript://' >" + TabTaile[i] + "</a></li>" ; htmlStr += "</ul><div id='divDWDSTabContent' class = 'Content_dict_DWDS'></div></div>" ; return htmlStr;  }  };TT_Create_Meaning = Class.create();  TT_Create_Meaning.prototype = {  initialize: function(dict) {  this.dict = $H(dict);  this.COUTN_DE_VI = 10;  this.handleOnClickMore_DE_VI = this.handleOnClickMore_DE_VI.bindAsEventListener(this);  this.handleOnHeadRowMeaningClick_DE_VI = this.handleOnHeadRowMeaningClick_DE_VI.bindAsEventListener(this);  this.OnClickShowAllMeaning = this.OnClickShowAllMeaning.bindAsEventListener(this);  },    handleOnClickMore_DE_VI:function(event){  var Parentkeys = event.target.parentNode.parentNode.id.split('_');  var keys = event.target.id.split('_');  var dictkeys = this.dict.keys();  if(Prototype.Version == '1.6.0_rc0'){  var tt_temp = $H(this.dict[Parentkeys[0]]);  var tt_content = $H(tt_temp['example']);  }  else{  var tt_temp = $H(this.dict.get(Parentkeys[0]));  var tt_content = $H(tt_temp.get('example'));  }  var tt_keysContent = tt_content.keys();  var Len_content = tt_keysContent.length;  var curentCount = parseInt(Parentkeys[1]);  var strHTML = "";  if(keys[1] == 'pre'){  if(curentCount >this.COUTN_DE_VI){  var stop = 0 ; var start = 0 ; var tt = curentCount % this.COUTN_DE_VI;  if(tt == 0){  stop = curentCount - this.COUTN_DE_VI - tt;  start =  stop - this.COUTN_DE_VI;  if(start <this.COUTN_DE_VI){  start = 0;  stop  = this.COUTN_DE_VI;  }  }  else{  stop = curentCount - tt;  start =  stop - this.COUTN_DE_VI;  }  for(var i = start;i< stop;i++){  if(Prototype.Version == '1.6.0_rc0'){  var tt = $H(tt_content[tt_keysContent[i]]);  var tt_example_content = tt['content'];  var tt_example_meaning = tt['Meaning'];  }  else{  var tt = $H(tt_content.get(tt_keysContent[i]));  var tt_example_content = tt.get('content');  var tt_example_meaning = tt.get('Meaning');  }  if((tt_decode_utf8(tt_example_content) != 'nothing') && (tt_decode_utf8(tt_example_meaning) != 'nothing')){                          strHTML += "<tr><td class ='Content_Meaning' style = 'width : 5%;'></td>\  <td class ='Content_Meaning' style = 'width : 50%;'>"+ tt_decode_utf8(tt_example_content)  + "</td>\                                          <td class ='Content_Meaning' style = 'width : 45%;'>" + tt_decode_utf8(tt_example_meaning) + "</td></tr>";  }  }  event.target.parentNode.parentNode.id = Parentkeys[0] + "_" + stop.toString();  $(keys[0] + '_tdDetail').innerHTML = "<table style = 'width: 100%;'>" + strHTML + "</table>"  }  }  else{  if(curentCount < Len_content){  var start = curentCount;  var stop = Len_content;  if(start + this.COUTN_DE_VI < Len_content)  stop = start + this.COUTN_DE_VI;  for(var i = start;i< stop;i++){  if(Prototype.Version == '1.6.0_rc0'){  var tt = $H(tt_content[tt_keysContent[i]]);  var tt_example_content = tt['content'];  var tt_example_meaning = tt['Meaning'];  }  else{  var tt = $H(tt_content.get(tt_keysContent[i]));  var tt_example_content = tt.get('content');  var tt_example_meaning = tt.get('Meaning');  }  if((tt_decode_utf8(tt_example_content) != 'nothing') && (tt_decode_utf8(tt_example_meaning) != 'nothing')){                          strHTML += "<tr><td class ='Content_Meaning' style = 'width : 5%;'></td>\  <td class ='Content_Meaning' style = 'width : 50%;'>"+ tt_decode_utf8(tt_example_content)  + "</td>\                                          <td class ='Content_Meaning' style = 'width : 45%;'>" + tt_decode_utf8(tt_example_meaning) + "</td></tr>";  }  }  event.target.parentNode.parentNode.id = Parentkeys[0]  + "_" + stop.toString();  $(keys[0] + '_tdDetail').innerHTML = "<table style = 'width: 100%;'>" + strHTML + "</table>"  }  }  },    handleOnHeadRowMeaningClick_DE_VI:function(event){  var key = event.target.id.split('_')[0];  if($(key+"_tdDetail").style.display == "none"){  $(key+"_hinh").src='TT_MetaDictionary/image/arrowDown.gif';  $(key+"_tdDetail").style.display = "block";  try {  $(key+"_more").style.display = "block";  }catch(e){;}  }  else {  $(key+"_hinh").src='TT_MetaDictionary/image/arrowRight.gif';  $(key+"_tdDetail").style.display = "none";  try {  $(key+"_more").style.display = "none";  }catch(e){;}  }  },  OnClickShowAllMeaning:function(event){  var id = event.target.id;  var display = 'None';  ShowAllMeaning = $(id).checked;  if($(id).checked == true) display = 'block';  var arrkeys = this.dict.keys();  for(var index = 1; index <= arrkeys.length;index++){  $(index + '_tdDetail').style.display = display;  if(display=='None')  $(index+"_hinh").src='TT_MetaDictionary/image/arrowRight.gif';  else  $(index+"_hinh").src='TT_MetaDictionary/image/arrowDown.gif';  try{  $(index + '_more').style.display = display;  }catch(e){}  }  },  tt_create_Meaning:function(Tag){  var flagcheck = '';  var display = 'None';  var srcImage = 'TT_MetaDictionary/image/arrowRight.gif' ; if(ShowAllMeaning == true){  flagcheck = 'checked';  display = 'block';  srcImage = 'TT_MetaDictionary/image/arrowDown.gif'  }  var arrkeys = this.dict.keys();          var strHTML = "<div class = 'showall_Meaing'><table cellspacing='0' cellpadding='0' border='0' style = 'width: 100%;'><tr>\  <td style = 'width: 60%;' ></td>\  <td style = 'width: 40%;' align='right'>\  <input type='checkbox' id='showall_Meaing' name='showall_Meaing' value='showall_Meaing' " +flagcheck+" >\                                      <label for = 'showall_Meaing'> "+SHOW_ALL_MEANING+"</label></td></tr></table></div>";          if(arrkeys.length <= 0){  strHTML = "<table><tr><td style = 'background : #fff;' align='center'>Meaning not exist !</td></tr></table>";  Tag.innerHTML =strHTML;  return;  }  var flag = [];  for(var index = 1; index <= arrkeys.length;index++){  if(Prototype.Version == '1.6.0_rc0')  var tt_content = $H(this.dict[index]);  else  var tt_content = this.dict.get(index);              strHTML += "<div id = '" + index + "_divHead' class ='Backbround_Content_Meaning'><table><tr> \  <td id = '"+index+ "_tdHead' style = 'cursor: pointer; width: 5%;' ><img id = '" + index + "_hinh' class = image_head src='"+srcImage+"'/></td>\                                <td style = 'width: 95%;'>" + tt_decode_utf8(tt_content['content']) + "</td></tr></table></div>";         strHTML += "<div id = '" + index + "_tdDetail' style='display:"+display+";' class = 'Backbround_Content_Ex'> <table>" ;      var tt_example = $H(tt_content['example']);    var arrkeys_tt_example = tt_example.keys();  for(var i = 0;i< arrkeys_tt_example.length;i++){  if(i <= this.COUTN_DE_VI){  if(Prototype.Version == '1.6.0_rc0'){  var tt = $H(tt_example[arrkeys_tt_example[i]]);  var tt_example_content = tt['content'];  var tt_example_meaning = tt['Meaning'];  }  else{  var tt = $H(tt_example.get(arrkeys_tt_example[i]));  var tt_example_content = tt.get('content');  var tt_example_meaning = tt.get('Meaning');  }  if((tt_decode_utf8(tt_example_content) != 'nothing') && (tt_decode_utf8(tt_example_meaning) != 'nothing')){                          strHTML += "<tr><td class ='Content_Meaning' style = 'width : 5%;'></td>\  <td class ='Content_Meaning' style = 'width : 50%;'>"+ tt_decode_utf8(tt_example_content)  + "</td>\                                          <td class ='Content_Meaning' style = 'width : 45%;'>" + tt_decode_utf8(tt_example_meaning) + "</td></tr>";  }  else{                          strHTML += "<tr><td class ='Content_Meaning' style = 'width : 5%;'>&nbsp;</td>\  <td class ='Content_Meaning' style = 'width : 50%;'>&nbsp;</td>\                                          <td class ='Content_Meaning' style = 'width : 45%;'>&nbsp;</td></tr>";  }  }  }  strHTML += "</table></div>" ;  if(arrkeys_tt_example.length > this.COUTN_DE_VI){  flag.push(index.toString());                  strHTML += "<div id ='" + index + "_more' style = 'display:"+display+";width: 100%; '><table style = 'width: 100%;' border = '0'>\  <tr id = '" + index + "_" + this.COUTN_DE_VI.toString() + "'>\  <td class = 'trMore1' ></td>\  <td style = 'width : 10%;'><input class='commandButton_Pre' type='button' value='"+BUTTON_PREVIOUS_LABEL+"' id = '"+index+"_pre'/></td>\  <td style = 'width : 5%;'><input class='commandButton_Next' type='button' value='"+BUTTON_NEXT_LABEL+"' id = '"+index+"_next'/></td>\  <tr>\                                   </table></div>";  }  }  Tag.innerHTML =strHTML;  for(var index = 1; index <= arrkeys.length;index++){  Event.observe($(index + '_tdHead'), 'click', this.handleOnHeadRowMeaningClick_DE_VI, false );  }  for(var index = 0;index <flag.length;index ++){  Event.observe($(flag[index] + '_pre'), 'click', this.handleOnClickMore_DE_VI, false );  Event.observe($(flag[index] + '_next'), 'click', this.handleOnClickMore_DE_VI, false );  }  Event.observe($('showall_Meaing'), 'click', this.OnClickShowAllMeaning, false );  }  };TT_Create_Grammar = Class.create();  TT_Create_Grammar.prototype = {  initialize: function(dict) {  this.dict = $H(dict);  this.tt_OnclickHandleTitle_grammar = this.tt_OnclickHandleTitle_grammar.bindAsEventListener(this);  this.tt_OnclickRow_grammar_verb = this.tt_OnclickRow_grammar_verb.bindAsEventListener(this);  this.tt_OnclickHandleRowHead_grammar_Adjective = this.tt_OnclickHandleRowHead_grammar_Adjective.bindAsEventListener(this);  },    tt_create_Head_kind_grammar:function(dict,kind_word){  if(Prototype.Version == '1.6.0_rc0')  var head = $H($H(dict)['head']);  else  var head = $H(dict['head']);  var keysHead = head.keys();          var strHTML = "<div id = '"+kind_word+"_Title1' class = 'grammar_head_title'><table><tr>\  <td style = 'width : 3%;' class = 'grammar_head_title_click' id ='"+kind_word+"_Title'><img class = 'grammar_head_title_click' src='TT_MetaDictionary/image/arrowRight.gif'/></img></td>\                                      <td style = 'width : 47%;'>"+GRAMMAR_CONTENT_LABEL[kind_word]+"</td></tr></table></div>";         strHTML+= "<div id ='"+kind_word+"_Head'><table class = 'grammar_head_content'>";  for(var index=0; index < keysHead.length;index++)  if ((head[keysHead[index]] != "") && (head[keysHead[index]] != "None")){                  strHTML+= "<tr><td style = 'width : 5%;'></td>\                                  <td style = 'width : 40%;'>" + GRAMMAR_CONTENT_LABEL[keysHead[index]]+ "</td>";  if(Prototype.Version == '1.6.0_rc0')  strHTML += "<td style = 'width : 55%;'>"+ tt_decode_utf8(head[keysHead[index]])+"</td></tr>";  else  strHTML += "<td style = 'width : 55%;'>"+ tt_decode_utf8(head.get(keysHead[index]))+"</td></tr>";  }  strHTML += "</table></div>";  strHTML += "<div id ='"+kind_word+"_Detail'></div>";  return strHTML;  },    tt_create_noun:function(dict){  var content = $H(dict);  var keys = content.keys();  var Plural = $H($H(content['content'])['Plural']);  var Singular = $H($H(content['content'])['Singular']);  var keysPlural = Plural.keys();          var strHTML = "<div class = 'grammar_Noun_head'><table cellspacing='0' cellpadding='0'><tr><td>&nbsp;</td></tr></table></div>\  <div class ='grammar_Noun_content'><table cellspacing='0' cellpadding='0' border = '0px'><tr>\  <td style = 'width : 10%;'></td>\  <td style = 'width : 15%;' id = 'Head_noun'></td>\  <td style = 'width : 25%;' id = 'Singular_noun'></td>\  <td style = 'width : 20%;' id = 'Plural_noun'>\                                      <td style = 'width : 30%;' id = 'temp'></td></tr></table></div>";  $("noun_Detail").innerHTML = strHTML;  var strHTMLhead = "<table><tr rowspan='2'><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr>";          var strHTMLsingular = "<table cellspacing='0' cellpadding='0' border='0' style = 'width : 100%;'>\  <tr><td align='center' colspan='2' >"+GRAMMAR_CONTENT_LABEL['Singular']+"</td></tr>\                                      <tr><td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td><td align='center'>"+GRAMMAR_CONTENT_LABEL['noun']+"</td></tr>";          var strHTMLplural = "<table cellspacing='0' cellpadding='0' border='0' style = 'width : 100%;'>\  <tr><td align='center' colspan='2'>"+GRAMMAR_CONTENT_LABEL['Plural']+"</td></tr>\                                      <tr><td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td><td align='center'>"+GRAMMAR_CONTENT_LABEL['noun']+"</td></tr>";  var flag = true;  for(var index=0;index<keysPlural.length;index++){  strHTMLhead += "<tr><td align='center'>"+GRAMMAR_CONTENT_LABEL[keysPlural[index]]+"</td></tr>";  var tt = tt_decode_utf8(Plural[keysPlural[index]]).split("_");  if(tt.length < 2) flag = false;  strHTMLplural += "<tr><td align='center'>"+tt[0]+"</td><td align='center'>"+tt[1]+"</td></tr>";  }  for(var index=0;index<keysPlural.length;index++){  var tt = tt_decode_utf8(Singular["Mas_"+ keysPlural[index]]).split("_");  strHTMLsingular += "<tr><td align='center' style = 'width:30%;'>"+tt[0]+"</td><td align='center' style = 'width:70%;'>"+tt[1]+"</td></tr>";  }  strHTMLhead += "</table>";  strHTMLplural += "</table>";  $("Head_noun").innerHTML = strHTMLhead;  if(flag)  $("Plural_noun").innerHTML = strHTMLplural;    strHTMLsingular += "</table>";  $("Singular_noun").innerHTML = strHTMLsingular;  },    tt_OnclickRow_grammar_verb:function(event){  var id = '';  if (event.target.tagName == 'IMG')  id = event.target.parentNode.id;  else  id = event.target.id;  var arrId = id.split("*");  var imgElement = $(id).getElementsByTagName("img");  if($(arrId[0] + '*Detail').style.display == 'none'){  $(arrId[0] + '*Detail').style.display = 'block';  imgElement[0].src = 'TT_MetaDictionary/image/arrowDown.gif';  }  else{  $(arrId[0] + '*Detail').style.display = 'none';  imgElement[0].src = 'TT_MetaDictionary/image/arrowRight.gif';  }  },    tt_create_table_gammar_1:function(dict,key,tt_option){  if(Prototype.Version == '1.6.0_rc0'){  var content_main = $H(dict['main']);  var content_sub = $H(dict['sub']);  }  else{  var content_main = dict['main'];  var content_sub =  dict['sub'];  }  Title = ['ich','du','er_sie_es','wir','ihr','sie'];          strHTML = "<table><tr><td style = 'width : 10%;'></td>\  <td style = 'width : 22%;'>\  <table><tr><td align='center' colspan='2'>"+tt_option[0]+"</td></tr>\                                         <tr><td style = 'width : 30%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td><td align='center' >"+GRAMMAR_CONTENT_LABEL['verb']+"</td></tr>";    for(var index=0;index<Title.length;index++){              strHTML+=  "<tr><td style = 'width : 30%;' align='center'>"+Title[index]+"</td>\                              <td align='center' >"+tt_decode_utf8(content_main['in_' + Title[index]])+"</td></tr>";  }          strHTML += "</table></td>\  <td style = 'width : 22%;'>\  <table><tr><td align='center' colspan='2' >"+tt_option[1]+"</td></tr>\                                         <tr><td style = 'width : 30%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td><td align='center' >"+GRAMMAR_CONTENT_LABEL['verb']+"</td></tr>";  for(var index=0;index<Title.length;index++){          strHTML+= "<tr><td style = 'width : 30%;' align='center'>"+Title[index]+"</td>\                          <td align='center' >"+tt_decode_utf8(content_main[ tt_option[2]+ Title[index]])+"</td></tr>";  }    if(content_sub['in_'+ Title[0]] != 'None'){              strHTML += "</table></td><td style = 'width : 22%;'><table><tr><td align='center' colspan='2' >"+tt_option[0]+"</td></tr>\                                              <tr><td style = 'width : 30%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td><td align='center' >"+GRAMMAR_CONTENT_LABEL['verb']+"</td></tr>";  for(var index=0;index<Title.length;index++){                  strHTML+= "<tr><td style = 'width : 30%;' align='center'>"+Title[index]+"</td>\                                  <td align='center' >"+tt_decode_utf8(content_sub[ 'in_'+ Title[index]])+"</td></tr>";  }              strHTML += "</table></td><td style = 'width : 22%;'><table style = 'width : 100%;'><tr><td align='center' colspan='2' >"+tt_option[1]+"</td></tr>\                                              <tr><td style = 'width : 30%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td><td align='center' >"+GRAMMAR_CONTENT_LABEL['verb']+"</td></tr>";  for(var index=0;index<Title.length;index++){                  strHTML+= "<tr><td style = 'width : 30%;' align='center'>"+Title[index]+"</td>\                                  <td align='center' >"+tt_decode_utf8(content_sub[ tt_option[2]+ Title[index]])+"</td></tr>";  }  strHTML += "</table></td><td style = 'width : 2%;'></td></tr></table>";  }  else{  strHTML += "</table></td><td style = 'width : 46%;'></td></tr></table>";  }    return strHTML;  },    tt_create_table_gammar_2:function(dict,key){  if(Prototype.Version == '1.6.0_rc0')  var content = $H(dict);  else  var content = dict;          var strHTML = "<table><tr><td style = 'width : 10%;'></td>\  <td style = 'width : 30%;'>\  <table ><tr>\  <td align='center'>"+tt_decode_utf8(content[key])+"</td></tr></table>\                              <td style = 'width : 60%;'></td></tr></table>";   return strHTML  },  tt_create_table_gammar_3:function(dict,tt_option){  if(Prototype.Version == '1.6.0_rc0')  var content = $H(dict);  else  var content = dict;  Title = ['ich','du','er_sie_es','wir','ihr','sie'];          strHTML = "<table><tr><td style = 'width : 10%;'></td>\  <td style = 'width : 40%;'>\  <table>\  <tr>\  <td align='center' colspan='3' >"+tt_option[0]+"</td></tr>\  <tr>\  <td style = 'width : 20%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td>\  <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Auxiliary']+"</td>\                                          <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Participle']+"</td></tr>";              strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[0]+"</td>\  <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['in_' + Title[0]])+"</td>\                          <td style = 'width : 40%;' align='center' rowspan='6'>"+ tt_decode_utf8(content['in_par'])+" </td></tr>";  for(var index=1;index<Title.length;index++){              strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[index]+"</td>\                              <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['in_' + Title[index]])+"</td></tr>";  }          strHTML += "</table></td><td style = 'width : 40%;'>\  <table>\  <tr>\  <td align='center' colspan='3' >"+tt_option[1]+"</td></tr>\  <tr>\  <td style = 'width : 20%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td>\  <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Auxiliary']+"</td>\                                              <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Participle']+"</td></tr>";            strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[0]+"</td>\  <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['in_' + Title[0]])+"</td>\                          <td style = 'width : 40%;' align='center' rowspan='6'>"+ tt_decode_utf8(content[tt_option[2] + 'par'])+" </td></tr>";  for(var index=1;index<Title.length;index++){          strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[index]+"</td>\                          <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content[ tt_option[2]+ Title[index]])+"</td></tr>";  }  strHTML += "</table></td><td style = 'width : 10%;'><td></tr></table>";  return strHTML;  },    tt_create_table_gammar_4:function(dict,tt_option){  if(Prototype.Version == '1.6.0_rc0')  var content = $H(dict);  else  var content = dict;  Title = ['ich','du','er_sie_es','wir','ihr','sie'];          strHTML = "<table><tr><td style = 'width : 10%;'></td><td style = 'width : 30%;'>\  <table>\  <tr>\  <td align='center' colspan='3' >"+GRAMMAR_CONTENT_LABEL['Indicative']+"</td></tr>\  <tr>\  <td style = 'width : 20%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td>\  <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Auxiliary']+"</td>\                                              <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Infinitive']+"</td></tr>";              strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[0]+"</td>\  <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['in_' + Title[0]])+"</td>\                          <td style = 'width : 40%;' align='center' rowspan='6'>"+ tt_decode_utf8(content['in_infi'])+ " " +tt_option[0]+" </td></tr>";  for(var index=1;index<Title.length;index++){              strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[index]+"</td>\                              <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['in_' + Title[index]])+"</td></tr>";  }          strHTML += "</table></td><td style = 'width : 30%;'>\  <table>\  <tr>\  <td align='center' colspan='3' >"+GRAMMAR_CONTENT_LABEL['Subjuntive I']+"</td></tr>\  <tr>\  <td style = 'width : 20%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td>\  <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Auxiliary']+"</td>\                                              <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Infinitive']+"</td></tr>";            strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[0]+"</td>\  <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['koI_' + Title[0]])+"</td>\                          <td style = 'width : 40%;' align='center' rowspan='6'>"+ tt_decode_utf8(content['koI_infi'])+" "+tt_option[0]+" </td></tr>";  for(var index=1;index<Title.length;index++){              strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[index]+"</td>\                              <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['koII_'+ Title[index]])+"</td></tr>";  }            strHTML += "</table></td><td style = 'width : 30%;'>\  <table>\  <tr>\  <td align='center' colspan='3' >"+GRAMMAR_CONTENT_LABEL['Subjuntive II']+"</td></tr>\  <tr>\  <td style = 'width : 20%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td>\  <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Auxiliary']+"</td>\                                          <td style = 'width : 40%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Infinitive']+"</td></tr>";            strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[0]+"</td>\  <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['koII_' + Title[0]])+"</td>\                          <td style = 'width : 40%;' align='center' rowspan='6'>"+ tt_decode_utf8(content['koII_infi'])+" "+tt_option[0]+" </td></tr>";  for(var index=1;index<Title.length;index++){              strHTML+= "<tr><td style = 'width : 20%;' align='center'>"+Title[index]+"</td>\                              <td style = 'width : 40%;' align='center' >"+tt_decode_utf8(content['koII_'+ Title[index]])+"</td></tr>";  }  strHTML += "</table></tr></table>";  return strHTML;  },    tt_create_table_gammar_5:function(dict,tt_option){  if(Prototype.Version == '1.6.0_rc0')  var content = $H(dict);  else  var content = dict;          var strHTML = "<table><tr><td style = 'width : 10%;'></td>\  <td style = 'width : 40%;'>\  <table>\  <tr>\  <td style = 'width : 50%;' align='center'>"+GRAMMAR_CONTENT_LABEL[tt_option[0]]+"</td>\  <td style = 'width : 50%;' align='center'>"+GRAMMAR_CONTENT_LABEL[tt_option[1]]+"</td></tr>\  <tr>\  <td style = 'width : 50%;' align='center'>"+tt_decode_utf8(content[tt_option[0]])+" "+ tt_option[2] + "</td>\  <td style = 'width : 50%;' align='center'>"+tt_decode_utf8(content[tt_option[1]])+"</td></tr></table>\                                      <td style = 'width : 50%;'></td></tr></table>";   return strHTML;  },    tt_create_verb:function(dict){  var Title = ["present","preterite","imperative","infi_present","present_participle","past_participle","perfect",  "infi_perfect","past_perfect","future_i","infi_future_i","future_ii","infi_future_ii"];  var strHTML = "";  for(var index=0;index<Title.length;index++){              strHTML += "<div id = '"+Title[index]+"*title1' class = 'grammar_verb_head'><table><tr>\  <td class = 'grammar_verb_head_click' style = 'width : 5%;' id = '"+Title[index]+"*title2'><img class = 'grammar_verb_head_click' src='TT_MetaDictionary/image/arrowRight.gif'/></img></td>\  <td style = 'width : 95%;'>"+GRAMMAR_CONTENT_LABEL[Title[index]]+"</td>\                              </tr></table></div>";  strHTML += "<div id = '"+Title[index]+"*Detail' class = 'grammar_verb_content'></div>";  }  $("verb_Detail").innerHTML = strHTML;  if(Prototype.Version == '1.6.0_rc0')  var content = $H(dict['content']);  else  var content = dict['content'];      $('present*Detail').innerHTML = this.tt_create_table_gammar_1(content['present'],'present',[GRAMMAR_CONTENT_LABEL['Indicative'],GRAMMAR_CONTENT_LABEL['Subjuntive I'],'ko_']);      if(Prototype.Version == '1.6.0_rc0'){  var preterite_regular = $H(content['preterite_regular']);  var preterite_irregular = $H(content['preterite_irregular']);  }else{  var preterite_regular = content['preterite_regular'];  var preterite_irregular = content['preterite_irregular'];  }  try{  var keys_preterite_irregular = preterite_irregular.keys();  if(keys_preterite_irregular.length <= 0){  strHTML = this.tt_create_table_gammar_1(preterite_regular,'preterite_regular',[GRAMMAR_CONTENT_LABEL['Indicative'],GRAMMAR_CONTENT_LABEL['Subjuntive II'],'koII_']);  }  }catch(e){  strHTML = this.tt_create_table_gammar_1(preterite_regular,'preterite_regular',[GRAMMAR_CONTENT_LABEL['Indicative'],GRAMMAR_CONTENT_LABEL['Subjuntive II'],'koII_']);  }    $('preterite*Detail').innerHTML = strHTML;      if(Prototype.Version == '1.6.0_rc0')  var imperative = $H(content['imperative']);  else  var imperative = content['imperative'];          strHTML = "<table><tr><td style = 'width : 10%;'></td>\  <td style = 'width : 30%;'>\  <table>\  <tr>\  <td align='center' style = 'width : 30%;' align='center' >"+GRAMMAR_CONTENT_LABEL['Person']+"</td>\  <td align='center' >Verb</td></tr>\  <tr>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['Singular']+"</td>\  <td align='center'>"+tt_decode_utf8(imperative['Singular'])+"</td></tr>\  <tr>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['Plural']+"</td>\                                          <td align='center'>"+tt_decode_utf8(imperative['Plural'])+"</td></tr></table><td style = 'width : 60%;'></td></tr></table>";      $('imperative*Detail').innerHTML = strHTML;    $('infi_present*Detail').innerHTML = this.tt_create_table_gammar_2(content['infi_present'],'infi_present');    $('present_participle*Detail').innerHTML = this.tt_create_table_gammar_2(content['present_participle'],'pres_participle');    $('past_participle*Detail').innerHTML = this.tt_create_table_gammar_2(content['past_participle'],'pas_par');    $('perfect*Detail').innerHTML = this.tt_create_table_gammar_3(content['perfect'],['Indicative','Subjuntive I','koI_']);    $('past_perfect*Detail').innerHTML = this.tt_create_table_gammar_3(content['past_perfect'],['Indicative','Subjuntive II','koII_']);    $('infi_perfect*Detail').innerHTML = this.tt_create_table_gammar_5(content['infi_perfect'],['Participle','Auxiliary','']);    $('future_i*Detail').innerHTML  = this.tt_create_table_gammar_4(content['future_i'],['']);    $('infi_future_i*Detail').innerHTML = this.tt_create_table_gammar_5(content['infi_future_i'],['Infinitive','Auxiliary','']);  var Head = $H(dict['head']);    if(Prototype.Version == '1.6.0_rc0')  $('future_ii*Detail').innerHTML  = this.tt_create_table_gammar_4(content['future_ii'],[Head['Auxiliary']]);  else  $('future_ii*Detail').innerHTML  = this.tt_create_table_gammar_4(content['future_ii'],[Head.get('Auxiliary')]);    $('infi_future_ii*Detail').innerHTML = this.tt_create_table_gammar_5(content['infi_future_ii'],['Infinitive','Auxiliary',Head['Auxiliary']]);  for(var index=0;index <Title.length;index++){  $(Title[index]+ '*Detail').style.display = 'none';  Event.observe($(Title[index] + '*title2'), 'click', this.tt_OnclickRow_grammar_verb, false );  }  },    tt_OnclickHandleRowHead_grammar_Adjective:function(event){  var id = '';  if (event.target.tagName == 'IMG')  id = event.target.parentNode.id;  else  id = event.target.id;  var arrId = id.split('_');  var imgElement = $(id).getElementsByTagName("img");  if($(arrId[0] + '_Detail').style.display == "none"){  $(arrId[0] + '_Detail').style.display = 'block';  imgElement[0].src = 'TT_MetaDictionary/image/arrowDown.gif';  }  else{  $(arrId[0] + '_Detail').style.display = 'none';  imgElement[0].src = 'TT_MetaDictionary/image/arrowRight.gif';  }  },    tt_create_SubAdjective:function(dict,key){  var strHTML = "<div>";  var kind = ['mixed','weak','strong'];  var content = $H(dict);  var keys = content.keys();  var Note = $H(content['Note']) ; $(key+'_Note').innerHTML = "&nbsp;&nbsp;<i>" + Note[key] + "</i>" ; for(var index=0;index<kind.length;index++){              strHTML += "<div id ='Adjective_"+key+"_"+kind[index]+"' class = 'grammar_Adj_head_sub'>\  <table><tr>\  <td style = 'width : 10%;'>&nbsp;</td>\  <td style = 'width : 90%;'>"+GRAMMAR_CONTENT_LABEL[kind[index]]+"<i>" +Note[kind[index]] + "</i></td></tr></table></div>\  <div class = 'grammar_Adj_content'><table><tr>\  <td style = 'width : 10%;'>&nbsp;</td>\  <td id ='adjective_"+key+ "_"+kind[index]+"_plural_1' style = 'width : 10%;'></td>\  <td id ='adjective_"+key+ "_"+kind[index]+"_singular_1' style = 'width : 60%;'></td>\                                      <td id ='adjective_"+key+ "_"+kind[index]+"_plural_2' style = 'width : 20%;'></td></tr></table></div>";                          }  strHTML += "</div>";  $(key + "_Detail").innerHTML = strHTML;    for(var index=0;index<keys.length;index++){  var temp = keys[index].split('_');  var dictTemp = $H(content[keys[index]]);  var keyDictTemps = dictTemp.keys();  var subStrHTML = "";  var strHTMLhead = "";  if(temp[temp.length-1] =="singular"){                  subStrHTML += "<table cellspacing='2' cellpadding='1' border='0'>\  <tr><td align='center' colspan='6'>"+GRAMMAR_CONTENT_LABEL['Singular']+"</td></tr>\  <tr><td align='center' colspan='2'>"+GRAMMAR_CONTENT_LABEL['Maskulin']+"</td>\  <td align='center' colspan='2'>"+GRAMMAR_CONTENT_LABEL['Neuter']+"</td>\  <td align='center' colspan='2'>"+GRAMMAR_CONTENT_LABEL['Feminin']+"</td></tr>\  <tr><td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['adjective']+"</td>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['adjective']+"</td>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td>\                                      <td align='center'>"+GRAMMAR_CONTENT_LABEL['adjective']+"</td></tr>";    var arr1 = ['Mas','Neu','Fe'];  var arr2 = ['Accusative','Nominative','Dative','Genitive'];  for(var index2=0;index2<arr2.length;index2++){  subStrHTML += "<tr>" ; for(var index1=0;index1<arr1.length;index1++){  var tt = dictTemp[arr1[index1] + "_"+ arr2[index2]].split("_");                          subStrHTML += "<td align='center'>"+tt_decode_utf8(tt[0])+"</td>\                                         <td align='center'>"+tt_decode_utf8(tt[1])+"</td>";    }  subStrHTML += "</tr>";  }  subStrHTML += "</table>";  $(keys[index] +"_1").innerHTML = subStrHTML;  }  else  {                  strHTMLhead += "<table><tr><td>&nbsp;</td></tr>\  <tr><td>&nbsp;</td></tr>\                                          <tr><td>&nbsp;</td></tr>";                                                      subStrHTML += "<table cellspacing='2' cellpadding='1' border='0'>\  <tr><td align='center' colspan='2'>"+GRAMMAR_CONTENT_LABEL['Plural']+"</td></tr>\  <tr><td align='center' colspan='2'>"+GRAMMAR_CONTENT_LABEL['Maskulin']+"/"+GRAMMAR_CONTENT_LABEL['Neuter']+"/"+GRAMMAR_CONTENT_LABEL['Feminin']+"</td></tr>\  <tr><td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td>\                                              <td align='center'>"+GRAMMAR_CONTENT_LABEL['adjective']+"</td></tr>";  for(var index1=0;index1<keyDictTemps.length;index1++){  try{  strHTMLhead+= "<tr><td>"+keyDictTemps[index1]+"</td></tr>";  var tt = dictTemp[keyDictTemps[index1]].split("_");  subStrHTML += "<tr><td align='center'>"+tt_decode_utf8(tt[0])+"</td><td align='center'>"+tt_decode_utf8(tt[1])+"</td></tr>";  }catch(e){}  }  subStrHTML  += "</table>";  strHTMLhead  += "</table>";  try{  $(keys[index] +"_2").innerHTML = subStrHTML;  }catch(e){}  try{  $(keys[index] +"_1").innerHTML = strHTMLhead;  }catch(e){}  }  }  },    tt_create_adjective:function(dict){  if(Prototype.Version == '1.6.0_rc0')  var content = $H($H(dict)['content']);  else{  var content = $H(dict['content']);  }  var keysContent = content.keys();  var strHTML = "";  for(var index=0;index<keysContent.length;index++){  var key = $H(content[keysContent[index]]).keys();  if((key.length > 0)&&(keysContent[index] != 'Infinitive')){                  strHTML += "<div id ='"+keysContent[index]+"_grammar' class = 'grammar_Adj_head'><table><tr>\  <td style = 'width : 5%;' id = '"+keysContent[index]+"_td' class = 'grammar_Adj_head_click'><img class = 'grammar_Adj_head_click' src='TT_MetaDictionary/image/arrowRight.gif'/></img></td>\  <td style = 'width : 95%;'>"+GRAMMAR_CONTENT_LABEL[keysContent[index]]+"<span id = '"+keysContent[index]+"_Note'></span></td>\                                                                      </tr></table></div>";  strHTML += "<div id ='"+keysContent[index]+"_Detail' ></div>";  }  }  $("adjective_Detail").innerHTML = strHTML;  for(var index=0;index<keysContent.length;index++){  var key = $H(content[keysContent[index]]).keys();  if((key.length > 0) && (keysContent[index] != 'Infinitive')){  this.tt_create_SubAdjective(content[keysContent[index]],keysContent[index]);  Event.observe($(keysContent[index] + '_td'), 'click', this.tt_OnclickHandleRowHead_grammar_Adjective, false );  $(keysContent[index] + '_Detail').style.display = 'none';  }  }  },    tt_create_Pronoun_Simple:function(dict){  var Simple = $H(dict['simple']);  var keys = Simple.keys();  var strHTML = "" ; if(Simple['Orther'] == 'None'){              var strHTML = "<div class = 'grammar_Pronoun_head'><table><tr><td>&nbsp;</td></tr></table></div>\                             <div class ='grammar_Pronoun_content'><table style='width:100%;'><tr><td style='width:10%;'></td><td style='width:50%;'><table style='width:100%;'>";  for(var i=0;i<keys.length;i++){  if(Simple[keys[i]] != 'None')                      strHTML += "<tr><td style='width:40%;'align='center' colspan='2'>"+GRAMMAR_CONTENT_LABEL[keys[i]]+"</td>\                                      <td style='width:60%;'align='center' colspan='2'>"+Simple[keys[i]]+"</td>\</tr>";  }  strHTML += "</table></td><td style='width:40%;'></td></tr></table></div>";  }  return strHTML;  },    tt_create_Pronoun_Multi_sub:function(PluralDict,SingularDict, key){  var Plural = $H(PluralDict[key]);  var Singular = $H(SingularDict[key]);  var flag = false;  var strHead = "<table style='width:100%;'><tr><td>&nbsp;</td><tr><td>&nbsp;</td></tr>";  var strHeadEx = "";  var strSingularEx = "";  var strPluralEx = "";  var countCol = 1;  try{  if(Singular["Mas_Accusative"].split("_").length > 1){  flag = true;  countCol = 2;                 strSingularEx    =   "<tr><td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['Pronoun']+"</td>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['Pronoun']+"</td>\  <td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td>\                                          <td align='center'>"+GRAMMAR_CONTENT_LABEL['Pronoun']+"</td></tr>";                   strPluralEx      = " <tr><td align='center'>"+GRAMMAR_CONTENT_LABEL['Article']+"</td>\                                          <td align='center'>"+GRAMMAR_CONTENT_LABEL['Pronoun']+"</td></tr>";  strHead = "<table style='width:100%;'><tr><td>&nbsp;</td><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr>";  }  }catch(e){}          var strPlural = "<table cellspacing='2' cellpadding='1' border='0'>\  <tr><td align='center' colspan='"+countCol+"'>"+GRAMMAR_CONTENT_LABEL['Plural']+"</td></tr>\                                      <tr><td align='center' colspan='"+countCol+"'>Mas./Neu./Fem</td></tr>" + strPluralEx;            var strSingular = "<table style='width:100%;'cellspacing='2' cellpadding='1' border='0'>\  <tr><td align='center' colspan='"+countCol*3+"'>"+GRAMMAR_CONTENT_LABEL['Singular']+"</td></tr>\  <tr><td align='center' colspan='"+countCol+"'>"+GRAMMAR_CONTENT_LABEL['Maskulin']+"</td>\  <td align='center' colspan='"+countCol+"'>"+GRAMMAR_CONTENT_LABEL['Neuter']+"</td>\                                  <td align='center' colspan='"+countCol+"'>"+GRAMMAR_CONTENT_LABEL['Feminin']+"</td></tr>" + strSingularEx;    var arr1 = ['Mas','Neu','Fe'];  var arr2 = ['Accusative','Nominative','Dative','Genitive'];  for(var index2=0;index2<arr2.length;index2++){  strSingular += "<tr>" ; for(var index1=0;index1<arr1.length;index1++){  var tt = Singular[arr1[index1] + "_"+ arr2[index2]].split("_");  if(flag)                      strSingular += "<td align='center'>"+tt_decode_utf8(tt[0])+"</td>\                                      <td align='center'>"+tt_decode_utf8(tt[1])+"</td>";   else  strSingular += "<td align='center'>"+tt_decode_utf8(tt[0])+"</td>";  }  strSingular += "</tr>";  }  $(key+"_rowSingularPro").innerHTML = strSingular + "</table>";;    for(var i=0;i<arr2.length;i++){  strHead+="<tr><td>"+GRAMMAR_CONTENT_LABEL[arr2[i]]+"</td></tr>";  var tt = Plural[arr2[i]].split('_');  if(flag)                  strPlural += "<tr><td align='center'>"+tt_decode_utf8(tt[0])+"</td>\                                    <td align='center'>"+tt_decode_utf8(tt[1])+"</td></tr>";  else  strPlural += "<tr><td align='center'>"+tt_decode_utf8(tt[0])+"</td></tr>";  }  $(key+"_rowHeadPro").innerHTML = strHead + "</table>";  $(key+"_rowPluralPro").innerHTML = strPlural + "</table>";  },    tt_create_Pronoun_Multi:function(dict){  var Plural = $H(dict['Plural']);  var Singular = $H(dict['Singular']);  var keysPlural = Plural.keys();  var keysSingular = Singular.keys();  var strHTML = "<div class = 'grammar_Pronoun_head'><table style='width:100%;'><tr><td>&nbsp;</td></tr></table></div>";  for(var i=0;i<keysPlural.length;i++){              strHTML += "<div class ='grammar_Pronoun_content'>\  <table style='width:100%;'><tr>\  <td style='width:10%;'></td>\  <td id='"+keysPlural[i]+"_rowHeadPro' style='width:10%;'></td>\  <td id='"+keysPlural[i]+"_rowSingularPro' style='width:60%;'></td>\                                      <td id='"+keysPlural[i]+"_rowPluralPro' style='width:30%;'></td></tr></table></div>";     }  $("Pronoun_Detail").innerHTML = strHTML;  for(var i=0;i<keysPlural.length;i++)  this.tt_create_Pronoun_Multi_sub(Plural,Singular,keysPlural[i])                        },  tt_create_pronoun:function(dict){  var strHTML = "";  $("pronoun_Detail").innerHTML = "";                },    tt_create_conjunction:function(dict){  var strHTML = "";  $("conjunction_Detail").innerHTML = strHTML;  },    tt_create_preposition:function(dict){  var strHTML = "";  $("preposition_Detail").innerHTML = strHTML;  },    tt_create_interjection:function(dict){  var strHTML = "";  $("interjection_Detail").innerHTML = strHTML;  },    tt_create_adverb:function(dict){  var strHTML = "";  $("adverb_Detail").innerHTML = strHTML;  },    tt_create_buchstabe:function(dict){  var strHTML = "";  $("buchstabe_Detail").innerHTML = strHTML;  },    tt_OnclickHandleTitle_grammar:function(event){  var id = '';  if (event.target.tagName == 'IMG')  id = event.target.parentNode.id;  else  id = event.target.id;  var arrId = id.split('_');  var imgElement = $(id).getElementsByTagName("img");  if($(arrId[0] + '_Detail').style.display == "none"){  $(arrId[0] + '_Detail').style.display = 'block';  imgElement[0].src = 'TT_MetaDictionary/image/arrowDown.gif';  }  else{  $(arrId[0] + '_Detail').style.display = 'none';  imgElement[0].src = 'TT_MetaDictionary/image/arrowRight.gif';  }  },      tt_create_Grammar:function(Tag){  var grammar = this.dict;  var arrkeys = grammar.keys();  var kinds = null;  try{  if(Prototype.Version == '1.6.0_rc0')  kinds = grammar['kind'].split(',');  else  kinds = grammar.get('kind').split(',');  }catch(e){  Tag.innerHTML = "<center>Grammar not exist !</center>";  return;  }  if(kinds[0] == 'None'){  Tag.innerHTML = "<center>Grammar not exist !</center>";  return;  }  var strHTML = "";  for(var index=0; index < kinds.length; index ++)  if(Prototype.Version == '1.6.0_rc0')  strHTML += this.tt_create_Head_kind_grammar(grammar["content_" + kinds[index]],kinds[index]);  else  strHTML += this.tt_create_Head_kind_grammar(grammar.get("content_" + kinds[index]),kinds[index]);  Tag.innerHTML = strHTML;  for(var index=0; index < kinds.length; index++){  if(Prototype.Version == '1.6.0_rc0')  eval("this.tt_create_" + kinds[index] + "(grammar['content_" + kinds[index] + "'])");  else  eval("this.tt_create_" + kinds[index] + "(grammar.get('content_" + kinds[index] + "'))");  }  for(var index=0;index<kinds.length;index++){  Event.observe($(kinds[index] + '_Title'), 'click', this.tt_OnclickHandleTitle_grammar, false );  if(index>0)  $(kinds[index] + '_Detail').style.display = "none";  }  }  };TT_DisplayResult_DE_VI = Class.create();  TT_DisplayResult_DE_VI.prototype = {  initialize: function() {  this.currentTab_DE_VI = null;  this.handleOnTabClick_DE_VI = this.handleOnTabClick_DE_VI.bindAsEventListener(this);  },    tt_setResult : function(result){  tt_Hide_ProtectiveScreen();  this.result = $H(result);  },    tt_setdictRequest : function(dictRequest){  this.dictRequest = dictRequest;  },    tt_dislayResult: function () {    if (typeof this.result == "string") {  ContentMyMetadict.innerHTML = tt_decode_utf8(this.result);  return;  }  var arrKeys = this.dictRequest['tt_option_list'].split(',');  var keyArr = this.result.keys();  if(this.result['result'] == 'False'){  this.currentTab_DE_VI = $(arrKeys[0] + "_tab");  $('divDE_VI_TabContent').innerHTML = "<div><center>"+this.result['content']+"</center></div>";  return;  }  if(arrKeys.length > 0){  this.tt_setDefault_DE_VI(arrKeys[0]);  }  else {  $('divDE_VI_TabContent').innerHTML = "<div><center></center></div>";  }  },    handleOnTabClick_DE_VI:function(event){  var key = event.target.id.split('_')[0];  this.currentTab_DE_VI.style.background = TAB_NOTSELETC_BACKGROUND;  this.currentTab_DE_VI = $(event.target.id);  this.currentTab_DE_VI.style.background = TAB_SELETC_BACKGROUND;  if(this.result['result'] == 'False'){  $('divDE_VI_TabContent').innerHTML = "<div><center>"+this.result['content']+"</center></div>";  return;  }  if(key == 'Meaning')  this.tt_create_Meaning(key);  else  this.tt_create_Grammar(key);  },    tt_setDefault_DE_VI :function(key){  this.currentTab_DE_VI = $(key + "_tab");  if(key == 'Meaning')  this.tt_create_Meaning(key);  else  this.tt_create_Grammar(key);  },    tt_create_Grammar:function(key){  if(Prototype.Version == '1.6.0_rc0')  var tt_grammar = new TT_Create_Grammar($H(this.result[key]));  else  var tt_grammar = new TT_Create_Grammar(this.result.get(key));  $('divDE_VI_TabContent').innerHTML = "<div id = 'content_grammar' class = 'grammar'></div>";  tt_grammar.tt_create_Grammar($('content_grammar'));  },    tt_create_Meaning:function(key){  if(Prototype.Version == '1.6.0_rc0')  var tt_meaning = new TT_Create_Meaning($H(this.result[key]));  else  var tt_meaning = new TT_Create_Meaning(this.result.get(key));  $('divDE_VI_TabContent').innerHTML = "<div id = 'content_meaning' class = 'meaning'></div>";  tt_meaning.tt_create_Meaning($('content_meaning'));  },    tt_create_Tab_DE_VI :function(){  var dictTablabel = {'Grammar':GRAMMAR_LABEL,'Meaning':MEANING_LABEL} ; ContentMyMetadict.style.overflow = "auto";  var arrKeys = this.dictRequest['tt_option_list'].split(',');  var htmlStr = "<div id='heatIndex'><ul class = 'Tab_Dict'>";  if(arrKeys.length > 0){              htmlStr += "<li><a id='"+arrKeys[0]+"_tab'href='javascript://' class = 'Tab_Search_selected'>" + dictTablabel[arrKeys[0]] + "</a></li>";  for (i=1; i<arrKeys.length-1; i++) {                  htmlStr += "<li><a id='"+arrKeys[i]+"_tab' href='javascript://'>" +dictTablabel[arrKeys[i]] + "</a></li>";  }  }  htmlStr += "</ul><div id='divDE_VI_TabContent' class = 'Content_dict'></div></div>";  ContentMyMetadict.innerHTML = htmlStr;  $('divDE_VI_TabContent').innerHTML =  "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  if(arrKeys.length > 0){  for (var index = 0;index< arrKeys.length-1; index ++)  Event.observe($(arrKeys[index] + "_tab"), 'click', this.handleOnTabClick_DE_VI, false );  }  }  };TT_DisplayResult_Advanced_DE_VI = Class.create();  TT_DisplayResult_Advanced_DE_VI.prototype = {  initialize: function() {  this.tt_arrWord = null;  this.tt_DictRerult_word = {};  this.TT_DisplayResultObservable = new Observable();  this.tt_ObservableTab = new Observable();  this.tt_Observable_word = new Observable();  this.dictRequest = null;  this.currentTab_Advanced = null;  this.handleOnTabClick_Advanced = this.handleOnTabClick_Advanced.bindAsEventListener(this);  this.handleCbo_branchChange = this.handleCbo_branchChange.bindAsEventListener(this);  this.handleCbo_professionalChange = this.handleCbo_professionalChange.bindAsEventListener(this);  this.handleCbo_othertypeChange = this.handleCbo_othertypeChange.bindAsEventListener(this);  this.handleCbo_professionalKeydown = this.handleCbo_professionalKeydown.bindAsEventListener(this);  this.handleCbo_othertypeKeydown = this.handleCbo_othertypeKeydown.bindAsEventListener(this);  this.handleCbo_branchKeydown = this.handleCbo_branchKeydown.bindAsEventListener(this);  this.handleword_advancedKeydown_Meaing = this.handleword_advancedKeydown_Meaing.bindAsEventListener(this);  this.handleOnClick_Advanced_search_Meaning = this.handleOnClick_Advanced_search_Meaning.bindAsEventListener(this);  this.handleOnClick_Advanced_search_Grammar = this.handleOnClick_Advanced_search_Grammar.bindAsEventListener(this);  this.handleOnClick_word = this.handleOnClick_word.bindAsEventListener(this);  this.handleOnClick_Exemple = this.handleOnClick_Exemple.bindAsEventListener(this);  this.handleOnClickMore = this.handleOnClickMore.bindAsEventListener(this);  this.tt_DetailMore_Meaning = this.tt_DetailMore_Meaning.bindAsEventListener(this);  this.tt_DetailMore_Grammar = this.tt_DetailMore_Grammar.bindAsEventListener(this);  this.handleOnMouseMove_Dialog_Meaning_Grammar = this.handleOnMouseMove_Dialog_Meaning_Grammar.bindAsEventListener(this);  this.handlecbo_Kind_word = this.handlecbo_Kind_word.bindAsEventListener(this);  this.handlecbo_Kind_wordKeydown = this.handlecbo_Kind_wordKeydown.bindAsEventListener(this);  this.handleword_advancedKeydown_Grammar = this.handleword_advancedKeydown_Grammar.bindAsEventListener(this);  this.handleOnClick_Advanced_search_Grammar = this.handleOnClick_Advanced_search_Grammar.bindAsEventListener(this);  this.handlecbo_inflection_class = this.handlecbo_inflection_class.bindAsEventListener(this);  this.handlecbo_inflection_class_keydown = this.handlecbo_inflection_class_keydown.bindAsEventListener(this);  this.handleOnClickHelp_Advanced_DE_VI = this.handleOnClickHelp_Advanced_DE_VI.bindAsEventListener(this);  this.handleOnMouseMove_dialog_help = this.handleOnMouseMove_dialog_help.bindAsEventListener(this);  this.handleOnClickMore_help_advanced = this.handleOnClickMore_help_advanced.bindAsEventListener(this);  this.COUNT_WORD = 50;  this.xDialog_Example = 0;  this.yDialog_Example = 0;  this.scrOfY = 0;  this.scrOfX = 0;  this.flagListWord = "";  },    tt_getDisplayResultObservable: function() {  return this.TT_DisplayResultObservable;  },    tt_getObservable_word: function() {  return this.tt_Observable_word;  },    tt_setdictRequest:function(dictRequest){  this.dictRequest = $H(dictRequest);  },    tt_setResult:function(result){  tt_Hide_ProtectiveScreen();  this.result = $H(result);  },    tt_dislayResult:function() {  tt_Hide_ProtectiveScreen();  var keys =  this.result.keys();  if(keys.length <=0) return;  this.flagListWord = keys[0] ; if(keys[0] == "Meaning")  this.tt_create_Meaning() ; if(keys[0] == "Grammar")  this.tt_create_Grammar()  },    tt_dislayResult_word:function() {  tt_Hide_ProtectiveScreen();  $(tt_word + '_wait').style.display = 'none';  if(this.result['result'] == 'False'){  this.tt_DictRerult_word[this.dictRequest['tt_word']] = null;  return;  }  this.tt_DictRerult_word[this.dictRequest['tt_word']] = this.result;  this.tt_view_word(this.dictRequest['tt_word'],this.result);  },    tt_create_Meaning:function() {  var keys = $H(this.result['Meaning']).keys();  if (keys.length <=0) return;  if(keys.indexOf('head')> 0)  this.tt_create_Meaning_Head();  if(keys[0]== 'word'){  this.tt_arrWord = this.result['Meaning']['word'];  this.tt_create_ListResult();  try{  $('wait_word').style.display = 'none';  }  catch(e){  $('wait_professional').style.display = 'none';  }  }  },    handleCbo_branchChange:function(event){  $('more1').style.display = 'none';  $('more2').style.display = 'none';  $('list_word_content').innerHTML = "";  $('Result1').innerHTML = "";  $('Result2').innerHTML = "";  },    handleCbo_professionalChange:function(event){  $('list_word_content').innerHTML = "";  $('more1').style.display = 'none';  $('more2').style.display = 'none';  $('Result1').innerHTML = "";  $('Result2').innerHTML = "";  },    handleCbo_othertypeChange:function(event){  $('list_word_content').innerHTML = "";  $('more1').style.display = 'none';  $('more2').style.display = 'none';  $('Result1').innerHTML = "";  $('Result2').innerHTML = "";  },    tt_search_Meaning_wordList:function(){  $('list_word_content').innerHTML= "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif'/></center>";  var flag = true;  var type_sreach = "false";  this.dictRequest['next'] = '1';  if($('word_advanced').value.indexOf('<*>')>=0) flag = false;  this.dictRequest['tt_option'] = "Meaning<*>word<*>" + $('cbo_branch').value + '<*>' + $('cbo_professional').value + '<*>' + $('cbo_othertype').value + '<*>' + $('word_advanced').value +'<*>'+ type_sreach;  if(flag){  tt_Show_ProtectiveScreen();  this.TT_DisplayResultObservable.notifyObservers("tt_getDataAdvacnde_DE_VI", this.dictRequest);  }  },    handleCbo_professionalKeydown:function(event){  if (event.keyCode == 13)  this.tt_search_Meaning_wordList();  },    handleCbo_othertypeKeydown:function(event){  if (event.keyCode == 13)  this.tt_search_Meaning_wordList();  },    handleCbo_branchKeydown:function(event){  if (event.keyCode == 13)  this.tt_search_Meaning_wordList();  },  handleword_advancedKeydown_Meaing:function(event){  if (event.keyCode == 13)  this.tt_search_Meaning_wordList();  },  handleOnClick_Advanced_search_Meaning:function(event){  this.tt_search_Meaning_wordList();  },    handleOnMouseMove_dialog_help:function(event){  var dialog = $('dialog_help');  try {  if (parseInt(event.clientX)+ parseInt(this.scrOfX) < parseInt(dialog.nw['x'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_dialog_help, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientY)+ parseInt(this.scrOfY) < parseInt(dialog.nw['y'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_dialog_help, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientX) + parseInt(this.scrOfX) > parseInt(dialog.se['x'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_dialog_help, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientY) + parseInt(this.scrOfY) > parseInt(dialog.se['y'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_dialog_help, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  }catch(e){;}  },    handleOnClickMore_help_advanced:function(event){  if($('more_help_advanced_content').style.display == 'none'){  $('more_help_advanced_content').style.display = 'block';  $('more_help_advanced').textContent = DIALOG_ADVANCED_NOTE_07;  }  else{  $('more_help_advanced_content').style.display = 'none';  $('more_help_advanced').textContent = DIALOG_ADVANCED_NOTE_04;  }  $('dialog_help').style.width = $('dialog_help').clientWidth + "px";  $('dialog_help').style.height = $('dialog_help').clientHeight + "px";  $('dialog_help').nw={'x': parseInt($('dialog_help').style.left),'y': parseInt($('dialog_help').style.top)};  $('dialog_help').se={'x': parseInt($('dialog_help').style.left) + parseInt($('dialog_help').style.width),'y': parseInt($('dialog_help').style.top) + parseInt($('dialog_help').style.height)};  },    tt_create_Dialog_help_Advanced:function(x,y){  var dialog_help = document.createElement("div");  document.body.appendChild(dialog_help);  dialog_help.setAttribute("class","dialog_help");  dialog_help.style.position = "absolute";  dialog_help.style.top = (y -10) + "px";  dialog_help.style.left = (x-590) + "px";  dialog_help.setAttribute("id","dialog_help");          var strHTML = "<div style = 'background:#fff; width : 100%; border:1px solid #B2B2B2;'><table>\  <tr><td align='center' colspan='2' class = 'dialog_help_head'>"+DIALOG_ADVANCED_TITLE1+"<p><i>"+DIALOG_ADVANCED_TITLE2+"</i></p></td></tr>\  <tr><td style = 'width : 20%;'>*</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_CONTENT_01+"</td></tr>\  <tr><td style = 'width : 20%;'>A</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_CONTENT_02+"</td></tr>\  <tr><td style = 'width : 20%;'>^A.* hay ^A</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_CONTENT_03+"</td></tr>\  <tr><td style = 'width : 20%;'>^A.{x,y}$</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_CONTENT_04+"</td></tr>\  <tr><td style = 'width : 20%;'>.*A$ hay .A$</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_CONTENT_05+"</td></tr>\  <tr><td style = 'width : 20%;'>^.{x,y}A$</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_CONTENT_06+"</td></tr>\  <tr><td style = 'width : 20%;'>^A.*B$</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_CONTENT_07+"</td></tr>\  <tr><td style = 'width : 20%;'>^A.{x,y}B$</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_CONTENT_08+"</td>\  <tr><td colspan='2' class = 'dialog_help_food'><i>"+DIALOG_ADVANCED_NOTE_01+"</i></td>\  <tr><td colspan='2' class = 'dialog_help_food'><i>"+DIALOG_ADVANCED_NOTE_02+"</i></td>\                              <tr><td colspan='2' class = 'dialog_help_food'><i>"+DIALOG_ADVANCED_NOTE_03+"</i><spam id = 'more_help_advanced' class = 'more_help_advanced'>"+DIALOG_ADVANCED_NOTE_04+"</spam></td></tr>";            strHTML +=   "</table></div><div style = 'display:none;' id = 'more_help_advanced_content'><table\  <tr><td style = 'width : 20%;'>ab[EeF]c</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_NOTE_05+"</td></tr>\  <tr><td style = 'width : 20%;'>[EeF]</td><td style = 'width : 80%;'>"+DIALOG_ADVANCED_NOTE_06+"</td></tr>\                                          </table></div> "                                  ; dialog_help.innerHTML = strHTML ;  dialog_help.style.width = dialog_help.clientWidth + "px";  dialog_help.style.height = dialog_help.clientHeight + "px";  dialog_help.nw={'x': parseInt(dialog_help.style.left),'y': parseInt(dialog_help.style.top)};  dialog_help.se={'x': parseInt(dialog_help.style.left) + parseInt(dialog_help.style.width),'y': parseInt(dialog_help.style.top) + parseInt(dialog_help.style.height)};  Event.observe(document, 'mousemove', this.handleOnMouseMove_dialog_help, false );  Event.observe($('more_help_advanced'), 'click', this.handleOnClickMore_help_advanced, false );  },    handleOnClickHelp_Advanced_DE_VI:function(event){  if(Prototype.Browser.IE){  this.scrOfY = document.documentElement.scrollTop;  this.scrOfX = document.documentElement.scrollLeft;  }  else{  this.scrOfY = window.pageYOffset;  this.scrOfX = window.pageXOffset;  }  var x = parseInt(event.clientX + this.scrOfX - 5);  var y = parseInt(event.clientY + this.scrOfY -5);  this.tt_create_Dialog_help_Advanced(x,y);  },    tt_create_Meaning_Head:function(){          $('Advanced_Content').innerHTML = " <div class = 'inputSeacrh_Advanced_DE_VI'><div class = 'Advanced_DE_VI_row' ><table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;' align='right'>"+WORD_ADVANCED_LABEL+" : </td>\  <td style = 'width : 40%;'><input class = 'textInput' type = 'text' id = 'word_advanced' value = '*'/></td>\  <td style = 'width : 20%;'><input type='checkbox' id='type_sreach' name='type_sreach' value='type_sreach' ><label for ='type_sreach' style='font-weight:normal;'> "+TYPE_SEARCH_LABEL+"</label></td>\  <td style = 'width : 20%;' id = 'help_Advanced_DE_VI' class = 'help_Advanced_DE_VI'>"+DIALOG_ADVANCED_TITLE1+"</td></tr></table></div></div>\  <div id = 'branch'></div><div id = 'professional'></div><div id = 'othertype'></div>\  <div id = 'Advanced_DE_VI_SearchDiv'></div>\  <div id = 'more1' class = 'Advanced_DE_VI_row' style = 'display : none;'><table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;' align='right'>"+RESULT+" : </td>\  <td id = 'Result1' style = 'width : 20%;'></td>\  <td id = 'now1' style = 'width : 45%; padding-right: 10px !important;' align='right'></td>\  <td style = 'width : 10%;'><input class='commandButton_Pre' type='button' value='"+BUTTON_PREVIOUS_LABEL+"' id = 'pre_1'/></td>\  <td style = 'width : 5%;'><input class='commandButton_Next' type='button' value='"+BUTTON_NEXT_LABEL+"' id = 'next_1'/></td>\  </tr></table></div>\  <div id = 'list_word_content'></div>\  <div id = 'more2' class = 'Advanced_DE_VI_row' style = 'display : none;'><table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;' align='right'>"+RESULT+" : </td>\  <td id = 'Result2' style = 'width : 20%;'></td>\  <td id = 'now2' style = 'width : 45%; padding-right: 10px !important;' align='right'></td>\  <td style = 'width : 10%;'><input class='commandButton_Pre' type='button' value='"+BUTTON_PREVIOUS_LABEL+"' id = 'pre_2'/></td>\  <td style = 'width : 5%;'><input class='commandButton_Next' type='button' value='"+BUTTON_NEXT_LABEL+"' id = 'next_2'/></td>\                                                                                      </tr></table></div>";  var branch = this.result['Meaning']['branch'];          var strHTML = "<div class = 'Advanced_DE_VI_row'>\  <table style = 'width : 100%;'>\  <tr>\  <td style = 'width : 20%;' align='right'>"+CBO_BRANCH_LABEL+" :</td>\  <td style = 'width : 40%;'> <select name='cbo_branch' id = 'cbo_branch'>\                                          <option value='*'>*</option>";  for(var index = 0; index < branch.length; index ++){  var tt_value =  tt_decode_utf8(branch[index]);  if((tt_value != '-') && (tt_value.strip() != ''))  strHTML += "<option value='" + tt_value + "'> " +tt_value+ "</option>";  }  strHTML += "</select> </td> <td style = 'width : 40%;'><img id = 'wait_professional' style = 'display : none;' src='TT_MetaDictionary/image/indicator.gif' /></td></tr></table></div>";  $('branch').innerHTML = strHTML;          $('Advanced_DE_VI_SearchDiv').innerHTML = "<div class = 'Advanced_DE_VI_row'><table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;' align='right'></td>\  <td style = 'width : 80%;'><input class='commandButton_Next' type='button' value='"+BUTTON_SEARCH_LABEL+"' id = 'Advanced_Search_DE_VI'/></td>\                                                          </tr></table></div>";    var professional = this.result['Meaning']['professional'];          var strHTML = "<div class = 'Advanced_DE_VI_row'>\  <table style = 'width : 100%;'>\  <tr>\  <td style = 'width : 20%;' align='right'>"+CBO_PROFESSIONAL_LABEL+" :</td>\  <td style = 'width : 80%;'> <select name='cbo_professional' id = 'cbo_professional'>\                                          <option value='*'>*</option>";  for(var index = 0; index < professional.length; index ++){  var tt_value =  tt_decode_utf8(professional[index]);  if((tt_value != '-') && (tt_value.strip() != ''))  strHTML += "<option value='" + tt_value + "'> " +tt_value+ "</option>";  }  strHTML += "</select> </td> <td style = 'width : 10%;'><img id = 'wait_word' style = 'display : none;' src='TT_MetaDictionary/image/indicator.gif' /></td></tr></table></div>";  $('professional').innerHTML = strHTML;  var othertype = this.result['Meaning']['othertype'];          var strHTML = "<div class = 'Advanced_DE_VI_row'>\  <table style = 'width : 100%;'>\  <tr>\  <td style = 'width : 20%;' align='right'>"+CBO_OTHERTYPE_LABEL+" : </td>\  <td style = 'width : 40%;'> <select name='cbo_othertype' id = 'cbo_othertype'>\                                          <option value='*'>*</option>";  for(var index = 0; index < othertype.length; index ++){  var tt_value =  tt_decode_utf8(othertype[index]);  if((tt_value != '-') && (tt_value.strip() != ''))  strHTML += "<option value='" + tt_value + "'> " +tt_value+ "</option>";  }  strHTML += "</select> </td> <td style = 'width : 40%;'><img id = 'wait_word' style = 'display : none;' src='TT_MetaDictionary/image/indicator.gif' /></td></tr></table></div>";  $('othertype').innerHTML = strHTML;  Event.observe($("cbo_professional"), 'change', this.handleCbo_professionalChange, false );  Event.observe($("cbo_othertype"), 'change', this.handleCbo_othertypeChange, false );  Event.observe($("cbo_branch"), 'change', this.handleCbo_branchChange, false );  Event.observe($("cbo_professional"), 'keydown', this.handleCbo_professionalKeydown, false );  Event.observe($("cbo_othertype"), 'keydown', this.handleCbo_othertypeKeydown, false );  Event.observe($("cbo_branch"), 'keydown', this.handleCbo_branchKeydown, false );  Event.observe($("word_advanced"), 'keydown', this.handleword_advancedKeydown_Meaing, false );  Event.observe($("Advanced_Search_DE_VI"), 'click', this.handleOnClick_Advanced_search_Meaning, false );  Event.observe($("pre_1"), 'click', this.handleOnClickMore, false );  Event.observe($("pre_2"), 'click', this.handleOnClickMore, false );  Event.observe($("next_1"), 'click', this.handleOnClickMore, false );  Event.observe($("next_2"), 'click', this.handleOnClickMore, false );  Event.observe($("help_Advanced_DE_VI"), 'click', this.handleOnClickHelp_Advanced_DE_VI, false );  },    handleOnMouseMove_Dialog_Example:function(event){  var dialog = $('dialog_example');  try {  if (parseInt(event.clientX)+ parseInt(this.scrOfX) < parseInt(dialog.nw['x'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Dialog_Example, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientY)+ parseInt(this.scrOfY) < parseInt(dialog.nw['y'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Dialog_Example, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientX) + parseInt(this.scrOfX) > parseInt(dialog.se['x'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Dialog_Example, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientY) + parseInt(this.scrOfY) > parseInt(dialog.se['y'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Dialog_Example, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  }catch(e){;}  },    tt_create_Example:function(dict){  var dialog = document.createElement("div");  document.body.appendChild(dialog);  var keys =    $H(dict).keys();  dialog.setAttribute("class","dialog_Example");  dialog.style.position = "absolute";  dialog.style.top = this.yDialog_Example + "px";  dialog.style.left = (this.xDialog_Example- 290) + "px";  dialog.setAttribute("id","dialog_example");  var strHTML = "<div><table class = 'dialog_ExampleTitle'>";  strHTML += "<tr><td colspan='2' align='center'>"+EXAMPLE_LABEL+"<p></p></td></tr></table><div>";  strHTML += "<div id = 'Example_content' style = 'overflow : auto;'><table>";  for(var index = 0; index < keys.length; index ++){  var example = dict[keys[index]];  if(example['content'] == 'nothing'){  strHTML += "<tr><td align='center'>Example not exist</td></tr>";  break;  }              strHTML += "<tr><td>"+tt_decode_utf8(example['content'])+"</td>\  <td>" +tt_decode_utf8(example['Meaning'])+"</td>\                          </tr>";  }  dialog.innerHTML = strHTML + "</table></div>";  if (parseInt($('Example_content').clientHeight) > 300){  $('Example_content').style.height =  "300px";  }  dialog.style.width = dialog.clientWidth + "px";  dialog.style.height = dialog.clientHeight + "px";  dialog.nw={'x': parseInt(dialog.style.left),'y': parseInt(dialog.style.top)};  dialog.se={'x': parseInt(dialog.style.left) + parseInt(dialog.style.width),'y': parseInt(dialog.style.top) + parseInt(dialog.style.height)};  Event.observe(document, 'mousemove', this.handleOnMouseMove_Dialog_Example, false );  },    handleOnClick_Exemple:function(event){  var tt_info = event.target.id.split('_');  if(Prototype.Browser.IE){  this.scrOfY = document.documentElement.scrollTop;  this.scrOfX = document.documentElement.scrollLeft;  }  else{  this.scrOfY = window.pageYOffset;  this.scrOfX = window.pageXOffset;  }  this.xDialog_Example = parseInt(event.clientX + this.scrOfX - 5);  this.yDialog_Example = parseInt(event.clientY + this.scrOfY -5);  try {  var dictExample = this.result['Meaning'][tt_info[1]]['example'];  this.tt_create_Example(dictExample);  }  catch(e){}  },    handleOnMouseMove_Dialog_Meaning_Grammar:function(event){  var dialog = $('dialog_Advandce_Detail');  dialog.se={'x': parseInt(dialog.style.left) + parseInt(dialog.clientWidth),'y': parseInt(dialog.style.top) + parseInt(dialog.clientHeight)};  try {  if (parseInt(event.clientX)+ parseInt(this.scrOfX) < parseInt(dialog.nw['x'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Dialog_Meaning_Grammar, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientY)+ parseInt(this.scrOfY) < parseInt(dialog.nw['y'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Dialog_Meaning_Grammar, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientX) + parseInt(this.scrOfX) > parseInt(dialog.se['x'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Dialog_Meaning_Grammar, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  if (parseInt(event.clientY) + parseInt(this.scrOfY) > parseInt(dialog.se['y'])){  Event.stopObserving(document,'mousemove',this.handleOnMouseMove_Dialog_Meaning_Grammar, false);  var tt_parentNode = dialog.parentNode;  tt_parentNode.removeChild(dialog);  return;  }  }catch(e){;}  },    tt_DetailMore_Meaning:function(event){  var word = event.target.id.split('_')[0];  var dialog = document.createElement("div");  document.body.appendChild(dialog);  dialog.setAttribute("id","dialog_Advandce_Detail");  dialog.setAttribute("class","dialog_Advandce_Detail");  if(Prototype.Browser.IE){  this.scrOfY = document.documentElement.scrollTop;  this.scrOfX = document.documentElement.scrollLeft;  }  else{  this.scrOfY = window.pageYOffset;  this.scrOfX = window.pageXOffset;  }  var X = parseInt(event.clientX + this.scrOfX);  var Y = parseInt(event.clientY + this.scrOfY);  dialog.style.top = (Y - 10) + "px";  dialog.style.left = $('list_word_content').offsetLeft + $('portal-column-one').clientWidth + 30 + "px";  if(dialog.offsetTop < this.scrOfY)  dialog.style.top = (Y + 5) + "px";          var strHTML = "<div class = 'dialog_Advandce_create'>\  <div id = 'dialog_ExampleTitle'><table class = 'dialog_Advandce_head'>\  <tr><td align='center'>"+MEANING_DETAIL_LABEL+"</td></tr></table></div>\                        <div id = 'tt_DetailMore_Meaning' class = 'Meaning'></div></div>";  dialog.innerHTML = strHTML;      tt_Meaning = new TT_Create_Meaning(this.result['Meaning']);  tt_Meaning.tt_create_Meaning($('tt_DetailMore_Meaning'));    dialog.nw={'x': parseInt(dialog.style.left),'y': parseInt(dialog.style.top)};      Event.observe(document, 'mousemove', this.handleOnMouseMove_Dialog_Meaning_Grammar, false );  },    tt_DetailMore_Grammar:function(event){  var dialog = document.createElement("div");  document.body.appendChild(dialog);  dialog.setAttribute("id","dialog_Advandce_Detail");  dialog.setAttribute("class","dialog_Advandce_Detail");  if(Prototype.Browser.IE){  this.scrOfY = document.documentElement.scrollTop;  this.scrOfX = document.documentElement.scrollLeft;  }  else{  this.scrOfY = window.pageYOffset;  this.scrOfX = window.pageXOffset;  }  var X = parseInt(event.clientX + this.scrOfX);  var Y = parseInt(event.clientY + this.scrOfY);  dialog.style.top = (Y - 10) + "px";  dialog.style.left = $('list_word_content').offsetLeft + $('portal-column-one').clientWidth + 183 + "px";  if(dialog.offsetTop < this.scrOfY)  dialog.style.top = (Y + 5) + "px";          var strHTML = "<div class = 'dialog_Advandce_create'>\  <div id = 'dialog_ExampleTitle'><table class = 'dialog_Advandce_head'>\  <tr><td align='center'>"+GRAMMAR_DETAIL_LABEL+"</td></tr></table></div>\                        <div id = 'tt_DetailMore_Grammar' class = 'Grammar' style = 'border : none !important'></div></div>";  dialog.innerHTML = strHTML;  tt_Grammar = new TT_Create_Grammar(this.result['Grammar']);  tt_Grammar.tt_create_Grammar($('tt_DetailMore_Grammar'));  dialog.nw={'x': parseInt(dialog.style.left),'y': parseInt(dialog.style.top)};  Event.observe(document, 'mousemove', this.handleOnMouseMove_Dialog_Meaning_Grammar, false );  },    tt_view_word:function(word,dict){  var tt_Meaning = dict['Meaning'];          var strHTML = "<table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;'></td>\                          <td style = 'width : 50%;' class = 'Meaning_word'><table style = 'width : 100%;'>";  var keys = $H(tt_Meaning).keys();  var tt_flag = false;  var tt_option = null;  var arrExample = [];  if(this.currentTab_Advanced.id.split("_")[0] == 'Meaning'){  tt_flag = true;  tt_option = $('cbo_branch').value  }  for(var index = 0; index < keys.length;index ++){  var tt_content = $H(tt_Meaning[keys[index]]);  var tt_temp = tt_decode_utf8(tt_content['content']);  if(tt_flag){                   strHTML += "<tr><td class = 'font_small_example1'>" + tt_temp + "</td>\                              <td id = '"+word + "_" + keys[index] +"_example' class = 'font_small_example2'>Ex</td></tr>";  arrExample.push(word + "_" + keys[index]+"_example");                          }  else{                  strHTML += "<tr><td class = 'font_small_example1'>" + tt_temp + "</td>\                              <td id = '"+word + "_" + keys[index] +"_example' class = 'font_small_example2'>Ex</td></tr>";  arrExample.push(word + "_" + keys[index]+"_example");  }  }          strHTML +="</table></td>\                          <td style = 'width : 30%;' class = 'Grammar_word'><table>";  var Grammar = $H(dict['Grammar']);  var kinds = Grammar['kind'].split(',');  if(kinds[0] != 'None'){  for(var index=0;index<kinds.length;index++)  try{  if(kinds[index] == 'Noun'){  var tt_head = $H($H(Grammar['content_'+kinds[index]]))['head'];  strHTML+= "<tr><td>"+kinds[index]+ "<i style = 'font-size:87%;'> "+GRAMMAR_CONTENT_LABEL['Article']+"  : " + tt_head['Article'] + "</i></td></tr>";  }  else  strHTML+= "<tr><td>"+kinds[index]+"</td></tr>";  }  catch(e){  strHTML+= "<tr><td>"+kinds[index]+"</td></tr>";  }  }  strHTML +="</table></td></tr></table>";  $(word +'_Detail').innerHTML = strHTML;  $(word +'_Detail').style.display = 'block';  for(var index = 0; index < arrExample.length;index ++){  Event.observe($(arrExample[index]), 'click', this.handleOnClick_Exemple, false );  }  $(word +'_DetailMore_Meaning').style.display = 'block';  $(word +'_DetailMore_Grammar').style.display = 'block';  Event.observe($(word +'_DetailMore_Meaning'), 'click', this.tt_DetailMore_Meaning, false );  Event.observe($(word +'_DetailMore_Grammar'), 'click', this.tt_DetailMore_Grammar, false );  },    handleOnClick_word:function(event){  tt_word = event.target.id.split('_')[0];  if($(tt_word +'_Detail').style.display == 'none'){  var keys = $H(this.tt_DictRerult_word).keys();  if(keys.indexOf(tt_word)<0){  tt_Show_ProtectiveScreen();  var dict_requet = {};  dict_requet['tt_word'] = tt_word;  dict_requet['tt_type'] = "DE_VI";  dict_requet['tt_option'] = "Grammar,Meaning";  dict_requet['service_kind'] = "SQL";  dict_requet['Dict_kind'] = "DE_VI";  $(tt_word + '_wait').style.display = 'block';  this.tt_Observable_word.notifyObservers("tt_getDataAdvacnde_DE_VI_word", dict_requet);  }  else{  try{  this.tt_view_word(tt_word,this.tt_DictRerult_word[tt_word]);  }  catch(e){}  }  }  else{  $(tt_word+ '_Detail').style.display = 'none';  }  },    handleOnClickMore: function(event){  var kindCmd = event.target.id.split('_')[0];  var keyDict = this.currentTab_Advanced.id.split('_')[0];  var arrWord = this.tt_arrWord;  var curentCounts = $('now1').textContent.split(".");  var curentCount = parseInt(curentCounts[2]);          var strHTML = "<div class = 'view_list_word_Head'><table><tr>\  <td style = 'width : 20%;' align='center'>"+WORD_LABEL+"</td>\  <td style = 'width : 50%;' align='center'>"+MEANING_LABEL+"</td>\  <td style = 'width : 30%;' align='center'>"+GRAMMAR_LABEL+"</td>\                          </tr></table></div>";  var tt_arrValue = [];  if(kindCmd == 'pre'){  if(curentCount >this.COUNT_WORD){  var stop = 0;  var start = 0;  var tt = curentCount % this.COUNT_WORD;  if(tt == 0){  stop = curentCount - this.COUNT_WORD - tt;  start =  stop - this.COUNT_WORD;  if(start <this.COUNT_WORD){  start = 0;  stop = this.COUNT_WORD;  }  }  else{  stop = curentCount - tt;  start =  stop - this.COUNT_WORD;  }  for(var index =start;index<stop;index++){  var tt_value = tt_decode_utf8(this.tt_arrWord[index]);  tt_arrValue.push(tt_value);                      strHTML += "<div id = '"+tt_value.toString() + "_listWord' class = 'view_list_word'><table><tr id = '" + tt_value + "_tr'>\  <td style = 'width : 20%;' class = 'word' id = '" + tt_value + "_td'>" +tt_value + "</td>\  <td style = 'width : 50%;'><img id = '"+tt_value +"_wait' style = 'display : none;' src='TT_MetaDictionary/image/indicator.gif'/>\  <img id = '"+tt_value +"_DetailMore_Meaning' style = 'display : none;' src='TT_MetaDictionary/image/arrowDown.gif'/></td>\                                      <td style = 'width : 30%;'><img id = '"+tt_value +"_DetailMore_Grammar' style = 'display : none;' src='TT_MetaDictionary/image/arrowDown.gif'/></td></tr></table></div>";  strHTML += "<div id = '"+tt_value+"_Detail' style = 'display : none;'></div>";  }  $('now1').innerHTML = (start + 1).toString() + ".." + stop.toString();  $('now2').innerHTML = (start + 1).toString() + ".." + stop.toString();  $('list_word_content').innerHTML = strHTML;  }  }  else{  if(curentCount < arrWord.length){  var start = curentCount;  var stop = arrWord.length;  if(start + this.COUNT_WORD < arrWord.length)  stop = start + this.COUNT_WORD;  for(var index =start;index<stop;index++){  try{  var tt_value = tt_decode_utf8(this.tt_arrWord[index]);                          strHTML += "<div id = '"+tt_value.toString() + "_listWord' class = 'view_list_word'><table><tr id = '" + tt_value + "_tr'>\  <td style = 'width : 20%;' class = 'word' id = '" + tt_value + "_td'>" +tt_value + "</td>\  <td style = 'width : 50%;'><img id = '"+tt_value +"_wait' style = 'display : none;' src='TT_MetaDictionary/image/indicator.gif'/>\  <img id = '"+tt_value +"_DetailMore_Meaning' style = 'display : none;' src='TT_MetaDictionary/image/arrowDown.gif'/></td>\                                          <td style = 'width : 30%;'><img id = '"+tt_value +"_DetailMore_Grammar' style = 'display : none;' src='TT_MetaDictionary/image/arrowDown.gif'/></td></tr></table></div>";  strHTML += "<div id = '"+tt_value+"_Detail' style = 'display : none;' class = 'view_list_detail'></div>";  tt_arrValue.push(tt_value);  }catch(e){}  }  $('now1').innerHTML = (start + 1).toString() + ".." + stop.toString();  $('now2').innerHTML = (start + 1).toString() + ".." + stop.toString();  $('list_word_content').innerHTML = strHTML;  }  }  for(var index = 0; index < tt_arrValue.length; index ++){  try{  Event.observe($(tt_arrValue[index] + "_td"), 'click', this.handleOnClick_word, false );  }catch(e){}  }  },    tt_create_ListResult:function(){            var strHTML = "<div class = 'view_list_word_Head'><table><tr>\  <td style = 'width : 20%;' align='center'>"+WORD_LABEL+"</td>\  <td style = 'width : 50%;' align='center'>"+MEANING_LABEL+"</td>\  <td style = 'width : 30%;' align='center'>"+GRAMMAR_LABEL+"</td>\                          </tr></table></div>";  var tt_arrVaule = [];  $('more1').style.display = 'block';  $('more2').style.display = 'block';  $('Result1').innerHTML = "<b>"+this.tt_arrWord.length + "</b>";  $('Result2').innerHTML = "<b>"+this.tt_arrWord.length + "</b>";  if(this.tt_arrWord.length > this.COUNT_WORD){  $('now1').innerHTML = "1..50";  $('now2').innerHTML = "1..50";  }  else {  $('now1').innerHTML = "";  $('now2').innerHTML = "";  }  $('pre_1').style.display = 'none';  $('pre_2').style.display = 'none';  $('next_1').style.display = 'none';  $('next_2').style.display = 'none';  for(var index = 0; index < this.tt_arrWord.length; index ++){  if(index < this.COUNT_WORD){  try{  var tt_value = tt_decode_utf8(this.tt_arrWord[index]);                      strHTML += "<div id = '"+tt_value.toString() + "_listWord' class = 'view_list_word'><table><tr id = '" + tt_value + "_tr'>\  <td style = 'width : 20%;' class = 'word' id = '" + tt_value + "_td'>" +tt_value + "</td>\  <td style = 'width : 50%;'><img id = '"+tt_value +"_wait' style = 'display : none;' src='TT_MetaDictionary/image/indicator.gif'/>\  <img id = '"+tt_value +"_DetailMore_Meaning' style = 'display : none;' src='TT_MetaDictionary/image/arrowDown.gif'/></td>\                                      <td style = 'width : 30%;'><img id = '"+tt_value +"_DetailMore_Grammar' style = 'display : none;' src='TT_MetaDictionary/image/arrowDown.gif'/></td></tr></table></div>";  strHTML += "<div id = '"+tt_value+"_Detail' style = 'display : none;' class = 'view_list_detail'></div>";  tt_arrVaule.push(tt_value);  }catch(e){}  }  else{  $('pre_1').style.display = 'block';  $('pre_2').style.display = 'block';  $('next_1').style.display = 'block' ; $('next_2').style.display = 'block' ; break;  }  }  $('list_word_content').innerHTML = strHTML;  for(var index = 0; index < tt_arrVaule.length; index ++)  try{  Event.observe($(tt_arrVaule[index] + "_td"), 'click', this.handleOnClick_word, false );  }catch(e){}  },    tt_create_Grammar:function() {  var keys = $H(this.result['Grammar']).keys();  var tt_content = $H(this.result['Grammar']);  if(keys[0] =='head')  this.tt_create_Grammar_Kind_Word();  if(keys[0] =='kindword')  this.tt_view_Inflection_class(tt_content['kindword']);  if(keys[0]=='word'){  this.tt_arrWord = this.result['Grammar']['word'];  this.tt_create_ListResult();  }  },    tt_search_Grammar_Kind_word:function(){  $('list_word_content').innerHTML = "";  $('more1').style.display = 'none';  $('more2').style.display = 'none';  $('Result1').innerHTML = "";  $('Result2').innerHTML = "";  if($('cbo_Kind_word').value != "*"){  tt_Show_ProtectiveScreen();  this.dictRequest['tt_option'] = "Grammar<*>kindword<*>" + $('cbo_Kind_word').value;  this.dictRequest['next'] = '1';  this.TT_DisplayResultObservable.notifyObservers("tt_getDataAdvacnde_DE_VI", this.dictRequest)  }  else  $('inflection_class').innerHTML = "";  },    handlecbo_Kind_word:function(event){  this.tt_search_Grammar_Kind_word();  },    tt_search_Grammar_wordList:function(){  var flag = true;  $('list_word_content').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  var type_sreach = "false";  this.dictRequest['next'] = '1';  if($('word_advanced').value.indexOf('<*>')>=0) flag = false;  try{  this.dictRequest['tt_option'] = "Grammar<*>word<*>" + $('cbo_Kind_word').value + '<*>' + $('cbo_inflection_class').value  + '<*>' + $('word_advanced').value +'<*>'+ type_sreach;  }  catch(e){  this.dictRequest['tt_option'] = "Grammar<*>word<*>" + $('cbo_Kind_word').value + '<*>*<*>' + $('word_advanced').value +'<*>'+ type_sreach;  }  if(flag){  tt_Show_ProtectiveScreen();  this.TT_DisplayResultObservable.notifyObservers("tt_getDataAdvacnde_DE_VI", this.dictRequest)  }  },    handleOnClick_Advanced_search_Grammar:function(event){  this.tt_search_Grammar_wordList();  },    handlecbo_Kind_wordKeydown:function(event){  if (event.keyCode == 13)  this.tt_search_Grammar_Kind_word();    },    handleword_advancedKeydown_Grammar:function(event){  if (event.keyCode == 13)  this.tt_search_Grammar_wordList();  },    tt_create_Grammar_Kind_Word:function(){          $('Advanced_Content').innerHTML = " <div class = 'inputSeacrh_Advanced_DE_VI'><div class = 'Advanced_DE_VI_row' ><table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;' align='right'>"+WORD_ADVANCED_LABEL+" : </td>\  <td style = 'width : 40%;'><input class = 'textInput' type = 'text' id = 'word_advanced' value = '*'/></td>\  <td style = 'width : 20%;'><input type='checkbox' id='type_sreach' name='type_sreach' value='type_sreach' ><label for ='type_sreach' style='font-weight:normal;'> "+TYPE_SEARCH_LABEL+"</label></td>\  <td style = 'width : 20%;' id = 'help_Advanced_DE_VI' class = 'help_Advanced_DE_VI'>"+DIALOG_ADVANCED_TITLE1+"</td></tr></table></div></div>\  <div id = 'Kind_word'></div><div id = 'inflection_class'></div>\  <div id = 'Advanced_DE_VI_SearchDiv'></div>\  <div id = 'more1' class = 'Advanced_DE_VI_row' style = 'display : none;'><table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;' align='right'>"+RESULT+" : </td>\  <td id = 'Result1' style = 'width : 20%;'></td>\  <td id = 'now1' style = 'width : 45%; padding-right: 10px !important;' align='right'></td>\  <td style = 'width : 10%;'><input class='commandButton_Pre' type='button' value='"+BUTTON_PREVIOUS_LABEL+"' id = 'pre_1'/></td>\  <td style = 'width : 5%;'><input class='commandButton_Next' type='button' value='"+BUTTON_NEXT_LABEL+"' id = 'next_1'/></td>\  </tr></table></div>\  <div id = 'list_word_content'></div>\  <div id = 'more2' class = 'Advanced_DE_VI_row' style = 'display : none;'><table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;' align='right'>"+RESULT+" : </td>\  <td id = 'Result2' style = 'width : 20%;'></td>\  <td id = 'now2' style = 'width : 45%; padding-right: 10px !important;' align='right'></td>\  <td style = 'width : 10%;'><input class='commandButton_Pre' type='button' value='"+BUTTON_PREVIOUS_LABEL+"' id = 'pre_2'/></td>\  <td style = 'width : 5%;'><input class='commandButton_Next' type='button' value='"+BUTTON_NEXT_LABEL+"' id = 'next_2'/></td>\                                                                                      </tr></table></div>";  var  Kind_word_lang= [ADJECTIVE_LABEL,ADVERB_LABEL,BUCHSTABE_LABEL,CONJUNCTION_LABEL,INTERJECTION_LABEL,NOUN_LABEL,PRONOUN_LABEL,PREPOSITION_LABEL,VERB_LABEL];  var  Kind_word= ['Adjective','Adverb','Buchstabe','Conjunction','Interjection','Noun','Pronoun','Preposition','Verb'];          var strHTML = "<div class = 'Advanced_DE_VI_row'>\  <table style = 'width : 100%;'>\  <tr>\  <td style = 'width : 20%;' align='right'>"+CBO_KIND_WORD_LABEL+" :</td>\  <td style = 'width : 40%;'> <select name='cbo_Kind_word' id = 'cbo_Kind_word'>\                                          <option value='*'>*</option>";  for(var index=0;index<Kind_word.length;index++)  strHTML += "<option value='"+Kind_word[index]+"'>"+Kind_word_lang[index]+"</option>";  strHTML += "</select> </td> <td style = 'width : 40%;'><img id = 'wait_Kind_word' style = 'display : none;' src='TT_MetaDictionary/image/indicator.gif' /></td></tr></table></div>";  $('Kind_word').innerHTML = strHTML;          $('Advanced_DE_VI_SearchDiv').innerHTML = "<div class = 'Advanced_DE_VI_row'><table style = 'width : 100%;'><tr>\  <td style = 'width : 20%;' align='right'></td>\  <td style = 'width : 80%;'><input class='commandButton_Next' type='button' value='"+BUTTON_SEARCH_LABEL+"' id = 'Advanced_Search_DE_VI'/></td>\                                                          </tr></table></div>";          Event.observe($('cbo_Kind_word'), 'change', this.handlecbo_Kind_word, false );  Event.observe($('cbo_Kind_word'), 'keydown', this.handlecbo_Kind_wordKeydown, false );  Event.observe($('word_advanced'), 'keydown', this.handleword_advancedKeydown_Grammar, false );  Event.observe($('Advanced_Search_DE_VI'), 'click', this.handleOnClick_Advanced_search_Grammar, false );  Event.observe($("pre_1"), 'click', this.handleOnClickMore, false );  Event.observe($("pre_2"), 'click', this.handleOnClickMore, false );  Event.observe($("next_1"), 'click', this.handleOnClickMore, false );  Event.observe($("next_2"), 'click', this.handleOnClickMore, false );  Event.observe($("help_Advanced_DE_VI"), 'click', this.handleOnClickHelp_Advanced_DE_VI, false );  },    handlecbo_inflection_class:function(event){  $('list_word_content').innerHTML = "";  $('more1').style.display = 'none';  $('more2').style.display = 'none';  $('Result1').innerHTML = "";  $('Result2').innerHTML = "";  },    handlecbo_inflection_class_keydown:function(event){  if (event.keyCode == 13)  this.tt_search_Grammar_wordList();  },    tt_view_Inflection_class:function(arr){          var strHTML = "<div class = 'Advanced_DE_VI_row'>\  <table style = 'width : 100%;'>\  <tr>\  <td style = 'width : 20%;' align='right'>"+CBO_INFLECTION_CLASS+" :</td>\  <td style = 'width : 40%;'> <select name='cbo_inflection_class' id = 'cbo_inflection_class' style = 'width : 100%;'>\                                          <option value='*'>*</option>";  for(var index=0;index<arr.length;index++)  strHTML += "<option value='"+tt_decode_utf8(arr[index])+"'>"+tt_decode_utf8(arr[index])+"</option>";  strHTML += "</select> </td> <td style = 'width : 40%;'><img id = 'wait_Kind_word' style = 'display : none;' src='TT_MetaDictionary/image/indicator.gif' /></td></tr></table></div>";  $('inflection_class').innerHTML = strHTML;  Event.observe($('cbo_inflection_class'), 'change', this.handlecbo_inflection_class, false );  Event.observe($('cbo_inflection_class'), 'keydown', this.handlecbo_inflection_class_keydown, false );  },    handleOnTabClick_Advanced:function(event){  $('Advanced_Content').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  var key = event.target.id.split('_')[0];  this.currentTab_Advanced.style.background = TAB_NOTSELETC_BACKGROUND;  this.currentTab_Advanced = $(event.target.id);  this.currentTab_Advanced.style.background = TAB_SELETC_BACKGROUND;  if(key == "Meaning")  this.dictRequest['tt_option'] = "Meaning<*>head";  if(key == "Grammar")  this.dictRequest['tt_option'] = "Grammar<*>head";  this.dictRequest['next'] = '1';  tt_Show_ProtectiveScreen();  this.TT_DisplayResultObservable.notifyObservers("tt_getDataAdvacnde_DE_VI", this.dictRequest)  },    tt_setDefault_Advanced :function(key){  this.currentTab_Advanced = $(key + "_tab");  },    tt_Create_Tab:function() {  ContentMyMetadict.innerHTML = "";  var dictLabelTab = {'Grammar':GRAMMAR_ADVANCED_LABEL,'Meaning':MEANING_ADVANCED_LABEL} ; var arrKeys = "";  if(Prototype.Version == '1.6.0_rc0')  arrKeys = this.dictRequest['tt_option'].split('_');  else  arrKeys = this.dictRequest.get('tt_option').split('_');  var htmlStr = "<div id='heatIndex'><ul class = 'Tab_Dict'>";  if(arrKeys[0] != ""){  var tt_contentTab = arrKeys[0].split('<*>')[0] ;             htmlStr += "<li><a id='"+tt_contentTab+"_tab' href='javascript://' class = 'Tab_Search_selected'>"+dictLabelTab[tt_contentTab]+"</a></li>";  }  for (i=1; i<arrKeys.length; i++) {  var tt_contentTab = arrKeys[i].split('<*>')[0] ; if(tt_contentTab != "")                  htmlStr += "<li><a id='"+tt_contentTab +"_tab' href='javascript://'>"+dictLabelTab[tt_contentTab]+"</a></li>";  }  htmlStr += "</ul><div id='Advanced_Content' class = 'Content_dict'></div></div>";  ContentMyMetadict.innerHTML = htmlStr;  $('Advanced_Content').innerHTML = "<center><img class='hinh' src='TT_MetaDictionary/image/spinner.gif' /></center>";  this.tt_setDefault_Advanced(arrKeys[0].split('<*>')[0]);  for (var index = 0;index< arrKeys.length; index ++){  var tt_contentTab = arrKeys[index].split('<*>')[0];  if(tt_contentTab != "")  Event.observe($(tt_contentTab + "_tab"), 'click', this.handleOnTabClick_Advanced, false );  }  }  };var ContentMyMetadict = null;  var ProtectiveScreen = null;  var ProtectiveScreen_resource = null;  var KindSite = "TUM";  var LangCurrent_WIKI = null;  var LangCurrent_DICLEO = null;  var ShowAllMeaning = true;  var ShowAllGrammar = true;  var LANG_WIKI = ['da','de','en','fr','it','pt','ru','tr','vi','ja','ko','zh'];  var LANG_DIC_LEO = ['deen','ende','defr','frde','dees','esde'];  var LANG_DIC_LEO_CONTENT  = $H({'deen':'ENGLISCH-DEUTSCH',  'ende':'ENGLISCH-DEUTSCH',  'defr':'FRANZÖSISCH-DEUTSCH',  'frde':'FRANZÖSISCH-DEUTSCH',  'dees':'SPANISCH-DEUTSCH',  'esde':'SPANISCH-DEUTSCH'});  var OPTION_DE_VI = ['Meaning','Grammar'];    var TAB_SELETC_BACKGROUND = '#EDF1F4';  var TAB_NOTSELETC_BACKGROUND = '#fff';  function tt_runDictionary(){    if($('maincontentwrapper')){    MYMETADICT_LABEL = "MyMetaDictionary";  }  else{    TAB_SELETC_BACKGROUND = '#FFE381';  TAB_NOTSELETC_BACKGROUND = '#fff';  if(Prototype.Browser.IE){  if(navigator.userAgent.toString().indexOf('MSIE 7.0')> 0){  $('layouttable').style.border = "0px";  $('thePloneCalendar').style.border = "0px";  }  else{    $('TopDict').style.margin = '0px 0px 0px 0px';    }  }    KindSite = "BV";  }  ProtectiveScreen_resource = $('visual-portal-wrapper');  ProtectiveScreen = document.createElement("div");  document.body.appendChild(ProtectiveScreen);  ProtectiveScreen.setAttribute("class","ProtectiveScreen");                        tt_Hide_ProtectiveScreen();  var tt_metadicInstance = new TT_MetaDictionary();  }    function tt_Hide_ProtectiveScreen(){  ProtectiveScreen.style.display = 'none';  }  function tt_Show_ProtectiveScreen(){  ProtectiveScreen.style.width= (ProtectiveScreen_resource.clientWidth +5) + 'px';  ProtectiveScreen.style.height = (ProtectiveScreen_resource.clientHeight + 22)+ 'px';  ProtectiveScreen.style.display = 'block';  }  function tt_encode_utf8(rohtext) {    rohtext = rohtext.replace(/\r\n/g,"\n");  var utftext = "";  for(var n=0; n<rohtext.length; n++)  {    var c=rohtext.charCodeAt(n);    if (c<128)  utftext += String.fromCharCode(c);    else if((c>127) && (c<2048)) {  utftext += String.fromCharCode((c>>6)|192);  utftext += String.fromCharCode((c&63)|128);}    else {  utftext += String.fromCharCode((c>>12)|224);  utftext += String.fromCharCode(((c>>6)&63)|128);  utftext += String.fromCharCode((c&63)|128);}  }  return utftext;  }    function tt_decode_utf8(utftext) {  var plaintext = ""; var i=0; var c=c1=c2=0;    try{  while(i<utftext.length) {  c = utftext.charCodeAt(i);  if (c<128) {  plaintext += String.fromCharCode(c);  i++;  } else if((c>191) && (c<224)) {  c2 = utftext.charCodeAt(i+1);  plaintext += String.fromCharCode( ((c&31)<<6) | (c2&63) );  i+=2;  } else {  c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2);  plaintext += String.fromCharCode(((c&15)<<12) | ((c2&63)<<6) | (c3&63));  i+=3;  }  }  return plaintext;  }  catch(e){return utftext;}  }  