

function AddToList(Uye)
  {  

if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
//	  alert (xmlHttp.responseText)
      if(xmlHttp.readyState==4)
        {
if (xmlHttp.responseText=='OK')
{
      document.all.Eklendi.innerHTML='<font color="red">Listeye eklendi!</font>'
	  }
	  
        }
      }
	
    xmlHttp.open("GET","add_to_list.asp?Uye=" + Uye,true);
    xmlHttp.send(null);  
	

}


function ApplyEmail(Domain)
{
if (document.all.AlanEmail.value=='') {alert ('Lütfen almak istediğniz e-mail adresini giriniz.');document.all.AlanEmail.focus();return false}
if (document.all.AlanEmailSifre.value=='') {alert ('Lütfen şifreyi giriniz.');document.all.AlanEmailSifre.focus();return false}
if (document.all.AlanEmailSifreTekrar.value=='') {alert ('Lütfen şifreyi tekrar giriniz.');document.all.AlanEmailSifreTekrar.focus();return false}
if (document.all.AlanEmailSifreTekrar.value!=document.all.AlanEmailSifre.value) {alert ('Girdiğiniz iki şifre aynı değil.');document.all.AlanEmailSifreTekrar.focus();return false}


if (!confirm(document.all.AlanEmail.value + '@' +Domain + '\rBu e-mail adresi için başvuruda bulunmak istediğinizden emin misiniz?'))
{
return false
}

}

function ChangePwd()
{
if (document.all.Eski.value=='') {alert ('Lütfen eski şifrenizi giriniz.');document.all.Eski.focus();return false}
if (document.all.Yeni.value=='') {alert ('Lütfen yeni şifrenizi giriniz.');document.all.Yeni.focus();return false}
if (document.all.Tekrar.value=='') {alert ('Lütfen yeni şifrenizi tekrar giriniz.');document.all.Tekrar.focus();return false}
if (document.all.Tekrar.value!=document.all.Yeni.value) {alert ('Girdiğiniz iki şifre aynı değil.');document.all.Tekrar.focus();return false}
document.all.btnSubmit.disabled=true
}


function MemberSearch(Key,Alan)
  {  

if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
        {
		//alert ('alp')
      document.all.RespCaption.innerHTML=xmlHttp.responseText
	  
        }
      }
	
    xmlHttp.open("GET","member_search.asp?Key=" + Key + '&Alan=' + Alan,true);
    xmlHttp.send(null);  
	

}


function FotoSil(ID)
{
if (confirm('Bu fotoğrafı silmek istediğinizden emin misiniz?'))
{
window.location.href='foto_sil.asp?ID=' + ID 
}

}

function CheckNick(Nick,Domain)
  {  

if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
        {
//		alert (xmlHttp.responseText)
		if (xmlHttp.responseText=='Fail')
		{
		alert ('Bu üye adı daha önce alınmıştır.')
document.forms['Register'].UyeAdi.select()
		}
	  
        }
      }
	  if (Nick!='')
	  {
	    xmlHttp.open("GET","check_nick.asp?Nick=" + Nick + '&Domain=' + Domain,true);
    xmlHttp.send(null);  
	}
}


function CheckEmail(Email,Domain)
  {  

if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
        {
//		alert (xmlHttp.responseText)
		if (xmlHttp.responseText=='Fail')
		{
		alert ('Bu email adresine sahip sistemde başka üye vardır.')
		document.forms['Register'].Email.select()
		}
	  
        }
      }
	    xmlHttp.open("GET","check_email.asp?Email=" + Email + '&Domain=' + Domain,true);
    xmlHttp.send(null);  
}


function RegisterMember()
{
if (document.forms['Register'].AdSoyad.value=='') {alert ('Lütfen adınızı ve soyadınızı giriniz.');document.forms['Register'].AdSoyad.focus();return false}
if (document.forms['Register'].UyeAdi.value=='') {alert ('Lütfen üye adınızı giriniz.');document.forms['Register'].UyeAdi.focus();return false}
if (document.forms['Register'].Sifre.value=='') {alert ('Lütfen şifrenizi giriniz.');document.forms['Register'].Sifre.focus();return false}
if (document.forms['Register'].SifreOnay.value=='') {alert ('Lütfen şifrenizi tekrar giriniz.');document.forms['Register'].SifreOnay.focus();return false}
if (document.forms['Register'].Sifre.value!=document.forms['Register'].SifreOnay.value) {alert ('İki şifre aynı değildir. Lütfen kontrol ediniz.');document.forms['Register'].SifreOnay.focus();return false}
if (document.forms['Register'].Email.value=='') {alert ('Lütfen e-mail adresinizi giriniz.');document.forms['Register'].Email.focus();return false}
if (document.forms['Register'].Email.value.indexOf("@")=='-1' || document.forms['Register'].Email.value.indexOf(".")=='-1') {alert ('Email adresinizde hata var. Lütfen kontrol ediniz.');document.forms['Register'].Email.focus();return false}
if (document.forms['Register'].Kurulus.value=='') {alert ('Lütfen kuruluşunuzu giriniz.');document.forms['Register'].Kurulus.focus();return false}
if (document.forms['Register'].Gorev.value=='') {alert ('Lütfen görevinizi giriniz.');document.forms['Register'].Gorev.focus();return false}
document.forms['Register'].btnRegister.disabled=true
}


function AnketCevapGonder(Anket,AnketCevap)
  {  

if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
        {
		
		if (xmlHttp.responseText=='OK')
		{
		alert ('Cevabınız gönderilmiştir. Teşekkür ederiz.')
		}
	  
        }
      }
	
	if (document.all.Cevap.value!='')
	{
    xmlHttp.open("GET","anket_cevap.asp?Anket=" + Anket + '&Cevap=' + AnketCevap,true);
    xmlHttp.send(null);  
	}
	else
	{
	alert ('Lütfen, bir şık işaretleyiniz.')
	}

}


function LoadGallery()
{
document.all.GalleryHolder.style.display='block'
document.all.Loading.style.display='none'
}

function ShowFeedBackWin()
{
document.all.VisitorFeedback.style.top=document.body.scrollTop + (screen.availHeight*0.2)
document.all.VisitorFeedback.style.left=screen.width*0.25
document.all.VisitorFeedback.style.display='block'
document.all.VisitorName.focus()
document.all.VisitorName.value=''
document.all.VisitorSurname.value=''
document.all.VisitorEmail.value=''
document.all.FeedbackTitle.value=''
document.all.FeedbackText.value=''
}




function Search(Key,Alan)
  {  

if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
        {
		//alert ('alp')
      document.all.RespCaption.innerHTML=xmlHttp.responseText
	  
        }
      }
	 if (Key!='')
	 {
    xmlHttp.open("GET","search.asp?Key=" + Key + '&Alan=' + Alan,true);
    xmlHttp.send(null);  
	}
	else
	{
	document.all.RespCaption.innerHTML=''
	}

}



