
function pencereac(adres, genislik, yukseklik){
    var param = "scrollbars=1, width=" + genislik + "," +
                "height=" + yukseklik
		adres = ''+adres;
    window.open(adres, "_blank", param, false);
}

function sayfaac(val){
if (!val) return;
//alert(val);

$('html,body').animate({ scrollTop: $("#menuust").offset().top }, 222);

$.ajax({
   xhr:  (window.ActiveXObject) ? function() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} } : function() { return new window.XMLHttpRequest(); },
   beforeSend : function(msg){ $("body").append('<div id="ortu" style="opacity:0.4;filter:alpha(opacity=40);background:#E9E9E9;width:100%;height:130%;z-index:1000;position:absolute;top:0px;left:0px;">&nbsp</div>'); $("#ortaalandt").html('<center><div style="margin-top:22px;width:auto;height:100px;background: #EFEFEF url(css/img/BilgilerYukleniyor.gif) no-repeat center center;">&nbsp;</div></center>'); },
   type: "POST", url: "post.php", data: val, // dataType:"json", 
   success : function(msg){  $("#ortu").remove(); $("#ortaalandt").html(msg); }
});
 window.location.href="#"+val; return false;;
}

function girisyap(){
var giriskullaniciadi = $("#giriskullaniciadi").val();
var girissifre = $("#girissifre").val();
hata = '';
if (!giriskullaniciadi){hata += 'Kullanıcı adı yazmadınız...<br />';}
if (!girissifre){hata += 'Şifre adı yazmadınız...<br />';}

if (hata){ $(".hata").html(hata).show();  return false; }

$.ajax({
   type: "POST",
   xhr:  (window.ActiveXObject) ? function() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} } : function() { return new window.XMLHttpRequest(); },
   url: "post.php",
   beforeSend : function(msg){ $("body").append('<div id="ortu" style="opacity:0.4;filter:alpha(opacity=40);background:#E9E9E9;width:100%;height:130%;z-index:1000;position:absolute;top:0px;left:0px;">&nbsp</div>'); $("#ortaalandts").html('<center><div style="margin-top:22px;width:auto;height:100px;background: #EFEFEF url(css/img/BilgilerYukleniyor.gif) no-repeat center center;">&nbsp;</div></center>'); },
   data: "is=uyegirisyap&giriskullaniciadi="+giriskullaniciadi+"&girissifre="+girissifre,
   success: function(msg){ $("#ortu").remove(); //alert(msg);
if ($.trim(msg)=='hata'){ 
 $(".hata").html("Hatalı kullanıcı veya şifre!").show().css("font-size:9px;"); return false;
} else { window.location.href="?"; }
    }
});

}

function cikisyap(){ 
$.ajax({
   type: "POST",
   xhr:  (window.ActiveXObject) ? function() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} } : function() { return new window.XMLHttpRequest(); },
   url: "post.php",
   beforeSend : function(msg){ $("body").append('<div id="ortu" style="opacity:0.4;filter:alpha(opacity=40);background:#E9E9E9;width:100%;height:130%;z-index:1000;position:absolute;top:0px;left:0px;">&nbsp</div>'); $("#ortaalandts").html('<center><div style="margin-top:22px;width:auto;height:100px;background: #EFEFEF url(css/img/BilgilerYukleniyor.gif) no-repeat center center;">&nbsp;</div></center>'); },
   data: "is=cikisyap",
   success: function(msg){ $("#ortu").remove(); window.location.href="?"; }
});
}

function zdefterkaydet(){
var adsoyad = $("#zdefteradsoyad").val();
var mail = $("#zdefteradmail").val();
var mesaj = $("#zdeftermesaj").val();

hata = '';

if (!adsoyad){hata += 'Adınızı Yazmalısınız... <br />';}
if (!mail){hata += 'Mail Adresinizi Yazmalısınız... <br />';}
if (!mesaj){hata += 'Mesajınızı Yazmalısınız... <br />';}

if (hata){ $("#zdefteryorumyazhata").html(hata).show(); }
else {
$.ajax({
   type: "POST",
   xhr:  (window.ActiveXObject) ? function() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} } : function() { return new window.XMLHttpRequest(); },
   url: "post.php",
   beforeSend : function(msg){ $("body").append('<div id="ortu" style="opacity:0.4;filter:alpha(opacity=40);background:#E9E9E9;width:100%;height:130%;z-index:1000;position:absolute;top:0px;left:0px;">&nbsp</div>'); $("#ortaalandt").html('<center><div style="margin-top:22px;width:auto;height:100px;background: #EFEFEF url(css/img/BilgilerYukleniyor.gif) no-repeat center center;">&nbsp;</div></center>'); },
   data: "is=ziyaretcidefterikaydet&adsoyad="+adsoyad+"&mail="+mail+"&mesaj="+mesaj,
   success: function(msg){ $("#ortu").remove(); sayfaac('is=ziyaretcidefteri&zaman=time'); }
});

}

}
