function gonder(deger,url) {
   if(deger != null){
   document.location = url + '=' + deger;
   }
}

function number_format(n) {
  var arr=new Array(''), i=0;
  var arr1 = n.split(",");
  var retval = '';
  var son = n.substring(n.length-1,n.length);

  if ( n == "0." ) return "0,";

  if (son > '9' || son < '0') {
     if (( son == ',' && arr1.length > 2) || (son !=','))  {
     //alert('Lütfen rakam giriniz');
     return n.substring(0,n.length-1);
     }
  }

  if ( n == 0 ) return n;
  if ( n.substring(0,2) == "0," ) return n;

  arr1=arr1.reverse();
  if (arr1.length > 1) {
     n = arr1[1];
  }
  n=n.split(".");
  n=n.join('');
  while (n>0)
    {arr[i]=''+n%1000; n=Math.floor(n/1000); i++;}
  arr=arr.reverse();
  for (var i in arr) if (i>0) //sıfırlar için
  while (arr[i].length<3) arr[i]='0'+arr[i];
  retval = arr.join(".");
  if (arr1.length > 1) retval=retval+","+arr1[0];
  return retval;
}

function setPointer(theRow, thePointerColor, theNormalBgColor){
  var theCells = null;

  if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
    return false;
  }
  if (typeof(document.getElementsByTagName) != 'undefined') {
    theCells = theRow.getElementsByTagName('td');
  }
  else if (typeof(theRow.cells) != 'undefined') {
    theCells = theRow.cells;
  }
  else {
    return false;
  }

  var rowCellsCnt  = theCells.length;
  var currentColor = null;
  var newColor     = null;
  // Opera does not return valid values with "getAttribute"
  if (typeof(window.opera) == 'undefined'
    && typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
    currentColor = theCells[0].getAttribute('bgcolor');
    newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                 ? theNormalBgColor
                 : thePointerColor;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].setAttribute('bgcolor', newColor, 0);
    } // end for
  } else {
    currentColor = theCells[0].style.backgroundColor;
    newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                 ? theNormalBgColor
                 : thePointerColor;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = newColor;
    }
  }
  return true;
}

function HepCek(oCheckbox,ilkharf){
  var el,i=0, bWhich = oCheckbox.checked, oForm = oCheckbox.form;
  while (el = oForm[i++]) if (el.type == 'checkbox' && el.name.charAt(0) == ilkharf) el.checked = bWhich;
}

function git(k) {
  parent.document.location=k;
  return true;
}
