// JavaScript Document
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function hosting_anasayfa_referanslar_resimdegis(no){
document.hosting_referanslar_resim.src="hosting_images/hosting_anasayfa_referanslar_"+no+".jpg";
}

function hosting_form1_kontrol(){
var hata = 0;
var yasakharfler1=new RegExp("ş");
var yasakharfler2=new RegExp("Ş");
var yasakharfler3=new RegExp("ı");
var yasakharfler4=new RegExp("İ");
var yasakharfler5=new RegExp("ç");
var yasakharfler6=new RegExp("Ç");
var yasakharfler7=new RegExp("ö");
var yasakharfler8=new RegExp("Ö");
var yasakharfler9=new RegExp("ğ");
var yasakharfler10=new RegExp("Ğ");
var yasakharfler11=new RegExp("ü");
var yasakharfler12=new RegExp("Ü");
var yasakharfler13=new RegExp("_");
var yasakharfler14=new RegExp("/");
var yasakharfler15=new RegExp(",");
var yasakharfler16=new RegExp("*");
var yasakharfler17=new RegExp(".");
var mesaj = "";
var odak = "";
var kelime = document.hosting_form1.hosting_kelime.value;
var son = kelime.length-1;
if (hata == 0){ if (yasakharfler1.test(kelime)){ hata = 1; mesaj = "Lütfen ş yerine s kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler2.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen Ş yerine s kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler3.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen ı yerine i kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler4.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen İ yerine i kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler5.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen ç yerine c kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler6.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen Ç yerine c kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler7.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen ö yerine o kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler8.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen Ö yerine o kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler9.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen ğ yerine g kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler10.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen Ğ yerine g kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler11.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen ü yerine u kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler12.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen Ü yerine u kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler13.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen _ yerine - kullanınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler14.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen / kullanmayınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler15.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen , kullanmayınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler16.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen * kullanmayınız"; odak = "hosting_kelime"; } }
if (hata == 0){ if (yasakharfler17.test(document.hosting_form1.hosting_kelime.value)){ hata = 1; mesaj = "Lütfen . kullanmayınız"; odak = "hosting_kelime"; } }

if (hata == 0){ if(kelime.charAt(son) == '-' || kelime.charAt(0) == '-') { hata = 1; mesaj = "Alan adınız tire '-' ile başlayamaz ve bitemez!";  odak = "hosting_kelime"; } }
if (hata == 0){ if (document.hosting_form1.hosting_kelime.value == ""){ hata = 1; mesaj = "Lütfen aranacak kelimeyi giriniz"; odak = "hosting_kelime"; } }
if (hata == 1){ alert(mesaj); document.getElementById(odak).focus(); return false;}
document.hosting_form1.action = "hosting_adim2.php";
}


function bilgikutusu(no){
window.open("pop_bilgikutusu.php?no="+no,no,"width=250, height=180, resizable=yes, scrollbars=no");
}

function hosting_siparis_goster(no){
window.open("hosting_hesabim_siparis_goster.php?siparisno="+no,no,"width=550, height=250, resizable=yes, scrollbars=no");
}

function fiyatdegis(no,fiyat){
kutu = "domsure"+no;
yil = document.getElementById(kutu).selectedIndex + 1;
tutar = (yil * fiyat);
if (yil > 1){tutar-=yil;}
kutu = "domfiyat"+no;
document.getElementById(kutu).innerHTML= tutar;

}

function bilgiler(){
	document.hosting_adim4_form.action="hosting_adim5.php";
	document.hosting_adim4_form.islem.value=2;	
	document.hosting_adim4_form.submit();
}


function hosting_adim3(){
	document.hosting_adim2_form.action="hosting_adim3.php";
	document.hosting_adim2_form.submit();
}




function uyeol(){
	document.hosting_adim4_form.action="hosting_adim5.php";
	document.hosting_adim4_form.islem.value=1;	
	document.hosting_adim4_form.submit();
}

function adim3hesapla(no,toplam){
//	hostucretleri=new Array(0,39,84,134,184,44,89,139,189,84,3,0);
//	ekucretler=new Array(0,15,45,80,190);
	yilcarpani=new Array(100,194,282,364,440,510,574,632,684,730);
	
	dfiyat =0;
	hfiyat =0;
	sfiyat =0;
	
	kutu = "domain_tutar_"+no;
	dfiyat += parseInt(document.getElementById(kutu).value);

	
	kutu = "hostpaket1_"+no;	if (document.getElementById(kutu).checked){ hfiyat=39;}
	kutu = "hostpaket2_"+no;	if (document.getElementById(kutu).checked){ hfiyat=84;}
	kutu = "hostpaket3_"+no;	if (document.getElementById(kutu).checked){ hfiyat=134;}
	kutu = "hostpaket4_"+no;	if (document.getElementById(kutu).checked){ hfiyat=184;}
	kutu = "hostpaket5_"+no;	if (document.getElementById(kutu).checked){ hfiyat=44;}
	kutu = "hostpaket6_"+no;	if (document.getElementById(kutu).checked){ hfiyat=89;}
	kutu = "hostpaket7_"+no;	if (document.getElementById(kutu).checked){ hfiyat=139;}
	kutu = "hostpaket8_"+no;	if (document.getElementById(kutu).checked){ hfiyat=189;}
	kutu = "hostpaket9_"+no;	if (document.getElementById(kutu).checked){ hfiyat=84;}
	kutu = "hostpaket10_"+no;	if (document.getElementById(kutu).checked){ hfiyat=3;}
	kutu = "hostpaket11_"+no;	if (document.getElementById(kutu).checked){ hfiyat=0;}

	kutu = "ekpaket1_"+no;	if (document.getElementById(kutu).checked){ hfiyat+=0;}
	kutu = "ekpaket2_"+no;	if (document.getElementById(kutu).checked){ hfiyat+=15;}
	kutu = "ekpaket3_"+no;	if (document.getElementById(kutu).checked){ hfiyat+=45;}
	kutu = "ekpaket4_"+no;	if (document.getElementById(kutu).checked){ hfiyat+=80;}
	kutu = "ekpaket4_"+no;	if (document.getElementById(kutu).checked){ hfiyat+=190;}


	kutu = "seo_"+no;
	if (document.getElementById(kutu).checked){
		sfiyat += 6;
		}
	
	kutu = "hostsure_"+no;
	fiyat = parseInt((hfiyat * parseInt(yilcarpani[document.getElementById(kutu).selectedIndex]) / 100) + dfiyat + sfiyat);

	kutu = "hosting_hizmetbedeli_"+no;
	document.getElementById(kutu).innerHTML = '<p><strong>'+fiyat+' YTL + KDV</strong></p>';

	if (toplam == 100){
		document.getElementById("odemeturu1").innerHTML = '<strong>'+parseInt(fiyat/1.2)+'</strong>';
		document.getElementById("odemeturu2").innerHTML = '<strong>'+parseInt(fiyat)+'</strong>';
		document.getElementById("odemeturu3").innerHTML = '<strong>'+(parseInt(fiyat*118)/100)+'</strong>';
		document.getElementById("odemeturu4").innerHTML = '<strong>'+(parseInt(fiyat*118)/100)+'</strong>';
		}

}

function hosting_destek_kontrol(){

	if (document.hosting_destek_formu.name.value == "" || document.hosting_destek_formu.phone.value == "" ){
alert("Lütfen bilgilerinizi eksiksiz doldurunuz!");
		return false;
	}
	document.hosting_destek_formu.action ="hosting_destek_gonder.php";
}


function hosting_hesabim_alanadi_destek_kontrol(){

	if (document.hosting_destek_formu.name.value == "" || document.hosting_destek_formu.phone.value == "" ){
alert("Lütfen bilgilerinizi eksiksiz doldurunuz!");
		return false;
	}
	document.hosting_destek_formu.action ="hosting_hesabim_alanadi_destek_gonder.php";
}



function hosting_cagri_formu(){ window.open('hosting_cagri.php','call','width=530, height=400,scrollbars=yes, resizable=yes');  }
function hosting_onlinedestek(){ window.open('destek/livehelp.php?department=1','onlinedestek','width=550, height=500,scrollbars=yes, resizable=yes');  }
function openNewWindow(URLtoOpen, windowName, windowFeatures) {         newWindow=window.open(URLtoOpen, windowName, windowFeatures);     }