function checkForm(theForm) {
	if(theForm.email) {
		var isValidEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.email.value);
		var isValidEmail2 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.confirmEmail.value);
	
		if (theForm.email.value.length<1 || !isValidEmail) {
			alert('Sizinle iletişime geçebileceğimiz geçerli bir e-posta adresi yazmalısınız');
			theForm.email.focus();
			return false;
		}
		if (theForm.confirmEmail.value.length<1 || !isValidEmail2) {
			alert('Lütfen e-posta adresini tekrar giriniz');
			theForm.confirmEmail.focus();
			return false;
		}
		if (theForm.email.value != theForm.confirmEmail.value) {
			alert('Girmiş olduğunuz e-posta adresleri birbirini tutmuyor. Lütfen e-posta adreslerinizi kontrol edin.');
			theForm.confirmEmail.focus();
			return false;
		}
	}
	if(theForm.password) {
		if (theForm.password.value.length<6 || theForm.password.value.length>15) {
			alert('Lütfen 6-15 karakter arasında bir şifre giriniz');
			theForm.password.focus();
			return false;
		}
		if (theForm.confirmPassword.value.length<6 || theForm.confirmPassword.value.length>15) {
			alert('Lütfen şifrenizi tekrar giriniz');
			theForm.confirmPassword.focus();
			return false;
		}
		if(theForm.password.value != theForm.confirmPassword.value) {
			alert('Girmiş olduğunuz şifreler birbirini tutmuyor. Lütfen şifrelerinizi kontrol edin.');
			theForm.confirmPassword.focus();
			return false;
		}
	}
	if (theForm.firstname.value.length<2) {
		alert('İsminizi yazmalısınız');
		theForm.firstname.focus();
		return false;
	}
	if (theForm.lastname.value.length<2) {
		alert('Soyisminizi yazmalısınız');
		theForm.lastname.focus();
		return false;
	}	
	
	if (theForm.mobile_country_area.value.length<2) {
		alert('Lütfen cep telefonunuzun ülke kodunu giriniz.');
		theForm.mobile.focus();
		return false;
	}
	if (theForm.mobilearea.value.length<3) {
		alert('Lütfen cep telefonunuzun alan kodunu giriniz.');
		theForm.mobile.focus();
		return false;
	}
	if (theForm.mobile.value.length<7) {
		alert('Lütfen cep telefonu numaranızı giriniz.');
		theForm.mobile.focus();
		return false;
	}
	if (theForm.address.value.length<2) {
		alert('Adresinizi yazmalısınız');
		theForm.address.focus();
		return false;
	}
	if (!theForm.city.value) {
		alert('Şehir seçmelisiniz');
		theForm.city.focus();
		return false;
	}
	if (!theForm.rbtn[0].checked && !theForm.rbtn[1].checked && !theForm.rbtn[2].checked && !theForm.rbtn[3].checked && !theForm.rbtn[4].checked && !theForm.rbtn[5].checked && !theForm.rbtn[6].checked)
	{
	alert('Bize Nasıl Ulaştınız? alanı boş geçilemez');
	return false;	
	}
	if (theForm.member_terms && !theForm.member_terms.checked)
	{
	alert('Üyelik sözleşmesini onaylanmadan üyelik işleminiz tamamlanmayacaktır.');
	return false;	
	}
	return true;
}

function checkBultenForm(theForm) {
	var isValidEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.nlemail.value);
	if (theForm.nlemail.value.length<1 || !isValidEmail) {
		alert('Geçerli bir email adresi giriniz.');
		theForm.nlemail.focus();
		return false;
	}
	return true;
}


function isNumeric(e) {
	e = (e) ? e : event;
	var key    = (e.charCode) ? e.charCode : ((e.keyCode) ? e.keyCode : ((e.which) ? e.which : 0));
	if( (key >= 48 && key <= 57) ) return true;
	else return false;
	}
	
	

function openMemberTerms(){
		var a=document.getElementById('terms').style.display;
		b=(a=='none')? 'block' : 'none';
		document.getElementById('terms').style.display=b;
	}
	
	//Superbilet.com ve diger affiliateler icin action yonlendirilmesi
function change_action(a)

{
	switch (a)
	{
		
		case 835: document.searchform.action="http://ucuz.superbilet.com/uyegirisi"; break;
		
	}
}