	function Installation(F,K)
  {  
  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
      {

document.all.InsInfo.innerHTML=xmlHttp.responseText

 }
			  }

			  document.getElementById('InsPrice').value=F

if 	(document.getElementById('InsTab').value==1)
{
document.getElementById('RowInfo').style.display='none'
document.getElementById('RowInstallation').style.display='block'
}

xmlHttp.open("GET",'http://' + document.domain + '/taksit.asp?F=' + F + '&K=' + K,true);
    xmlHttp.send(null);  
	}
	
	
function SozlesmeKontrol()
{
if (document.getElementById('SozlesmeOnay').checked==false) {ShowAlert('Siparişinizi tamamlamak için satış sözleşmesi onaylayınız.');document.getElementById('SozlesmeOnay').focus();return false}
}

	function FindBank(BINValue)
  {  
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!='')
		{ 
	document.getElementById('BankaPOS').value=xmlHttp.responseText 
	}
	else
	{
		document.getElementById('BankaPOS').value=34
	}

		
        }
      }

    xmlHttp.open("GET","selected_bank.asp?BIN=" + BINValue ,true);
    xmlHttp.send(null);  

	}
	
	
function CCInfo()
{
if (document.getElementById('SozlesmeOnay').checked==false) {ShowAlert('Siparişinizi tamamlamak için satış sözleşmesi onaylayınız.');document.getElementById('SozlesmeOnay').focus();return false}
if (document.forms["CCForm"].KKIsim.value=='') {document.forms["CCForm"].KKIsim.focus();ShowAlert('Lütfen kredi kartınızın üzerindeki ismi giriniz.');return false}
if (document.forms["CCForm"].CCNo.value=='') {document.forms["CCForm"].CCNo.focus();ShowAlert('Lütfen kredi kartınızın numarasını giriniz.');return false}
if (document.forms["CCForm"].CCNo.value.length!=16) {document.forms["CCForm"].CCNo.focus();ShowAlert('Kredi kartınızın numarasında hata var. Lütfen kontrol ediniz.');return false}
if (document.forms["CCForm"].expdate[0].value=='' || document.forms["CCForm"].expdate[1].value=='') {ShowAlert('Lütfen kredi kartınızın son kullanma tarihini giriniz.');return false}
if (document.forms["CCForm"].cvc.value=='') {document.forms["CCForm"].cvc.focus();ShowAlert('Lütfen kredi kartınızın güvenlik numarasını giriniz.');return false}
if (document.forms["CCForm"].cvc.value.length<3) {document.forms["CCForm"].cvc.focus();ShowAlert('Kredi kartınızın güvenlik kodunda hata var. Lütfen kontrol ediniz.');return false}

document.getElementById('Wait').innerHTML='İşleminiz yapılıyor. Lütfen bekleyiniz.<br>'
}



function BIN(BINValue)
  {  
  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
      {

	document.getElementById('BankInfo').innerHTML=xmlHttp.responseText
	FindBank(BINValue)
 }
			  }

if (BINValue.length>=6)
{
xmlHttp.open("GET",'bin_ajx.asp?BIN=' + BINValue ,true);
    xmlHttp.send(null);  
	}
	else
	{
		document.getElementById('BankInfo').innerHTML=''
	}
	}

	
	function OrderActs(ID,Row)
  {  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	      {
      if(xmlHttp.readyState==4)
        {

	document.getElementById('Row' + Row).innerHTML=xmlHttp.responseText 

		
        }
      }
    xmlHttp.open("GET","http://" + document.domain + "/order_acts.asp?ID=" + ID ,true);
    xmlHttp.send(null);  

	}
	
	
	
function Kopyala(Alan)

{
document.getElementById('Kod' + Alan).select()
//Code.innerText =document.getElementById('Kod' + Alan).value
Copied = document.getElementById('Kod' + Alan).createTextRange();
Copied.execCommand("Copy");

}



function SavePartnerInfo()
{
if (document.forms["Register"].Ad.value=='') {alert ('Lütfen, adınızı giriniz.');document.forms["Register"].Ad.focus();return false}

if (document.forms["Register"].Email)
{
if (document.forms["Register"].Email.value=='') {document.forms["Register"].Email.focus();ShowAlert('Lütfen E-mail adresinizi giriniz.');return false}
if (document.forms["Register"].Email.value.indexOf("@")==-1 || document.forms["Register"].Email.value.indexOf(".")==-1) {document.forms["Register"].Email.focus();ShowAlert('E-mail adresinizde hata var. Lütfen kontrol ediniz.');return false}
if (document.forms["Register"].Sifre.value=='') {document.forms["Register"].Sifre.focus();ShowAlert('Lütfen şifrenizi giriniz.');return false}
if (document.forms["Register"].SifreTekrar.value=='') {document.forms["Register"].SifreTekrar.focus();ShowAlert('Lütfen şifrenizi tekrar giriniz.');return false}
if (document.forms["Register"].SifreTekrar.value!=document.forms["Register"].Sifre.value) {document.forms["Register"].SifreTekrar.focus();ShowAlert('Girmiş olduğunuz iki şifre aynı değil. Lütfen kontrol ediniz.');return false}
}

if (document.forms["Register"].Adres.value=='') {alert ('Lütfen, adresınızı giriniz.');document.forms["Register"].Adres.focus();return false}
if (document.forms["Register"].Sehir.value=='') {alert ('Lütfen, şehrinizi seçiniz.');document.forms["Register"].Sehir.focus();return false}
if (document.forms["Register"].Ilce.value=='') {alert ('Lütfen, ilçenizi seçiniz.');document.forms["Register"].Ilce.focus();return false}
if (document.forms["Register"].TCKimlik.value=='') {alert ('Lütfen, kimlik numaranızı giriniz.');document.forms["Register"].TCKimlik.focus();return false}
if (document.forms["Register"].Site.value=='') {alert ('Lütfen, sitenizin adresini giriniz.');document.forms["Register"].Site.focus();return false}
if (document.forms["Register"].Kategori.value=='') {alert ('Lütfen, sitenizin kategorisini seçiniz.');document.forms["Register"].Kategori.focus();return false}
if (document.forms["Register"].Tanitim.value=='') {alert ('Lütfen, sitenizin tanıtımını giriniz.');document.forms["Register"].Tanitim.focus();return false}
if (document.forms["Register"].Sozlesme.checked==false) {alert ('Lütfen, satış ortaklığı sözleşmesini kabul ettiğinizi işaretleyiniz.');return false}
}

function Enter()
{

if (window.event.keyCode == 13)
{
AddSite()
}
}

	function DelSite(ID,Site)
  {  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	      {
      if(xmlHttp.readyState==4)
        {


SiteList()
		
        }
      }

	  if (confirm (Site + ' sitesini bu listeden kaldırmak istediğinizden emin misiniz?'))
	  {
    xmlHttp.open("GET","http://" + document.domain + "/del_site.asp?ID=" + ID ,true);
    xmlHttp.send(null);  
}
	}
	
	
			
function AddSite(Site)
  {  


if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp3=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp3=new XMLHttpRequest();}
xmlHttp3.onreadystatechange=function()
	
      {
	//  alert (xmlHttp3.responseText)
      if(xmlHttp3.readyState==4)
      {
	  document.getElementById('Site').value=''
  	  document.getElementById('Kategori').value=''
  	  document.getElementById('Tanitim').value=''
SiteList()

 }
			  }

			  if (document.getElementById('Site').value=='' || document.getElementById('Kategori').value=='' || document.getElementById('Tanitim').value=='')
			  {
			  alert ('Lütfen, tüm alanları giriniz')
			  return false;
			  }
			  
xmlHttp3.open("GET",'http://' + document.domain + '/add_site.asp?Site=' + document.getElementById('Site').value + '&Kategori=' + document.getElementById('Kategori').value + '&Tanitim=' + document.getElementById('Tanitim').value,true);
    xmlHttp3.send(null);  
	}
	
	
	
function SiteList()
  {  


if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp3=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp3=new XMLHttpRequest();}
xmlHttp3.onreadystatechange=function()
	
      {
      if(xmlHttp3.readyState==4)
      {
	document.getElementById('Container').innerHTML=xmlHttp3.responseText 
 	  document.getElementById('Site').focus()
 }
			  }

xmlHttp3.open("GET",'http://' + document.domain + '/site_list.asp',true);
    xmlHttp3.send(null);  
	}
	
	
	
	
function KKNo(Uzunluk,Ind)
{
if (Ind!=4)
{
if (Uzunluk==4) 
{
document.all.CCNo[Ind].focus()
}
}
}

	function RemindPwd()
  {  
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=='Fail')
 {
 ShowAlert ('Sistemde bu email adresine sahip bir üye bulunamadı. Şifreniz gönderilemedi.')

 }
 else
 {
 ShowAlert ('Şifreniz e-mail adresinize gönderilmiştir.')
 document.getElementById('btnRemind').disabled=true
 }

        }
      }

    xmlHttp.open("GET","http://" + document.domain + "/remind_pwd.asp?Email=" + document.getElementById('SifreEmail').value ,true);
    xmlHttp.send(null);  

	}
	
	
	
	
function Survey(ID,Cevap)
  {  

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=='OK')
{
document.getElementById("SurveyStat").innerHTML='<font color="red">Cevabınız gönderildi!</font>'
}
else
{
ShowAlert ('Bu ankete daha önce cevap vermişsiniz.')
}


        }
      }

if (document.getElementById('AnketCevap').value!='')
{
    xmlHttp.open("GET","http://" + document.domain + "/survey.asp?ID=" +ID + '&Cevap=' +Cevap,true);
    xmlHttp.send(null);  
	}
	else
	{
	ShowAlert ('Lütfen bir seçenek seçiniz.')
	}


}


function CloseAlertWin()
{
if (document.getElementById('FocusObject').value!='')
{
document.getElementById(document.getElementById('FocusObject').value).focus();
}
document.all.AlertWin.style.display='none';
LockScreen(0)
}


function RemoveFav(ID)
  {  
  
if (confirm ('Bu aktiviteyi favorilerinizden çıkarmak istediğinizden emin misiniz?'))
{
window.location.href='remove_fav.asp?ID=' + ID
}
	}

	
	
	function AddToFav(ID)
  {  
  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
      {
	document.getElementById('FavHolder').innerHTML='Favorilerinize Eklendi!'
	FavCount()

 }
			  }
xmlHttp.open("GET",'http://' + document.domain + '/add_to_fav.asp?ID=' + ID,true);
    xmlHttp.send(null);  
	}
	
	
	
	
function FavCount()
  {  


if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp1=new XMLHttpRequest();}
xmlHttp1.onreadystatechange=function()
	
      {
      if(xmlHttp1.readyState==4)
      {
	document.getElementById('FavoritesDisplay').innerHTML=xmlHttp1.responseText 

 }
			  }

xmlHttp1.open("GET",'http://' + document.domain + '/fav_count.asp',true);
    xmlHttp1.send(null);  
	}
	
	
	
function CartCount()
  {  

if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp2=new XMLHttpRequest();}
xmlHttp2.onreadystatechange=function()
	
      {
      if(xmlHttp2.readyState==4)
      {

	document.getElementById('CartCountDisplay').innerHTML=xmlHttp2.responseText

 }
			  }
			
xmlHttp2.open("GET",'http://' + document.domain + '/cart_count.asp',true);
    xmlHttp2.send(null);  
	}
	
	
	
	
function ChangePwd()
  {  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	      {
      if(xmlHttp.readyState==4)
        {


				ShowAlert (xmlHttp.responseText)

        }
      }
	  
	  if (document.getElementById('Yeni').value!=document.getElementById('Tekrar').value)
	  {
	  ShowAlert ('Girmiş olduğunuz iki şifre aynı değil. Lütfen kontrol ediniz.')
	  return false;
	  }
	  
    xmlHttp.open("GET","http://" + document.domain + "/change_pwd.asp?Eski=" + document.getElementById('Eski').value + '&Yeni='  +  document.getElementById('Yeni').value ,true);
    xmlHttp.send(null);  
	}
	
function PwdArea()
{
//this.style.display='none';
document.getElementById('Vis').style.display='none';
document.getElementById('NonVis').style.display='block';
document.getElementById('Sifre').focus()
}

function DetailedSearch()
  {  
  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
      {
	document.getElementById('ActList').innerHTML=xmlHttp.responseText

 }
			  }

	document.getElementById('ActList').innerHTML='<center><img src=http://' + document.domain + '/Imaj/loading1.gif></center>'
xmlHttp.open("GET",'http://' + document.domain + '/detailed_search.asp?Yas='  + document.getElementById('Yas').value + '&AktiviteTipi=' +  document.getElementById('AktiviteTipi').value + '&Cinsiyet=' +  document.getElementById('Cinsiyet').value + '&OzelGun=' +  document.getElementById('OzelGun').value + '&Fiyat=' + document.getElementById('Fiyat').value,true);
    xmlHttp.send(null);  
	}
	
	
	
	
	
function ShowActs(ID,Start,View,Key)
  {  
  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
      {
	document.getElementById('Container').innerHTML=xmlHttp.responseText
//window.scrollBy(0,window.screen.availHeight); 



//scroll(0,0)






 }
			  }

			  ShowInfoContainer()
	document.getElementById('Container').innerHTML='<center><img src=http://' + document.domain + '/Imaj/loading1.gif></center>'
xmlHttp.open("GET",'http://' + document.domain + '/Includes/prod_list.asp?ID='  + ID + '&Start=' + Start + '&View=' + View + '&Key=' + Key,true);
    xmlHttp.send(null);  
	}
	
	
	
	
function SertifikaTeslimatBilgi(Stat)
{
if (Stat==0) 
{
//document.getElementById('FaturaAdresAyni').disabled=true
document.getElementById('AliciAd').value=document.getElementById('HediyeAlinanAd').value
document.getElementById('AliciTelefon').value=document.getElementById('HediyeAlinanTelefon').value
document.getElementById('AliciEmail').value=document.getElementById('HediyeAlinanEmail').value
document.getElementById('AliciAdres').value=document.getElementById('HediyeAlinanAdres').value
document.getElementById('AliciSehir').value=document.getElementById('HediyeAlinanSehir').value
document.getElementById('AliciIlce').value=document.getElementById('HediyeAlinanIlce').value
}

if (Stat==1) 
{
//document.getElementById('FaturaAdresAyni').disabled=false;
UserInfo('Alici')
}

}

function ShowCertToInfo(Stat)
{
//if (Stat==true){document.getElementById('CertToInfo').style.display='block'}else{document.getElementById('CertToInfo').style.display='none'}
if (document.all.Kendine[0].checked==true && document.all.SertifikaTipi[0].checked==false)
{
document.getElementById('CertToInfo').style.display='block'
}
else
{
document.getElementById('CertToInfo').style.display='none'
}
}

function ShowPopup(Page,W,H)
{
if (H!=undefined){document.all.Popup.style.height=H}
if (W!=undefined){document.all.Popup.style.width=W}

document.all.Popup.src="http://" + document.domain + '/'  + Page
document.all.Popup.style.top=document.body.scrollTop + (screen.availHeight/7)
document.all.Popup.style.display='block'
LockScreen(1)
}


function ShowPage()
  {  
  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
      {
	document.getElementById('Page').innerHTML=xmlHttp.responseText

 }
			  }


xmlHttp.open("GET",'default.asp',true);
    xmlHttp.send(null);  
	}


function ClearFields()
{
document.getElementById("AliciAd").value=''
document.getElementById("AliciTelefon").value=''
document.getElementById("AliciEmail").value=''
document.getElementById("AliciAdres").value=''
document.getElementById("AliciSehir").value=''
document.getElementById('AliciIlce').value=''
}


function UserInfo(Field)
  {  
  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
      {
BilgiBol=xmlHttp.responseText.split(",")
document.getElementById(Field + "Ad").value=BilgiBol[0]
if (document.getElementById(Field + "Telefon"))
{
document.getElementById(Field + "Telefon").value=BilgiBol[1]
document.getElementById(Field + "Email").value=BilgiBol[2]
}
document.getElementById(Field + "Adres").value=BilgiBol[3]
document.getElementById(Field + "Sehir").value=BilgiBol[4]
document.getElementById(Field + "Sehir").focus()



if (Field=='HediyeAlinan')
{
setTimeout ("document.getElementById('HediyeAlinanIlce').value=BilgiBol[5]",100)
}

if (Field=='Alici')
{
setTimeout ("document.getElementById('AliciIlce').value=BilgiBol[5]",100)
}



 }
			  }


xmlHttp.open("GET",'http://' + document.domain + '/'  + 'user_info.asp',true);
    xmlHttp.send(null);  
	}
	


function HediyeBilgi()
{
if (document.all.HediyeAlinanAd.value=='') {ShowErr(0,'Lütfen adı giriniz.','HediyeAlinanAd');return false;}
if (document.all.HediyeAlinanTelefon.value=='') {ShowErr(1,'Lütfen telefonu giriniz.','HediyeAlinanTelefon');return false;}
if (document.all.HediyeAlinanEmail.value=='') {ShowErr(2,'Lütfen email adresini giriniz.','HediyeAlinanEmail');return false;}
if (document.all.HediyeAlinanEmail.value.indexOf("@")==-1 || document.all.HediyeAlinanEmail.value.indexOf(".")==-1) {ShowErr(2,'E-mail adresinde hata var. Lütfen kontrol ediniz.','HediyeAlinanEmail');return false;}

if (document.all.Kendine[1].checked==true)
{
if (document.all.HediyeAlinanAdres.value=='') {ShowErr(3,'Lütfen adresi giriniz.','HediyeAlinanAdres');return false;}
if (document.all.HediyeAlinanSehir.value=='') {ShowErr(4,'Lütfen şehir seçiniz.','HediyeAlinanSehir');return false;}
if (document.all.HediyeAlinanIlce.value=='') {ShowErr(5,'Lütfen ilçeyi seçiniz.','HediyeAlinanIlce');return false;}


}

if (document.all.SertifikaTipi[0].checked==false)
{

if (document.all.HediyeAlinanAdres.value=='') {ShowErr(3,'Lütfen adresi giriniz.','HediyeAlinanAdres');return false;}
if (document.all.HediyeAlinanSehir.value=='') {ShowErr(4,'Lütfen şehir seçiniz.','HediyeAlinanSehir');return false;}
if (document.all.HediyeAlinanIlce.value=='') {ShowErr(5,'Lütfen ilçeyi seçiniz.','HediyeAlinanIlce');return false;}


if (document.all.Kendine[0].checked==true)
{
if (document.all.AliciAd.value=='') {ShowErr(6,'Lütfen adı giriniz.','AliciAd');return false;}
if (document.all.AliciTelefon.value=='') {ShowErr(7,'Lütfen telefonu giriniz.','AliciTelefon');return false;}
if (document.all.AliciEmail.value=='') {ShowErr(8,'Lütfen email adresini giriniz.','AliciEmail');return false;}
if (document.all.AliciEmail.value.indexOf("@")==-1 || document.all.AliciEmail.value.indexOf(".")==-1) {ShowErr(8,'E-mail adresinde hata var. Lütfen kontrol ediniz.','AliciEmail');return false;}
if (document.all.AliciAdres.value=='') {ShowErr(9,'Lütfen adresi giriniz.','AliciAdres');return false;}
if (document.all.AliciSehir.value=='') {ShowErr(10,'Lütfen şehir seçiniz.','AliciSehir');return false;}
if (document.all.AliciIlce.value=='') {ShowErr(11,'Lütfen ilçeyi seçiniz.','AliciIlce');return false;}

}

}


//Fatura Bilgileri
if (document.all.FaturaTipi[0].checked==false && document.all.FaturaTipi[1].checked==false) {ShowErr(12,'Lütfen fatura tipi seçiniz.');return false;}

if (document.all.FaturaTipi[0].checked==true)
{
if (document.all.FaturaAd.value=='') {ShowErr(13,'Lütfen faturanın kime gönderileceğini giriniz.','FaturaAd');return false;}
}
else
{
if (document.all.Unvan.value=='') {ShowErr(14,'Lütfen ünvanı giriniz.','Unvan');return false;}
}

if (document.all.FaturaAdres.value=='') {ShowErr(15,'Lütfen adresi giriniz.','FaturaAdres');return false;}
if (document.all.FaturaSehir.value=='') {ShowErr(16,'Lütfen şehri seçiniz.','FaturaSehir');return false;}
if (document.all.FaturaIlce.value=='') {ShowErr(17,'Lütfen ilçeyi seçiniz.','FaturaIlce');return false;}



if (document.all.FaturaTipi[1].checked==true)
{
if (document.all.VergiDairesi.value=='') {ShowErr(19,'Lütfen vergi dairesini giriniz.','VergiDairesi');return false;}
if (document.all.VergiNumarasi.value=='') {ShowErr(20,'Lütfen vergi numarasını giriniz.','VergiNumarasi');return false;}
}
else
{
if (document.all.TCKimlik.value=='') {ShowErr(18,'Lütfen kimlik numaranızı giriniz.','TCKimlik');return false;}
}

//if (document.all.OdemeSekli.value=='') {ShowErr(9,'Lütfen ödeme şeklini seçiniz.','OdemeSekli');return false;}



document.getElementById('btnSubmit').disabled=true
}


function ContactInfo(Active,Col)
{
document.getElementById("AliciAdres").disabled=Active
document.getElementById("RowAddress").style.color=Col
document.getElementById("AliciAdres").style.color=Col
document.getElementById("AliciSehir").disabled=Active
document.getElementById("RowCity").style.color=Col
document.getElementById("AliciSehir").style.color=Col
document.getElementById("AliciIlce").disabled=Active
document.getElementById("RowCounty").style.color=Col
document.getElementById("AliciIlce").style.color=Col
//document.getElementById("FaturaAdresAyni").disabled=Active
//document.getElementById("SameInfo").style.color=Col
}


function CertificateType(Stat)
{
if (Stat=='none'){Active=true;Col='gray';Pasif=true} else {Active=false;Col='black';Pasif=false}
ContactInfo(Active,Col)
//document.getElementById("SertifikaKisiFarkli").disabled=Pasif
}

function GiftReceiver(Stat)
{
//alert (Stat)
document.getElementById("CertInfo").style.display=Stat
//document.getElementById("CertToInfo").style.display=Stat
//document.getElementById("MessageHolder").style.display=Stat

if (Stat=='block')
{
document.getElementById('Cert1').checked=true
ClearFields()
Cpt='Kime Hediye Ediyorsunuz'
Active='none'
Vis='block'
Dis=false
Col='black'
}
else
{
//document.getElementById("CertToInfo").style.display='none'
Col='gray'
Dis=true
ContactInfo(false,'black')
Vis='none'
Cpt='Bilgileriniz'
Active='block'
UserInfo('HediyeAlinan')
}


//if (Stat=='block' && document.getElementById('SertifikaTipi[0]').checked==false)
//{
//document.getElementById("CertToInfo").style.display='block'
//}

document.getElementById("CertCaption").innerHTML=Cpt
document.getElementById("RowMessage").disabled=Dis
document.getElementById("RowMessage").style.color=Col
document.getElementById("Mesaj").disabled=Dis
}

function SeciliTarih(Tarih)
  {  
  
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=='Err')
{
ShowAlert ('Seçmiş olduğunuz tarih ')
}

 }
			  }


xmlHttp.open("GET",'http://' + document.domain + '/'  + 'secili_tarih.asp?Tarih=' + Tarih,true);
    xmlHttp.send(null);  
	}
	
	

function ShowActivities(No)
  {  
  
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp=new XMLHttpRequest();}
xmlHttp.onreadystatechange=function()
	
      {
      if(xmlHttp.readyState==4)
      {
	
document.getElementById("ActivityDisplay").innerHTML=xmlHttp.responseText

 }
			  }
document.getElementById("ActivityDisplay").innerHTML='<center>Lütfen bekleyiniz...</center>'

xmlHttp.open("GET",'http://' + document.domain + '/'  + 'show_activities.asp?No=' + No,true);
    xmlHttp.send(null);  
	}
	
	
	
function KuponKullan(No)
  {  
  
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')
{

window.location.reload()
}
else
{
ShowAlert (xmlHttp.responseText)
}

 }
			  }

			  if (No=='')
			  {
			  ShowAlert ('Lütfen kupon numarasını giriniz.')
			  }
			  else
			  {
xmlHttp.open("GET",'http://' + document.domain + '/'  + 'use_coupon.asp?No=' + No,true);
    xmlHttp.send(null);  
	}
	}
	
	

function RemoveCart(ID,Redir)
{
if (confirm('Bu aktiviteyi sepetinizden çıkarmak istediğinizden emin misiniz?'))
{
window.location.href='remove_cart.asp?ID=' + ID + '&Redir='+ Redir
}
}

function AddToCart()
  {  
  
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=='OK')
{
//document.all.Sepet.src='http://' + document.domain + '/cart.asp'
//document.all.Sepet.style.top=document.body.scrollTop + (screen.availHeight/7)
//document.all.Sepet.style.display='block'
window.location.href='sepet.asp'
}
else
{
ShowAlert ('Bu aktivite, sepetinizde zaten bulunmaktadır!')
}

 }
			  }
//			 alert (Price)
xmlHttp.open("GET",'http://' + document.domain + '/'  + 'add_to_cart.asp',true);
    xmlHttp.send(null);  
	}
	
	
	
function InvoiceType(IType)
{
if (IType==0)
{
document.all.InvoiceName.disabled=false
document.all.IDNo.disabled=false
document.all.TaxOffice.disabled=true
document.all.TaxNumber.disabled=true
document.all.InvoiceTitle.disabled=true

document.all.FaturaAd.disabled=false
document.all.TCKimlik.disabled=false
document.all.VergiDairesi.disabled=true
document.all.VergiNumarasi.disabled=true
document.all.Unvan.disabled=true
}
else
{
document.all.InvoiceName.disabled=true
document.all.IDNo.disabled=true
document.all.TaxOffice.disabled=false
document.all.TaxNumber.disabled=false
document.all.InvoiceTitle.disabled=false

document.all.FaturaAd.disabled=true
document.all.TCKimlik.disabled=true
document.all.VergiDairesi.disabled=false
document.all.VergiNumarasi.disabled=false
document.all.Unvan.disabled=false
}
}



function NoErr(Ind)
{
document.all.ErrAlert[Ind].style.display='none'
document.all.Container[Ind].className='NoErr'
}

function ShowErr(Ind,Msg,ObjName)
{
ShowAlert (Msg,ObjName)
document.all.Container[Ind].className='Err'
document.all.ErrAlert[Ind].style.display='block'
document.all.ErrAlert[Ind].innerHTML=Msg
//if (document.getElementById(ObjName).style.display=='block'){document.getElementById(ObjName).focus()}
//document.getElementById(ObjName).focus()
//document.getElementById(Obj).select()
}






function ShowVideo(ID)
{
LockScreen(1)
document.all.Video.src='http://' + document.domain + '/video.asp?ID=' + ID
document.all.Video.style.top=document.body.scrollTop + (screen.availHeight/7)
document.all.Video.style.display='block'
document.all.Video.style.left=(screen.availWidth-490)/2
}


function ValidateNewMember()
{
if (document.forms["Register"].Ad.value=='') {document.forms["Register"].Ad.focus();ShowAlert('Lütfen adınızı giriniz.');return false}
if (document.forms["Register"].Email.value=='') {document.forms["Register"].Email.focus();ShowAlert('Lütfen e-mail adresinizi giriniz.');return false}
if (document.forms["Register"].Email.value.indexOf("@")==-1 || document.forms["Register"].Email.value.indexOf(".")==-1) {document.forms["Register"].Email.focus();ShowAlert('E-mail adresinizde hata var. Lütfen kontrol ediniz.');return false}
if (document.forms["Register"].Sifre.value=='') {document.forms["Register"].Sifre.focus();ShowAlert('Lütfen şifrenizi giriniz.');return false}
if (document.forms["Register"].SifreTekrar.value=='') {document.forms["Register"].SifreTekrar.focus();ShowAlert('Lütfen şifrenizi tekrar giriniz.');return false}
if (document.forms["Register"].SifreTekrar.value!=document.forms["Register"].Sifre.value) {document.forms["Register"].SifreTekrar.focus();ShowAlert('Girmiş olduğunuz iki şifre aynı değil. Lütfen kontrol ediniz.');return false}
}

function LockScreen(Stat)
{

if (Stat=='1') {vis='block';sb='no'} else {vis='none';sb='yes'}
document.all.Dark.style.display=vis
document.all.Dark.style.height=screen.availHeight*2
}



function ShowAlert(Msg,Foc)
{

//LockScreen(1)
//document.all.MsgTxt.innerText=Msg
//document.all.MsgTxt.textContent=Msg
//document.all.AlertWin.style.top=document.body.scrollTop + (screen.availHeight*0.2)
//document.all.AlertWin.style.width=screen.width*0.4
//document.all.AlertWin.style.left=screen.width*0.3
//document.all.AlertWin.style.display='block'
//if (Foc!=undefined) {document.getElementById('FocusObject').value=Foc}
alert (Msg)

}


function CheckMail(EmailAddr)
  {  
  
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!='0')
	  {
document.forms["Register"].Email.value=''
document.forms["Register"].Email.focus()
ShowAlert('Bu email adresine sahip sistemde başka bir üye vardır')

}
 }
			  }
			//  alert (Page)
			if (EmailAddr!='')
			{
xmlHttp.open("GET",'http://' + document.domain + '/check_email.asp?Email=' +EmailAddr,true);
    xmlHttp.send(null);  
	}
	}
	
	
function SatinAl(Activity,PriceOption,Rate)
  {  
  
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=='Continue')
{
AddToCart ()
}
else
{
window.location.href='http://' + document.domain +'/uyelik.asp'
}

 }
			  }
//			 alert (Price)
xmlHttp.open("GET",'http://' + document.domain + '/'  + 'add.asp?Activity=' + Activity + '&PriceOption=' + PriceOption + '&Rate=' + Rate,true);
    xmlHttp.send(null);  
	}
	

function ShowInfoContainer()
{
if (document.getElementById('RowInfo'))
{

document.getElementById('RowInfo').style.display='block'
document.getElementById('RowInstallation').style.display='none'
}

}	
	
function ProdTab(Page,ID)
  {  
  
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)

document.all.Container.innerHTML=xmlHttp.responseText
//document.all.EnterPrice.style.display='block'
 }
			  }

 document.getElementById('InsTab').value=''
ShowInfoContainer()			  


xmlHttp.open("GET",'http://' + document.domain + '/'  + Page + '.asp?ID=' + ID,true);
    xmlHttp.send(null);  
	}