
function openPopUp(href, target){
    niwwin = window.open(href, target, 'width=500, height=400, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
    return false;
}

var checkflag = false;
function sec(field){
  if(field==null) return false;
  if(field.length==undefined){
     field.checked =(!checkflag)?true:false;
     checkflag=(!checkflag)?true:false;
     return false;
  }
  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ç";
  }
}

function onaylama(form, islem){
  var total = 0;
  var uyelik_onayi = islem;
  var max = form.onaykutusu.length;
  for (var idx = 0; idx < max; idx++){
    if (eval("document.formbilgi.onaykutusu[" + idx + "].checked") == true){
      total += 1;
    }
  }
  if (total == 0){
    alert("Hiç Üye Seçmediniz");
    return false;
  }
}

function islemler(mesaj)
{
  if(formbilgi.onaykutusu==null){
    alert("İşlem İçin Herhangi Bir Nesne Yok");
    return false;
  }
  var total = 0;
  var max   = 0;
  max       = formbilgi.onaykutusu.length;
  if(max==undefined){
     if(!formbilgi.onaykutusu.checked){
     alert("Hiç Seçim Yapmadınız");
     return false;
     }
  return confirm("Seçilen 1 " + mesaj);
  }
  for (var i = 0; i < max; i++)
  {
    if (eval("document.formbilgi.onaykutusu[" + i + "].checked") == true)
    {
      total += 1;
    }
  }
  if (total == 0)
  {
    alert("Hiç Seçim Yapmadınız");
    return false;
  } else {
    return confirm("Seçilen " + total + " " + mesaj);
  }
}

function isNumberic(v)
{
  var isNum = /^[0-9]*$/;
  if (!isNum.test(v.value))
  {
    alert('Lütfen 0-9 Arasında Rakam Kullanınız');
    v.value = v.value.replace(/[^0-9]/g,"");
  }
}

function yuklemece(){
    if(yukle.resim.value!=="" && yukle.res_url.value!=="") {
        alert("Resim Alanlarından Sadece Bir Tanesi Kullanılmalı! \n Resim Dosya Alanı veya Resim URL alanı");
	  yukle.resim.value   = "";
	  yukle.res_url.value = "";
        return false;
    }
    if(yukle.video.value!=="" && yukle.vid_url.value!=="") {
       alert("Video Alanlarından Sadece Bir Tanesi Kullanılmalı! \n FLV Dosya Alanı veya FLV URL alanı");
	 yukle.vid_url.value = "";
	 yukle.video.value   = "";
       return false;
    }
yukle.submit;
}

function openFlash(source) {
        newWindow = window.open("","newWindow","width=500,height=400,top=0,left=0");
        newWindow.document.open();
        newWindow.document.write(source);
        newWindow.document.close();
        newWindow.focus();
return false;
}