/* MEMBER FORM CONTROL */
function NewFormControl(TheObject){
	if(TheObject.uFirstName.value==''){
		alert("Lütfen adınızı giriniz")
		TheObject.uFirstName.focus()
		return (false) }

	if(TheObject.uLastName.value==''){
		alert("Lütfen soyadınızı giriniz")
		TheObject.uLastName.focus()
		return (false) }

	if(TheObject.uuUserName.value==''){
		alert("Lütfen kullanıcı adınızı giriniz.")
		TheObject.uuUserName.focus()
		return (false)
	}
	else {
		if(TheObject.uuPassword.value==''){
			alert("Lütfen şifrenizi giriniz")
			TheObject.uuPassword.focus()
			return (false) }

		if(TheObject.uuPassword.value != TheObject.uPasswordRe.value){
			alert("Şifre haneleri farklı! Lütfen ikinci kutuyada aynı şifreyi yazınız.")
			return (false) }

		if(TheObject.uEmail.value=='' || TheObject.uEmail.value.indexOf('@') == -1 || TheObject.uEmail.value.indexOf('.') == -1){
			alert("Lütfen geçerli bir e-posta adresi giriniz.")
			TheObject.uEmail.focus()
			return (false) }
		
		if(TheObject.uAddress.value!=''){
			if(TheObject.uCountry.value==''){
				alert("Lütfen bir ülke giriniz.")
				TheObject.uCountry.focus()
				return (false) }

			if(TheObject.uCity.value==''){
				alert("Lütfen bir şehir giriniz.")
				TheObject.uCity.focus()
				return (false) }

			if(TheObject.uState.value==''){
				alert("Lütfen bir semt giriniz.")
				TheObject.uState.focus()
				return (false) }

			if(TheObject.uHomePhone.value=='' && TheObject.uWorkPhone.value=='' && TheObject.uMobilePhone.value==''){
				alert("Size ulaşmamız için lütfen en az bir telefon hanesini doldurunuz.")
				TheObject.uHomePhone.focus()
				return (false) }
		}

		TheObject.Save.disabled = true
		TheObject.Save.value = 'Beyleyin...'
		window.HideOperation.location='US_JavaControl.asp?page=newmember&uUserName='+ TheObject.uuUserName.value
		return (false)
	}
}

function EditFormControl(TheObject){
	if(TheObject.uFirstName.value==''){
		alert("Lütfen adınızı giriniz")
		TheObject.uFirstName.focus()
		return (false) }

	if(TheObject.uLastName.value==''){
		alert("Lütfen soyadınızı giriniz")
		TheObject.uLastName.focus()
		return (false) }

	if(TheObject.uuPassword.value==''){
		alert("Lütfen şifrenizi giriniz")
		TheObject.uuPassword.focus()
		return (false) }

	if(TheObject.uuPassword.value != TheObject.uPasswordRe.value){
		alert("Şifre haneleri farklı! Lütfen ikinci kutuyada aynı şifreyi yazınız.")
		return (false) }

	if(TheObject.uEmail.value=='' || TheObject.uEmail.value.indexOf('@') == -1 || TheObject.uEmail.value.indexOf('.') == -1){
		alert("Lütfen geçerli bir e-posta adresi giriniz.")
		TheObject.uEmail.focus()
		return (false) }
}

function CountrySelect(CountryName){
	document.all.CityPlat.innerHTML = "<font color=red>Lütfen Bekleyiniz...</font>"
	window.HideOperation.location='US_JavaControl.asp?page=selected&utype=city&Country='+ CountryName.value }

function CitySelect(){
	document.all.StatePlat.innerHTML = "<font color=red>Lütfen Bekleyiniz...</font>"
	window.HideOperation.location='US_JavaControl.asp?page=selected&utype=state&CityName='+ document.all.uCity.value }

function StateSelect(){
	if(document.all.uState.value=='0'){
		document.all.uCountry.disabled = false
		document.all.StatePlat.innerHTML = "<input type='text' name='uState'>"}
		document.all.uState.focus() }


/* EMAIL CONTROL */
function EmailFormControl(TheObject){
	if(TheObject.uEmail.value=='' || TheObject.uEmail.value.indexOf('@') == -1 || TheObject.uEmail.value.indexOf('.') == -1){
		alert("Lütfen geçerli bir e-posta adresi giriniz.")
		TheObject.uEmail.focus()
		return (false) }
}


/* ADDRESS FORM CONTROL */
function AddressFormControl(TheObject){
	if(TheObject.uName.value==''){
		alert("Lütfen adres hesabınıza bir ad veriniz.")
		TheObject.uName.focus()
		return (false) }

	if(TheObject.uAddress.value==''){
		alert("Lütfen bir adres giriniz.")
		TheObject.uAddress.focus()
		return (false) }

	if(TheObject.uCountry.value==''){
		alert("Lütfen bir ülke giriniz.")
		TheObject.uCountry.focus()
		return (false) }

	if(TheObject.uCity.value==''){
		alert("Lütfen bir şehir giriniz.")
		TheObject.uCity.focus()
		return (false) }

	if(TheObject.uState.value==''){
		alert("Lütfen bir semt giriniz.")
		TheObject.uState.focus()
		return (false) }

	if(TheObject.uHomePhone.value=='' && TheObject.uWorkPhone.value=='' && TheObject.uMobilePhone.value==''){
		alert("Size ulaşmamız için lütfen en az bir telefon hanesini doldurunuz.")
		TheObject.uHomePhone.focus()
		return (false) }
}
