function openPopup(url,w,h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no'
	win = window.open(url, 'report', winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function CellColor(Row,bgColor,fgColor) {
	var Cells,CellCount,i;
	
	if(typeof(document.getElementsByTagName) != "undefined") {
		Cells = Row.getElementsByTagName("td");
	} else if(typeof(Row.cells) != "undefined") {
		Cells = Row.cells;
	} else {
		return false;
	}
	
	for(i = 0;i < Cells.length;i++) {
		Cells[i].style.backgroundColor = bgColor;
		Cells[i].style.color = fgColor;
	}
	
	return true;
}

var checkflag = "false";
function sec(field) 
{
  if (checkflag == "false") 
  {
    for (i = 0; i < field.length; i++) 
    {
      field[i].checked = true;
    }
    checkflag = "true";
    return "Seçimi Kaldır"; 
  } else {
    for (i = 0; i < field.length; i++) 
    {
      field[i].checked = false; 
    }
    checkflag = "false";
    return "Tümünü Seç"; 
  }
}