<!--
function de() {
  if (document.sell.minimum_bid.value == "") document.sell.minimum_bid.value = "0";
  var a = document.sell.minimum_bid.value.split("");
  var b = "";
  for (var i in a)
    if (a[i].match(/\d/))
    b += a[i];
  while (b.length>1 && b.charAt(0) == "0") b=b.substr(1,b.length);
  document.sell.minimum_bid.value = b;

  if (document.sell.reserve_price.value == "") document.sell.reserve_price.value = "0";
    var a = document.sell.reserve_price.value.split("");
    var b = "";
    for (var i in a)
      if (a[i].match(/\d/))
      b += a[i];
    while (b.length>1 && b.charAt(0) == "0") b=b.substr(1,b.length);
  document.sell.reserve_price.value = b;
}


function Ayarla(c)
{
	var str,str1,b,x,y,z,i,j,sonuc = false;
    var dolu = true;

 if (c.value.length>0){
	  var a = c.value.split("");
	  var b = "";

	for (var i in a)
		if (a[i].match(/\d/))
		b += a[i];
	  while (b.length>1 && b.charAt(0) == "0") b=b.substr(1,b.length);

		  y = b.length;
		  z = y % 3;
		  y = (y - z) / 3 + 1;
		  if (z != 0)
			str = b.substring(0,z);
		  for(i = 1; i < y ; i++)
			if (str != null)
			  str = new String(str+","+b.substring((z+(i-1)*3),(z+i*3)));
			else
			  str = b.substring(0,3);

		 c.value = new String(str);
 }
}

 function EditedTutar(a)
  { var str,str1,b,x,y,z,i,j,sonuc = false;
    var dolu = true;
    b = a.value;
    for(z=0; z < b.length; z++)
    {  if (b.charAt(z) >= '1' && b.charAt(z) <= '9')
        {
          str1 = b.charAt(z);
          j = z + 1;
          sonuc = true;
          z = b.length;
        }
    }
    if (sonuc)
    {
      for(z=j; z < b.length; z++)
      {
        if (b.charAt(z) >= '0' && b.charAt(z) <= '9')
          str1 = new String(str1+b.charAt(z));
      }
      x = str1;

      //b = document.frm1.trkd.value;
      //switch (b)
      //{ case "E3001":
      //  case "Y0001":
      //    if (x.length < 7)
      //    { alert("TUTAR 1,000,000 DAN KÜÇÜK OLAMAZ");
      //      sonuc = false;
      //      a.focus();
      //    }
      //    break
      //  default:
      //}
      y = x.length;
      z = y % 3;
      y = (y - z) / 3 + 1;
      if (z != 0)
        str = x.substring(0,z);
      for(i = 1; i < y ; i++)
        if (str != null)
          str = new String(str+","+x.substring((z+(i-1)*3),(z+i*3)));
        else
          str = x.substring(0,3);
      a.value = new String(str);
   }
   else
   {
     //if ((document.frm1.trkd.value != "VRTH2") && (document.frm1.trkd.value != "VRTL2"))
     //{
	//alert("Tutar Alanına Sıfırdan Büyük Bir Değer Giriniz");
	//a.value = 0;
	//a.focus();
     //}
     //else
     //{
     sonuc = true;
        a.value = 0;
     //}
   }
   return sonuc;
  }
  function TutarGeriAl()
   {  var i,j,x,y,str,l,z,sonuc = true;
      for (i=0; i < document.frm1.elements.length; i++)
      { x = new String(document.frm1.elements[i].name);
        x = x.toLowerCase();
        if ((x.substring(0,4) == "ack") || (x.substring(0,5) == "wack"))
           sonuc = AckKont();
      }

      if (sonuc)
        for (i=0; i < document.frm1.elements.length; i++)
        { x = new String(document.frm1.elements[i].name);
          x = x.toLowerCase();
          if ((x.substring(0,5) == "tutar") || (x.substring(0,6) == "wtutar"))
          { y = document.frm1.elements[i].value;
            sonuc = false;
            for(z=0; z < y.length; z++)
              if (y.charAt(z) >= '1' && y.charAt(z) <= '9')
              {
                str = y.charAt(z);
                j = z + 1;
                sonuc = true;
                z = y.length;
              }
            if (sonuc)
            {
              for(z=j; z < y.length; z++)
                if (y.charAt(z) >= '0' && y.charAt(z) <= '9')
                  str = new String(str+y.charAt(z));
              b = document.frm1.trkd.value;
              if ((str.length < 7) && ((b == "E3001") || (b == "Y0001")))
              { alert("TUTAR 1,000,000 DAN KÜÇÜK OLAMAZ");
                sonuc = false;
                document.frm1.elements[i].focus();
              }
              else
              {
                document.frm1.elements[i].value = str;
              }
            }
            else
            {
              if (document.frm1.trkd.value != "VRTL2")
              {
                 alert("Tutar Alanına Sıfırdan Büyük Bir Değer Giriniz");
                 sonuc = false;
                 document.frm1.elements[i].value = 0;
                 document.frm1.elements[i].focus();
              }
              else
              {  sonuc = true;
                 y.value = 0;
              }

            }
          }
        }
      return sonuc;
   }

 function Virgul(x,y)
   {  var a,b;

   	 //if (event.keycode == 14) alert ("delete");
	//alert (event.keyCode);
   	 if (event.keyCode==8)
   	 	{
			x.value=x.value.substring(0,x.value.length - 1);
			Ayarla(x);
   	 	}

   	 if ((event.keyCode < 48) || (event.keyCode > 57 & event.keyCode < 96) || (event.keyCode > 105))
        	event.returnValue = false;
      else
        if (x.value.length >= y)
          event.returnValue = false;
        else
          if (x.value.length >= 3)
            { x.value = new String(x.value+"1");
              Ayarla(x);
              a = x.value;
              b = x.value.length - 1;
              x.value = x.value.substring(0,b);
             }

	 if (event.keyCode == 9) event.returnValue = true;

   }
//-->

