function bar(obj, drm) {
    if (drm == "goster")
        document.getElementById(obj).style.visibility = 'visible';
    else
        document.getElementById(obj).style.visibility = 'hidden';
}
function GE(i) {
    return document.getElementById(i);
}
function bkzv(a, b)
{
  var o=document.getElementById("mini_entry");
  if(document.selection)
  {
    var rg=document.selection.createRange();
    if(rg.parentElement()==o) {
	    rg.text = a+rg.text+b;
	    rg.select();
	  } else alert("bkz'a cevirmek istediginiz metni secin");
	}
  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 bkzvm() {
	var text = getText();
	if (helpstat){
		alert("Bkz vermek istediginiz basligi yaziniz");
	} else if (basic) {
		AddTxt="(bkz: " + text + ")";
		AddText(AddTxt);
	} else {
		txt=prompt("Bkz vermek istediginiz basligi yaziniz");
		if(txt!=null) {
			AddTxt="(bkz: "+txt+")";
			AddText(AddTxt);
		}
	}
}

function bkzvv(a,b)
{
  var o=document.getElementById("entry");
  if(document.selection)
  {
    var rg=document.selection.createRange();
    if(rg.parentElement()==o) {
	    rg.text = a+rg.text+b;
	    rg.select();
	  } else alert("bkz'a cevirmek istediginiz metni secin");
	}
  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 pop(url, ad, w, h, scr, rs){
eval(window.open(url,ad,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars="+ scr +",resizable="+ rs +",width=" + w + ",height=" + h + ""));
}

function bkzvm(mini_entry,a,b)
{
  var o=document.getElementById(mini_entry);
  if(document.selection && !window.opera)
  {
	  var rg=document.selection.createRange();
	  if(rg.parentElement()==o) {
		  rg.text = a+rg.text+b;
		  rg.select();
		} else alert("bkz'a cevirmek istediginiz metni secin");
  }
  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 bkzvvm(entry,a,b)
{
  var o=document.getElementById(entry);
  if(document.selection && !window.opera)
  {
	  var rg=document.selection.createRange();
	  if(rg.parentElement()==o) {
		  rg.text = a+rg.text+b;
		  rg.select();
		} else alert("bkz'a cevirmek istediginiz metni secin");
  }
  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 ShowHide(id1, id2) 
{
	var res = expMenu(id1);
	if (id2 != '') expMenu(id2);

}

function expMenu(id) 
{
	var itm = null;
	if (document.getElementById) 
	{
		itm = document.getElementById(id);
	}
	else if (document.all)
	{
		itm = document.all[id];
	} 
	else if (document.layers)
	{
		itm = document.layers[id];
	}
	if (!itm) 
	{
		// do nothing
	}
	else if (itm.style) 
	{
		if (itm.style.display == "none")
		{ 
			itm.style.display = ""; 
			return 1;
		}
		else
		{
			itm.style.display = "none"; 
			return 2;
		}
	}
	else 
	{
		itm.visibility = "show"; 
		return 1;
	}
}
function ov(o) {
    o.id = "btnOver";
}

function md(o) {
    o.id = "btnDown";
}

function bn(o) {
    o.id = "";
}
