var BekletD,BekletI;
function BilGoster(e){fiId('BilResim').src='images/bildirge/'+e+'oboy.gif';}
function BilGizle(){fiId('BilResim').src='images/img_bildirge.jpg';}

function VidGoster(e){fiId('VideoResim').src='images/video/'+e+'oboy.gif';}
function VidGizle(){fiId('VideoResim').src='images/img_video.jpg';}

function Gizle(e) { $('table#'+e).fadeOut('normal');}
function Goster(e) {$('table#'+e).fadeIn('normal'); }
function Seffaf(e, k) { $('table#'+e).fadeTo('normal', k); }


function fiId(e){ return document.getElementById(e); }
function IdBul(e){ return document.getElementById(e); }
function fiZamanla(e , i){ window.setTimeout(e , i); }
var FntSz=12;

function BuyutKucult(e){
   if(e)FntSz = (FntSz-2);   else FntSz = FntSz+2;
   if(FntSz>=20)FntSz = 20;
   if(FntSz<=8)FntSz = 8;
   PopDivObj=document.getElementById('IcerikDiv');
   PopDivObj.className = 'f'+ FntSz;
}

function DivAcKapa(ID){ //Status
   if(document.getElementById(ID).style.display=='' || document.getElementById(ID).style.display=='block' ){
      document.getElementById(ID).style.display='none'
   }else{
      document.getElementById(ID).style.display='block'
   }
}

function UyariAc(){
   PopDivObj=document.getElementById('UyariDiv');
   PopDivObj.style.position = 'absolute';
   PopDivObj.style.width="70%";
   PopDivObj.style.top=30 +"%";
   PopDivObj.style.left=15+"%";
   BekletD = window.setTimeout("PopDivObj.style.display='block'",1000) ;
   //window.status = getDivSize(PopDivObj);
   window.scrollTo(0,0);
}
function PP(Ed , B , Val, w, h){
//   alert(Val)
   if(fiId('popTamam')){
      fiId('popTamam').disabled=false;
      fiZamanla("fiId('popIKpt').focus();",190);
      fiZamanla("fiId('popTamam').focus();",200);
   }
   var windowX = (screen.width/2);
   var windowY = (screen.height/4);
   PopDivObj = fiId( "popTable");

   PopDivObj.style.position = 'absolute';
   PopDivObj.style.width= windowX +"px";// (w ? w : (windowX+"px")) ;
   //PopDivObj.style.height= (h ? h : "") ;
   //var top = getTop(Ed);
   //(getTop(fiId(Ed)))+ fiId(Ed).offsetHeight
   PopDivObj.style.top=  windowY + "px"
   PopDivObj.style.left=25+"%";
   Goster('popTable');
   //BekletD = window.setTimeout("PopDivObj.style.display='block'",100) ;
   if(B){ fiId( "popBaslik").innerHTML =B;}
   if(Val){ fiId( "popGovde").innerHTML =Val;}

   //window.status = document.body.offsetWidth + "-" +document.body.offsetHeight + " - " + windowX + "x" + windowY + "-->" + dd.offsetTop;
   //window.scrollTo(0,0);
}

getLeft=function(element){
   return element.getBoundingClientRect().left;
};
getTop=function(element){
   return element.getBoundingClientRect().top;
};

function PPKpt(Ed){
   PopDivObj = fiId( Ed ? Ed : "popTable");
   Gizle('popTable');
   //BekletD = window.setTimeout("PopDivObj.style.display='none';",100) ;
}
function ABekle(s , v){
   PP('UyariDiv', (s==1?':: Arama Yapılıyor ':' :: Uyarı') , '<img src="images/w.gif" border="0">  Lütfen Bekleyin'+ (s==1?' Arama İşleminiz Tamamlanıyor':'') +(v?" <b>("+v+" )</b>":"") +'...');
   //document.getElementById('GnlAraDiv').innerHTML='<br><br><center><img src="images/w.gif" border="0"> Lütfen Bekleyin ...</center><br>';
}
function EventOgren(e) {
   if(e){ tus = e;} else{ tus = tus || event; }
    if(window.event){ return window.event.keyCode; }else if(tus.which){   return tus.which;}
}
function dinle(Key, ed) {
    var K;
    K = EventOgren(Key);
    if((K==13) ){
      document.getElementById(ed).onclick();
    }
}
function sfac(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function bekleK(){
   if(BekletD)clearTimeout(BekletD);
   if(BekletI)clearTimeout(BekletI);
   if(document.getElementById('DisDiv'))document.getElementById('DisDiv').style.display='none';
   if(document.getElementById('IcDiv'))document.getElementById('IcDiv').style.display='none';
}
function bekle(){
   var Kalan =(screen.width-600)/2
   var Leftt = ((Kalan*100)/screen.width);
   PopDivObj = fiId( "IcDiv");
   PopDivObj.style.position = 'absolute';
   PopDivObj.style.width="600px";// (w ? w : (windowX+"px")) ;
   //PopDivObj.style.height='400px' ;
   PopDivObj.style.top="20%"
   PopDivObj.style.left=(Leftt-5)+"%";
   document.getElementById('DisDiv').style.width='100%';
   document.getElementById('DisDiv').style.height=screen.height+'px';
   BekletD = window.setTimeout("document.getElementById('DisDiv').style.display='block'",1000) ;
   BekletI = window.setTimeout("document.getElementById('IcDiv').style.display='block'",2000) ;
   window.scrollTo(0,0);
}

  function getFile(filename) {
    oxmlhttp = null;
    try {
      oxmlhttp = new XMLHttpRequest();
      oxmlhttp.overrideMimeType("text/xml");
    }
    catch(e) {
      try { oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
      catch(e) { return null; }
    }
    if(!oxmlhttp) return null;
    try {
      oxmlhttp.open("GET",filename,false);
      oxmlhttp.send(null);
    }
    catch(e) { return null; }
    return oxmlhttp.responseText;
  }
  
  var nwSayfa=Array();
function Pac(DosyaAdi, SayfaAdi, BoyutW, BoyutH , V) {
   //alert('1 '+self.name);
   if(!V)V=0; 
   var windowX = (screen.width/2)-(BoyutW/2);
   var windowY = (screen.height/2)-(BoyutH/2);
   	
	Komut = "alwaysRaised=yes,copyhistory=0,directories=0,location=0,menubar=0,scrollbars="+V+",status=1,toolbar=0,width="+BoyutW+",height="+BoyutH+",top="+windowY+",left="+windowX+",resizable=0,";
   try{
	  if(nwSayfa[SayfaAdi].closed==false) {
         nwSayfa[SayfaAdi].focus();
      } else {
         nwSayfa[SayfaAdi]=window.open(DosyaAdi,SayfaAdi, Komut);
      };
   }catch(error){
      nwSayfa[SayfaAdi]=window.open(DosyaAdi,SayfaAdi, Komut);
   };
  	return false;
}

/* Hata göstermeyi engelleme
function stoperror(){
return true
}
window.onerror=stoperror
*/

// form tags to omit in NS6+:


