// Javascript Fonksiyonlari
function nesneyarat() {                                                                               
    var nesne;                                                                                        
    var tarayici = navigator.appName;                                                                 
    if(tarayici == "Microsoft Internet Explorer"){                                                    
        nesne = new ActiveXObject("Microsoft.XMLHTTP");                                               
    }else{                                                                                            
        nesne = new XMLHttpRequest();                                                                 
		nesne.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=iso-8859-9")
    }                                                                                                 
    return nesne;                                                                                     
}                                                                                                     
                                                                                                      
var http = nesneyarat();
window.onload = nesneyarat;                                                                              

	function doldur(eleman,ddeger){  var deger; deger=document.getElementById(eleman).value;
		if (deger==ddeger){document.getElementById(eleman).value="";  }
		if (deger==""){document.getElementById(eleman).value=ddeger;  }}
	function goster(id){document.getElementById(id).style.display="block";}
	function gizle(id){document.getElementById(id).style.display="none";}
	function baglan(adres){location=adres;}
      function HariciLinkler() {
          if (!document.getElementsByTagName) return;
          var linkler = document.getElementsByTagName("a");
          var linklerAdet = linkler.length;
          for (var i=0; i<linklerAdet; i++) {
              var tekLink = linkler[i];
              if(tekLink.getAttribute("href") && tekLink.getAttribute("rel") == "yeniac") {
                  tekLink.target = "_blank";
              }
          }
      }
       window.onload = HariciLinkler;
// Jquery Fonksiyonları
	
	function kaydirsol(){
		$("#resimliste").animate({marginLeft: '0px'},1000);
		document.getElementById("sonraki").style.display="block";
		document.getElementById("onceki").style.display="none";
	}
	function kaydirsag(){
		$("#resimliste").animate({marginLeft: '-835px'},1000);
		document.getElementById("onceki").style.display="block";
		document.getElementById("sonraki").style.display="none";
	}
	/*function otokaydir(){
	 var kay=document.getElementById("onceki").style.display;
	 if(kay=="block"){kaydirsol();} else {kaydirsag();}
	 setTimeout("otokaydir()",24000)
	}*/
	function resimislemleri(){
			  	$(document).keyup(function(event){
			  		if(event.keyCode == 38){resmeodakla()}
			  		if(event.keyCode == 40){yorumaodakla()}
			  		if(event.keyCode == 13){yorumyaz()}
			  		if(event.keyCode == 37){oncekiresim()}
			  		if(event.keyCode == 39){sonrakiresim()}
			  	})
			  	}
	function fbs_click() {
		u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;
	}
	function tamekran(url){
		window.open(url ,"Yeni_Sayfa");
	}
	function resmeodakla(){document.location="#resim";}
	function yorumaodakla(){document.location="#yorumlar";}
	function yorumyaz(){document.location="#yorum"; document.getElementById('yorum').focus;}
	function oncekiresim(){ if(document.getElementById('oncekiresim')) document.location=document.getElementById('oncekiresim').href;} 
	function sonrakiresim(){ if(document.getElementById('sonrakiresim')) document.location=document.getElementById('sonrakiresim').href;}
	function resimslayt(s){
		$("#slyt").hide(); $("#say").show();$("#slaytdur").show();
		if(s>=1){y=s-1; document.getElementById('say').innerHTML=s; setTimeout('resimslayt(y)',1000);} else {slayt();}
	}
	function slayt(){if(document.getElementById('sonrakiresim')) document.location=document.getElementById('sonrakiresim').href+"slayt#resimbasi";else{ $("#say").hide(); $("#slayt").html("Slayt Bitti");}  }
	function git(adres){
		document.location=adres;
	}
