function findLoanSubType() {
var totOptions = "";

if (loanType=="0") {
subTypeLoan = new Array ("Select Purpose of Loan")
var totOptions = "";
	for (i=0;i<subTypeLoan.length;i++)
		{
		totOptions = totOptions + "<option value='" + subTypeLoan[i] + "'>" + subTypeLoan[i] + "</option>"
		}
		document.getElementById("category").innerHTML = "<select width='167' name='loan_sub_type' class='TextBoxSmall'>" + totOptions + "</select>"
	}
	
if (loanType=="1") {
subTypeLoan = new Array ("Select Purpose of Loan","Commercial property", "Plot of land", "Repairs & renovation", "Residential house", "Self construction of house", "For ready flat", "For under construction flat", "Transfer of loan", "Others")
var totOptions = "";
	for (i=0;i<subTypeLoan.length;i++)
		{
		totOptions = totOptions + "<option value='" + subTypeLoan[i] + "'>" + subTypeLoan[i] + "</option>"
		}
		document.getElementById("category").innerHTML = "<select width='167' name='loan_sub_type' class='TextBoxSmall'>" + totOptions + "</select>"
	}

if (loanType=="2") {
subTypeLoan = new Array ("Select Purpose of Loan","Business loan", "Buy consumer durables", "Down-payment of home", "Existing loan transfer", "Holidays", "Investment", "Jewellery", "Medical expenses","Wedding expenses", "Others")
var totOptions = "";
	for (i=0;i<subTypeLoan.length;i++)
		{
		totOptions = totOptions + "<option value='" + subTypeLoan[i] + "'>" + subTypeLoan[i] + "</option>"
		}
		document.getElementById("category").innerHTML = "<select width='167' name='loan_sub_type' class='TextBoxSmall'>" + totOptions + "</select>"
	}
	
if (loanType=="3") {
subTypeLoan = new Array ("Select Purpose of Loan","New car", "Used car")
var totOptions = "";
	for (i=0;i<subTypeLoan.length;i++)
		{
		totOptions = totOptions + "<option value='" + subTypeLoan[i] + "'>" + subTypeLoan[i] + "</option>"
		}
		document.getElementById("category").innerHTML = "<select width='167' name='loan_sub_type' class='TextBoxSmall'>" + totOptions + "</select>"
	}

if (loanType=="4") {
		document.getElementById("category").innerHTML = "<input type='text' name='loan_sub_type' value='Car Overdraft' class='TextBoxSmall'>"
	}

if (loanType=="5") {
		document.getElementById("category").innerHTML = "<input type='text' name='loan_sub_type' value='Two-Wheeler Loan' class='TextBoxSmall'>"
	}
	
if (loanType=="6") {
		document.getElementById("category").innerHTML = "<input type='text' name='loan_sub_type' value='Education Loan' class='TextBoxSmall'>"
	}
	
if (loanType=="7") {
subTypeLoan = new Array ("Select Purpose of Loan","Unsecured", "Term loan","Working capital transfer","Existing loan transfer","Bill discounting")
var totOptions = "";
	for (i=0;i<subTypeLoan.length;i++)
		{
		totOptions = totOptions + "<option value='" + subTypeLoan[i] + "'>" + subTypeLoan[i] + "</option>"
		}
		document.getElementById("category").innerHTML = "<select width='167' name='loan_sub_type' class='TextBoxSmall'>" + totOptions + "</select>"
	}

if (loanType=="8") {
subTypeLoan = new Array ("Select Purpose of Loan","Entry level", "Silver","Gold","Premium")
var totOptions = "";
	for (i=0;i<subTypeLoan.length;i++)
		{
		totOptions = totOptions + "<option value='" + subTypeLoan[i] + "'>" + subTypeLoan[i] + "</option>"
		}
		document.getElementById("category").innerHTML = "<select width='167' name='loan_sub_type' class='TextBoxSmall'>" + totOptions + "</select>"
	}

if (loanType=="9") {
subTypeLoan = new Array ("Select Purpose of Loan","Business loan", "Children's education","Existing loan transfer","Investment in securities","Medical expenses","Expenses","Others")
var totOptions = "";
	for (i=0;i<subTypeLoan.length;i++)
		{
		totOptions = totOptions + "<option value='" + subTypeLoan[i] + "'>" + subTypeLoan[i] + "</option>"
		}
		document.getElementById("category").innerHTML = "<select width='167' name='loan_sub_type' class='TextBoxSmall'>" + totOptions + "</select>"
	}

if (loanType=="10") {
		document.getElementById("category").innerHTML = "<input type='text' name='loan_sub_type' value='Loan Against Securities' class='TextBoxSmall'>"
	}

	
}

function findLoanType() {
	loanType = document.getElementById("loan_type").selectedIndex;
	findLoanSubType();
}
