// Javascript

function valid_loan(lang)
{
	if(lang == "en")
	{
		$msg1 = "Please insert your full name!";
		$msg2 = "Please insert your address!";
		$msg3 = "Please insert your phone number!";
		$msg4 = "Please insert your e-mail address!";
		$msg5 = "Please insert the amount of loan in JD!";
		$msg6 = "Please insert your purpose of loan!";
		$msg7 = "Please choose your guarantee way!";
	}
	else
	{
		$msg1 = "!الرجاء إدخال إسمك كاملا";
		$msg2 = "!الرجاء إدخال عنوانك";
		$msg3 = "!الرجاء إدخال رقم هاتفك";
		$msg4 = "!الرجاء إدخال بريدك الإلكتروني وبشكل صحيح";
		$msg5 = "!الرجاء إدخال قيمة قرضك بالدينار الأردني";
		$msg6 = "!الرجاء إدخال الغاية من القرض";
		$msg7 = "!الرجاء إختيار طريقة كفالة قرضك";	
	}
	
	
	if(document.GetLoan.Name.value.length == "")
	{
		alert($msg1);
		document.GetLoan.Name.focus();
		return false;
	}
	
	else if(document.GetLoan.Address.value.length == "")
	{
		alert($msg2);
		document.GetLoan.Address.focus();
		return false;
	}
	
	else if(document.GetLoan.Telephone1No.value.length == "")
	{
		alert($msg3);
		document.GetLoan.Telephone1No.focus();
		return false;
	}
	
	else if(document.GetLoan.Email.value.length == "")
	{
		alert($msg4);
		document.GetLoan.Email.focus();
		return false;
	}
	
	else if(document.GetLoan.LoanValue.value.length == "")
	{
		alert($msg5);
		document.GetLoan.LoanValue.focus();
		return false;
	}
	
	else if(document.GetLoan.PurposeOfLoan.value.length == "")
	{
		alert($msg6);
		document.GetLoan.PurposeOfLoan.focus();
		return false;
	}
	
	 if(document.GetLoan.OneGuaranter.checked == false  && document.GetLoan.PresentedBanksCheque.checked == false   && document.GetLoan.FromMe.checked == false   && document.GetLoan.Guarantor_Guarantors.checked == false   && document.GetLoan.ThirdPartner.checked == false   && document.GetLoan.PeriodicallyTrasferFromMySalaryToBank.checked == false   && document.GetLoan.PeriodicallyTrasferFromGuarantorsSalaryToBank.checked == false  && document.GetLoan.OtherGuarantees.checked == false   )
	{
		alert($msg7);
		document.GetLoan.OneGuaranter.focus();
		return false;
	}
	
	
	
}// end function valid_loan(lang)


function valid_bussiness_linkage(lang)
{
	if(lang == "en")
	{
		$msg1 = "Please insert your full name!";
		$msg2 = "Please insert your phone number!";
		$msg3 = "Please insert your e-mail address!";
		$msg4 = "Please insert your address!";
		$msg5 = "Please select your economic sector!";
		$msg6 = "Please select your desired city!";
	}
	else
	{
		$msg1 = "!الرجاء إدخال إسمك كاملا";
		$msg2 = "!الرجاء إدخال رقم هاتفك";
		$msg3 = "!الرجاء إدخال بريدك الإلكتروني وبشكل صحيح";
		$msg4 = "!الرجاء إدخال عناونك";
		$msg5 = "!الرجاء إختيارالقطاع الإقتصادي الذي تنتمي إليه";
		$msg6 = "!الرجاء إختيار مدينتك المفضلة";
	}
	
	
	if(document.application.ApplicantName.value.length == "")
	{
		alert($msg1);
		document.application.ApplicantName.focus();
		return false;
	}
	
	else if(document.application.Telephone1No.value.length == "")
	{
		alert($msg2);
		document.application.Telephone1No.focus();
		return false;
	}
	
	else if(document.application.Email.value.length == "")
	{
		alert($msg3);
		document.application.Email.focus();
		return false;
	}
	
	else if(document.application.Address.value.length == "")
	{
		alert($msg4);
		document.application.Address.focus();
		return false;
	}
	
	 if(document.application.Commercial.checked == false  && document.application.Industrial.checked == false   && document.application.Serviceable.checked == false  )
	{
		alert($msg5);
		document.application.Commercial.focus();
		return false;
	}
	
	
	
	
	 if(document.application.Amman.checked == false  && document.application.Irbid.checked == false   && document.application.Zarqa.checked == false && document.application.Salt.checked == false  && document.application.Karak.checked == false && document.application.Al_Ramtha.checked == false && document.application.Tafela.checked == false && document.application.Aqaba.checked == false)
	{
		alert($msg6);
		document.application.Amman.focus();
		return false;
	}
	
	
	
	
	
}// end function valid_loan(lang)


function valid_subscribe(lang)
{
	if(lang == "en")
	{
		$msg1 = "Please insert your full name!";
		$msg2 = "Please select your economic sector!";
		$msg3 = "Please insert your business type!";
		$msg4 = "Please insert your experience years!";
		$msg5 = "Please insert your e-mail!";
		$msg6 = "Please insert your address!";
		$msg7 = "Please insert at least one product or a service of yours!";
	}
	else
	{
		$msg1 = "!الرجاء إدخال إسمك كاملا";
		$msg2 = "!الرجاء إختيارالقطاع الإقتصادي الذي تنتمي إليه";
		$msg3 = "!الرجاء إدخال نوع عملك";
		$msg4 = "!الرجاء إدخال سنوات خبرتك";
		$msg5 = "!الرجاء إدخال بريدك الإلكتروني بشكل صحيح";
		$msg6 = "!الرجاء إدخال عنوانك";
		$msg7 = "!يجب إدخال خدمة أو منتج واحد على الأقل من الخدمات أو المنتجات التي تقدمها";
	}
	
	
	if(document.Subscribe.Name.value.length == "")
	{
		alert($msg1);
		document.Subscribe.Name.focus();
		return false;
	}
	
	else if(document.Subscribe.Commercial.checked == false  && document.Subscribe.Industrial.checked == false   && document.Subscribe.Serviceable.checked == false  )
	{
		alert($msg2);
		document.Subscribe.Commercial.focus();
		return false;
	}
	
	else if(document.Subscribe.BusinessType.value.length == "")
	{
		alert($msg3);
		document.Subscribe.BusinessType.focus();
		return false;
	}
	
	else if(document.Subscribe.YearsOfExperience.value.length == "")
	{
		alert($msg4);
		document.Subscribe.YearsOfExperience.focus();
		return false;
	}
	
	else if(document.Subscribe.Email.value.length == "")
	{
		alert($msg5);
		document.Subscribe.Email.focus();
		return false;
	}
	
	else if(document.Subscribe.Address.value.length == "")
	{
		alert($msg6);
		document.Subscribe.Address.focus();
		return false;
	}
	
	else if(document.Subscribe.ProductandServices1.value.length == "")
	{
		alert($msg7);
		document.Subscribe.ProductandServices1.focus();
		return false;
	}
	
	
	
	
	
}// end function valid_loan(lang)



function valid_careers(lang)
{
	if(lang == "en")
	{
		$msg1 = "Please insert your full name!";
		$msg2 = "Please insert your birth date!";
		$msg3 = "Please insert your birth place!";
		$msg4 = "Please insert your social security number!";
		$msg5 = "Please insert your natinality!";
		$msg6 = "Please insert details about your dependants!";
		$msg7 = "Please insert your address!";
		$msg8 = "Please insert your Phone number!";

	}
	else
	{
		$msg1 = "!الرجاء إدخال إسمك كاملا";
		$msg2 = "!الرجاء إدخال تاريخ ميلادك";
		$msg3 = "!الرجاء إدخال مكان ولادتك";
		$msg4 = "!الرجاء إدخال رقمك الوطني";
		$msg5 = "!الرجاء إدخال جنسيتك";
		$msg6 = "!الرجاء إدخال تفاصيل عن المعالين لديك";
		$msg7 = "!الرجاء إدخال عنوانك";
		$msg8 = "!الرجاء إدخال رقم هاتفك";
		
	}
	
	
	if(document.Careers.Name.value.length == "")
	{
		alert($msg1);
		document.Careers.Name.focus();
		return false;
	}
	
	else if(document.Careers.DateofBirth.value.length == "")
	{
		alert($msg2);
		document.Careers.DateofBirth.focus();
		return false;
	}
	
	else if(document.Careers.PlaceofBirth.value.length == "")
	{
		alert($msg3);
		document.Careers.PlaceofBirth.focus();
		return false;
	}
	
	else if(document.Careers.NationalNo.value.length == "")
	{
		alert($msg4);
		document.Careers.NationalNo.focus();
		return false;
	}
	
	else if(document.Careers.Nationality.value.length == "")
	{
		alert($msg5);
		document.Careers.Nationality.focus();
		return false;
	}
	
	
	else if(document.Careers.ChildrensStatusDescription.value.length == "")
	{
		alert($msg6);
		document.Careers.ChildrensStatusDescription.focus();
		return false;
	}
	else if(document.Careers.Address.value.length == "")
	{
		alert($msg7);
		document.Careers.Address.focus();
		return false;
	}
	
	else if(document.Careers.Phone1.value.length == "")
	{
		alert($msg8);
		document.Careers.Phone1.focus();
		return false;
	}
	
	
}// end function valid_loan(lang)