﻿
function popup( sname,kalinlik,yukseklik,isim ) {

        window.open(sname,isim,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width=" + kalinlik+ ",height=" + yukseklik+"resizeable=0");

}

function at(sel)
{
        frames['stmain'].location.href = sel;
}

function dis(f)
{
        if(document.getElementById)
        {
                var obj = document.getElementById(f);
                obj.disabled = true;

        }
        else if (document.all)
        {
                var obj = document.all(f);
                obj.disabled = true;
        }
}

function kontrol()

{

        var hata = '';

        var dd = document.getElementById;

        var i = dd('e').value;

        var j = dd('f').value;

        var ads = dd('a').value;

        var email = dd('b').value;

        var kadi = dd('d').value;

        var il = dd('il').value;


        if(i != j)

        {

                hata = 'Sifreler birbirini tutmuyor. Kontrol edip, tekrar deneyin';

                alert(hata);

        }
                if((i == '') || (j == '') || (ads == '') || (email == '') || (kadi == '') || (il == ''))
        {

                hata = 'Asagidaki hucreler bos birakilamaz : \n - Sifre \n - Adi Soyad \n - E-Mail \n - Kullanici Adi \n - Sehir ';
                alert(hata);
        }

        document.hedeValue = (hata == '');
}

function jm(targ,selObj,restore)
{ //v3.0

  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;

}

function jump(selObj,restore){

var url = selObj.options[selObj.selectedIndex].value;

if (url) 
{
	remote = window.open(url, 'other');

	if (remote != null) 
	{
		if (remote.opener == null)

		remote.opener = self;
	}

}

if (restore) selObj.selectedIndex=0;

}

function changeStyle(tagName,styleName)

{
                tagName.className = styleName;
}

function goUrl(url,frm)

{
                open(url,frm);
}

function bkzver(a)
{
    if(document.selection)

    {
            var sel = document.selection.createRange();
        if(sel.parentElement() == document.getElementById("aciklama"))

        {
           var b = a;
            sel.text = "("+b+": "+sel.text+")";
            sel.select();

        return false;
        }
    }

    else
    {
        var nedir="";
        var b="";

        if(a == 'url') b = 'adresi';

        else b = 'kelimeyi';
        nedir = prompt(a+" verilecek "+b+" giriniz","");

        if(nedir != "" && nedir != null)
        {
                document.getElementById("aciklama").value += "("+a+": "+nedir+")";
                document.getElementById("aciklama").focus();
                return false;
        }
        else return false;
    }
}

function sec()
{
	for (var i=0;i<document.mesajform.elements.length;i++)
	{
	        var e=document.mesajform.elements[i];

	        if ((e.name != 'allbox') && (e.type=='checkbox'))
	        {
	                if (e.checked != true)
	                {
	                        e.checked = true;
	                }

	                else
	                {
	                        e.checked = false;
	                }
	        }
	}
}

var dlara=null;
var dara=null;

function brcont()
{
	if (document.getElementById)
	{
			dlara = document.getElementById("lara");
			dara = document.getElementById("ara");
	}
	else if (document.all)
	{
			dlara = document.all("lara");
			dara = document.all("ara");
	}
	else if (document.layers)
	{
	        dlara = document.layers["lara"];
	        dara = document.layers["ara"];
	}
}

function goster()
{
        brcont();
        dlara.style.visibility = 'visible';
        dara.style.visibility = 'hidden';
}

function gizle()
{
        brcont();
        dlara.style.visibility = 'hidden';
        dara.style.visibility = 'visible';
}

function h(obj,drm)
{
                if(drm == "goster")
                        document.getElementById(obj).style.visibility = 'visible';
                else
                        document.getElementById(obj).style.visibility = 'hidden';
}

function gG(obj) 
{
        if (document.getElementById(obj).style.display == 'block')
                document.getElementById(obj).style.display = 'none';
        else
                document.getElementById(obj).style.display = 'block';
}

var id=0,bid=0,lo=null,is="",bis="",se="",pr='<td onmousedown="md(this)" onmouseup="bn(this)" onmouseover="ov(this)" onmouseout="bn(this)" class="but" onclick=';

function ov(o)
{
  o.id="butOver";
}

function md(o)
{
  o.id="butDown";
}

function bn(o)
{
  o.id="";
}

function hr(o)
{
        if(o)o.click();
}

function b(t,u,c,tt)
{
  is="a"+(id++);
  document.write(pr+'"hr('+is+')"><a id='+is);
  if(tt)document.write(" title='"+tt+"'");
  document.write(' target='+t+' href="'+u+'">&nbsp;'+c+'&nbsp;</a></td>');
}

function bjs(t,js,c,tt)
{
  document.write(pr+'"'+js+'"><a href="#" onclick="'+js+'">&nbsp;'+c+'&nbsp;</a></td>');
}

function b2(t,u,c,s)
{
  is="a"+(id++);
  document.write(pr+'"hr('+is+')" colspan='+s+'><a id='+is+' target='+t+' href="'+u+'">&nbsp;'+c+'&nbsp;</a></td>');
}

function s(f,c)
{
  document.write(pr+'"document.getElementById(\''+f+'\').submit()" style="cursor:hand">&nbsp;&nbsp;'+c+'&nbsp;</td>');
}

function a(u,c,t)
{
  is="a"+(id++);
  document.write(pr+'"hr('+is+')" title="'+t+'"><a id='+is+' href="'+u+'" class=icon>&nbsp;'+c+'&nbsp;</a></td>');
}

function p(u,c,t,m)
{
  is="a"+(id++);
  document.write(pr+'"hr('+is+')" title="'+t+'"><a id='+is+' onclick="return confirm(\''+m+'\')" href="'+u+'" class=icon>&nbsp;'+c+'&nbsp;</a></td>');
}


function ct()
{
  tc=document.getElementById('ctf');
  if(tc)
  {
    var i=document.getElementsByTagName("input")
    var c=0;
    for(j=0;j<i.length;j++){if(i[j].type=="checkbox"){if(i[j].checked)c++;}}
    tc.style.display=c>0?'inline':'none';
  }
}

function ci(i)
{
  ic=document.getElementById('c'+i);
  with(ic)
  {
    style.display=style.display=='none'?'inline':'none';
    checked=checked?false:true;
    ct();
  }
}
function e(f,i,an)
{
        with(document)
        {
          write('<div align=right style="width:100%"><table id=m'+i+' style="visibility:hidden"><tr><td class=ei><a name="cid'+i+'"></a><a href="sozluk.php?process=eid&eid='+i+'">( #'+i+' )</a></td>');
                  document.write('<td>&nbsp;</td>');
				  a("javascript:od('sozluk.php?process=arti&id="+i+"')","+","+");
                  a("javascript:od('sozluk.php?process=eksi&id="+i+"');","-","+");
                  document.write('<td>&nbsp;</td>');
                  a("javascript:od('sozluk.php?process=popupmsg&islem=yenimsj.popup&gkime="+an+"&eid="+i+"','400','250');","msg","mesaj");
                  a("javascript:od('sozluk.php?process=ben&kim="+an+"','350','400')","?","kim?");


		  document.write('<td>&nbsp;</td>');
          write('</tr></table></div>');
          var d=getElementById('d'+i);
          var m="document.getElementById('m"+i+"').style.visibility=";
          d.onmouseover=new Function(m+"'visible'");
          d.onmouseout=new Function(m+"'hidden'");
        }
}
function e_mod(f,i,an,sr)
{
        with(document)
        {
          write('<div align=right style="width:100%"><table id=m'+i+' style="visibility:hidden"><tr><td class=ei><a name="cid'+i+'"></a><a href="sozluk.php?process=eid&eid='+i+'">( #'+i+' )</a></td>');
				  a("javascript:od('sozluk.php?process=arti&id="+i+"')","+","+");
                  a("javascript:od('sozluk.php?process=eksi&id="+i+"');","-","+");
                  document.write('<td>&nbsp;</td>');
                  a("javascript:od('sozluk.php?process=popupmsg&islem=yenimsj.popup&gkime="+an+"&eid="+i+"','400','250');","msg","mesaj");
			a("javascript:location.href='sozluk.php?process=eduzenle&id="+i+"&sr="+sr+"';","duzenle","duzenle");
            a("javascript:od('sozluk.php?process=esil&id="+i+"&sr="+sr+"','350','150')","sil","sil!");
			a("javascript:od('sozluk.php?process=ben&kim="+an+"','350','400')","?","kim?");

		  document.write('<td>&nbsp;</td>');

          write('</tr></table></div>');
          var d=getElementById('d'+i);
          var m="document.getElementById('m"+i+"').style.visibility=";
          d.onmouseover=new Function(m+"'visible'");
          d.onmouseout=new Function(m+"'hidden'");
        }
}
function e_ben(f,i,an,sr)
{
        with(document)
        {
          write('<div align=right style="width:100%"><table id=m'+i+' style="visibility:hidden"><tr><td class=ei><a name="cid'+i+'"></a><a href="sozluk.php?process=eid&eid='+i+'">( #'+i+' )</a></td>');
                  document.write('<td>&nbsp;</td>');
			a("javascript:location.href='sozluk.php?process=eduzenle&id="+i+"&sr="+sr+"';","duzenle","duzenle");
		  a("javascript:od('sozluk.php?process=esil&id="+i+"&sr="+sr+"','250','150')","sil","sil!");
		  a("javascript:od('sozluk.php?process=ben&kim="+an+"','400','400')","?","kim?");
          write('</tr></table></div>');
          var d=getElementById('d'+i);
          var m="document.getElementById('m"+i+"').style.visibility=";
          d.onmouseover=new Function(m+"'visible'");
          d.onmouseout=new Function(m+"'hidden'");
        }
}
function zyrt(f,i,an)
{
        with(document)
        {
          write('<div align=right style="width:100%"><table id=m'+i+' style="visibility:hidden"><tr><td class=ei><a name="cid'+i+'"></a><a href="sozluk.php?process=eid&eid='+i+'">( #'+i+' )</a></td>');
                  document.write('<td>&nbsp;</td>');

          write('</tr></table></div>');
          var d=getElementById('d'+i);
          var m="document.getElementById('m"+i+"').style.visibility=";
          d.onmouseover=new Function(m+"'visible'");
          d.onmouseout=new Function(m+"'hidden'");
        }
}

function dd(i)
{
        od('sozluk.php?process=privmsg&islem=yenimsj&gkime='+i);
        document.getElementById('d'+i).style.visibility='hidden';
}


function tr(i)
{
  document.write('<tr style="cursor:default" onmouseover="document.getElementById("m'+i+'").style.visibility=\'visible\'" onmouseout="style.borderWidth=\'0\';document.getElementById("m'+i+'").style.visibility=\'hidden\'">');
}

function od(u,w,h,x,y)
{
  if(!w)w=320;if(!h)h=200;if(!x)x=(screen.width-w)/2;if(!y)y=(screen.height-h)/2;
  var w=window.open(u,"_blank","resizable=yes,scrollbars=yes,top="+x.toString()+",left="+y.toString()+",width="+w.toString()+",height="+h.toString());
  w.focus();
}

function odf(u,w,h,x,y)
{
        od(u,w,h,x,y);return false;
}

function au(d)
{
  document.write('<tr><td nowrap align=right class=aul>(<a class=aul href="?t='+an+'">'+an+'</a>, '+d+')</td></tr>');
}

function sets(doc,fn)
{
  if(doc) {
    var len = doc.styleSheets.length;
    if(doc.createStyleSheet)
    {
            if (fn=="") {
              if(len>1) doc.styleSheets[1].href="";
            } else {
              if (len<2) doc.createStyleSheet(fn); else doc.styleSheets[1].href=fn;
            }
    }
    else
    {
      doc.location.reload();
    }
  }
}

function bp(o,m,c)
{
        var oo;
        for(var n=1;n<=m;n++) {
                oo = document.createElement("OPTION");
                o.options.add(oo);
                oo.innerText = n;
                oo.Value = n;
                oo.selected = n==c;
        }
}

var inpp=false,o=null,maxs=11,lx=20,w=213,bi=false,sint=new Array(20,23,30,43,61,82,107,135,166,197,213);

function os()
{
  if((o=document.getElementById('a'))!=null) with(o.style) with(document.body)
  {
          bi=n<=0;left=scrollLeft+sint[bi?0:(maxs-1)]+(clientWidth-233)+2;
          if(o.clientHeight+44<clientHeight) top=scrollTop+44;
  }
}

function ca()
{
        with(document.body) with(o.style) {
                left=(scrollLeft+sint[n]+(clientWidth-233))+"px";width=((w+lx)-sint[n])+"px";
                if(bi){if(++n<maxs)setTimeout("ca()",20); else {inpp=false;document.body.focus();document.getElementById('amain').disabled=true}}
                else{if(n-->0)setTimeout("ca()",20); else {inpp=false;document.getElementById('amain').disabled=false;}}
  }
}

function pp()
{
        if(!inpp) { inpp=true;o=document.getElementById('a');bi=n<=0;n=bi?0:(maxs-1);ca(); }
}

function tgb(i)
{
  t=document.getElementById('t'+i);
  m=document.getElementById('m'+i);
  b=document.getElementById('b'+i);
  if(t&&m&&b) {
    for(var j=0;j<bid;j++) {
      if(i==("b"+j))continue;
      document.getElementById('bb'+j).style.display='inline';
      document.getElementById('tb'+j).innerHTML='&rsaquo;&rsaquo;'+'&nbsp;';
      document.getElementById('mb'+j).style.display='none';
    }
    t.innerHTML=m.style.display=='none'?'&lsaquo;&lsaquo;':'&rsaquo;&rsaquo;'+'&nbsp;';
    m.style.display=m.style.display=='none'?'inline':'none';
    b.style.display=b.style.display=='none'?'inline':'none';
  }
}

function obba(n,t)
{
  bis="b"+(bid++);
  document.write('<a style="vertical-align:middle;" id=t'+bis+' href="#" onclick="tgb(\''+bis+'\');">&rsaquo;&rsaquo;&nbsp;</a>'+
    '<div id=m'+bis+' style="vertical-align:middle;width:90%;display:none;"><a href="msg.asp?to='+escape(n)+'" onclick="tgb(\''+bis+'\');od(\'msg.asp?to='+escape(n)+'\');return false">&nbsp;/msg</a>'+
    '&nbsp;&middot;<a href="info.asp?n='+escape(n)+'" onclick="tgb(\''+bis+'\');od(\'info.asp?n='+escape(n)+'\',350,420);return false">&nbsp;?</a>'+
    '&nbsp;&middot;<a href="index.asp?a=sr&so=y&f=y&au='+escape(n)+'" target="sozindex" onclick="tgb(\''+bis+'\');top.sozindex.location.href=\'index.asp?a=sr&so=y&f=y&au='+escape(n)+'\'">&nbsp;son</a>'+
    '</div><div id=b'+bis+' style="vertical-align:middle;width:90%;display:inline;"><a href="#" onclick="od(\'msg.asp?to='+escape(n)+'\');return false" id='+bis+'>'+n+'</a></div><br>');
}
function ob(n,t)
{
        t = (15-t)/15.0;
        document.write('<a href="sozluk.php?process=privmsg&islem=yenimsj&kime='+escape(n)+'" onclick="od(\'sozluk.php?process=privmsg&islem=yenimsj&kime='+escape(n)+'\');return false">'+n+'</a><br>');
}

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("!");
  }
  else if(o.textLength||window.opera)
  {
          var s = o.value;
          o.value = s.substring(0,o.selectionStart)+a+s.substring(o.selectionStart,o.selectionEnd)+b+s.substring(o.selectionEnd,o.textLength);
  } else o.value += a+b;
  o.focus();
  return false;
}


function tac()
{
  var c = document.getElementsByTagName("input");
  for(var i=0;i<c.length;i++)if(c[i].type=="checkbox")c[i].checked=!c[i].checked;
}

function selcnt()
{
  var c = document.getElementsByTagName("input");
  var cnt = 0;
  for(var i=0;i<c.length;i++)if(c[i].type=="checkbox")cnt += c[i].checked?1:0;
  return cnt;
}
/*function ara()
{
  if(top.left)top.left.location.href='sozluk.php?process=search&vampara_baslik='+escape(document.getElementById('q').value);
}
*/
function ara() {
    if (top.left) top.left.location.href = 'sozluk.php?process=search&vampara_baslik=' + G('q').value;
}

function G(i) {
    return document.getElementById(i);
}

function idara()
{
  if(top.main)top.main.location.href='sozluk.php?process=eid&eid='+escape(document.getElementById('q').value);
}
function dab()
{
  var c = document.getElementsByTagName("input");
  for(var i=0;i<c.length;i++)if(c[i].type=="submit"||c[i].type=="button")c[i].disabled=true;
}

