var dict = { events: {}, element: {}, timer: null, init: function() { with(dict) { if($n.msie) { $$style('#content { width:300px; margin:34px 0 0 -304px; }'); $$style('#sound { margin:15px 0 0 -26px; }'); } element.loading = new $element(null,$('header'),{ position:'absolute', display:'none', width:10, height:10, background:'url(http://www.zencefil.net/loading.gif) no-repeat' }); element.counter = new $element(null,$('header'),{ position:'absolute', font:'10px Tahoma,Arial', display:'none', color:'#aaa', width:10, height:10 }); element.cancel = new $element(null,$('header'),{ position:'absolute', display:'none', cursor:'pointer', background:'url(http://www.zencefil.net/cancel.gif) no-repeat', width:16, height:16 },null,{ click:dict.close }); element.title1 = new $element(null,$('header'),{ font:'10px Arial', display:'none', color:'#aaa' },null,{},'çevir'); element.title3 = new $element(null,$('nelervar'),{ font:'9px Arial', display:'none', color:'#aaa' },null,{},'zencefil v.0.0.7 kullanılmıştır '); element.title2 = new $element(null,$('footer'),{ font:'10px Arial', display:'none', color:'#aaa' }); element.title2text = new $element('text:powered: ',element.title2.element); element.title2link = new $element('a',element.title2.element,null,{ href:'mailto:esergun@msn.com' }); element.title2linktext = new $element('text:e.e',element.title2link.element); element.title2text = new $element('text: @ 2008 web;www.zencefil.net',element.title2.element); events.inputkDown = new $event($('key'),'keydown',function(){ try{ dict.timer.kill(); }catch (e){}; dict.element.title1.style.set({ display:'block' }); dict.element.title3.style.set({ display:'block' }); dict.element.title2.style.set({ display:'block' }); dict.element.loading.style.set({ margin:'30 0 0 285px' }); dict.element.counter.style.set({ margin:'29 0 0 287px' }); dict.element.cancel.style.set({ margin:'29 0 0 280px' }); dict.setPositions(); }); events.inputkUp = new $event($('key'),'keyup',dict.counter); setPositions(); window.onLoad=dict.element.title2.style.set({ display:'block' });dict.element.title1.style.set({ display:'block' });dict.element.title3.style.set({ display:'block' }); $('key').focus(); $('wait').style.display='none'; } }, setPositions: function() { }, counter: function() { dict.element.loading.style.set({ display:'none' }); dict.element.cancel.style.set({ display:'none' }); dict.element.counter.style.set({ display:'block' }); $('sound').style.display='none'; try{ dict.timer.kill(); }catch (e){}; dict.timer = new $timer({ loop:1, interval:1000, onComplete:dict.call },function(){ dict.element.counter.element.innerHTML = 1-(dict.timer.counter+1); }); }, call: function() { dict.element.counter.style.set({ display:'none' }); dict.element.cancel.style.set({ display:'none' }); dict.element.loading.style.set({ display:'block' }); $('sound').style.display='none'; $include('http://www.zencefil.net/engine.php?key='+$('key').value); }, put: function(data) { dict.element.loading.style.set({ display:'none' }); dict.element.cancel.style.set({ display:'block' }); $('sound').style.display='none'; $('content').innerHTML = ''; for(x in data) eval("dict.element.link"+x+" = new $element('a',$('content'),{ backgroundImage:'url("+data[x].flag+")' },{ href:'#' },{ click:data[x].onclick },data[x].word)"); if(data.length==0) var nll = new $element('a',$('content'),null,{ href:'#' },null,"Sonuç yok."); $('content').style.display = 'block'; var fi = new $manipulation({ element:$('content'), opacity:[1,0.2], interval:30 }); }, src: function(word,lang) { dict.close(); $('text').innerHTML = 'Lütfen Bekleyin.'; $('key').value = word; $include('http://www.zencefil.net/sescek.php?kelime='+word); $include('http://www.zencefil.net/text.php?key='+word+'&lang='+lang); }, src2: function(word,lang) { dict.close(); $('text').innerHTML = 'Lütfen Bekleyin.'; $('key').value = word; $include('http://www.zencefil.net/sescek.php'); $include('http://www.zencefil.net/text.php?key='+word+'&lang='+lang); }, close: function() { var fo = new $manipulation({ element:$('content'), opacity:[0,0.2], interval:30, onComplete:function(){ dict.element.cancel.element.style.display = 'none'; $('content').style.display = 'none'; } }); } } window.onload = dict.init;