// top.js - coded by umehmet - (c) U Mehmet


var bid=0,lo=null,curtitle=null,is="",bis="",se="",pr='<td onmousedown="md(this)" onmouseup="bn(this)" onmouseover="ov(this)" onmouseout="bn(this)" class="but" onclick=',sprite=0,dcss="sozluk.css";



function hen(d,a,b)
{
  var o=document.getElementById(d);
  if(document.selection && !window.opera)
  {
      var rg=document.selection.createRange();
      if(rg.parentElement()==o) {
          rg.text = a+rg.text+b;
          rg.select();
        } else alert("kafana göre takılma,metin seç!");
  }
  else if(o.selectionStart||o.selectionStart=='0')
  {
    var s = o.value;
    var end = o.selectionEnd;
    var start = o.selectionStart;
    o.value = s.substring(0,start)+a+s.substring(start,end)+b+s.substring(end);
    end += a.length+b.length;
    o.setSelectionRange(end, end);
  } else o.value += a+b;
  o.focus();
  return true;
}

function hen2(d,a,b)
{
  var o=document.getElementById(d);
  if(document.selection && !window.opera)
  {
      var rg=document.selection.createRange();
      if(rg.parentElement()==o) {
          rg.text = a+rg.text.replace(/ /gi , "+")+b;
          rg.select();
        } else alert("kafana göre takılma,metin seç!");
  }
  else if(o.selectionStart||o.selectionStart=='0')
  {
    var s = o.value;
    var end = o.selectionEnd;
    var start = o.selectionStart;
    o.value = s.substring(0,start)+a+s.substring(start,end).replace(/ /gi , "+")+b+s.substring(end);
    end += a.length+b.length;
    o.setSelectionRange(end, end);
  } else o.value += a+b;
  o.focus();
  return true;
}







function dbln4(e,i) {
  var k,c;
  if(window.event){k=e.keyCode;c=e.ctrlKey;}else{k=e.which;c=e.ctrlKey;}
  if(c&&(k==10||k==13))document.getElementById(i).submit(); 
}