/* This js file contains the functions to switch the values in the sector and product text boxes based on the selection made in the industry text box */

//arrays to hold sector values
var energySectorArr = new Array(11)
//energySectorArr[0] = "All Energy"
energySectorArr[0] = "Utilities"
energySectorArr[1] = "Independent Power Producers"
energySectorArr[2] = "Transmission"
energySectorArr[3] = "Distribution"
energySectorArr[4] = "Coal Mining"
energySectorArr[5] = "Energy Services"
energySectorArr[6] = "Energy Technology"
energySectorArr[7] = "OEMs"
energySectorArr[8] = "Oil and Gas"
energySectorArr[9] = "Pipelines"
energySectorArr[10] = "Refining"

var industrialSectorArr = new Array(6)
industrialSectorArr[0] = "Alternative Fuels"
industrialSectorArr[1] = "Chemicals"
industrialSectorArr[2] = "Metals & Mining"
industrialSectorArr[3] = "Paper & Forest Products"
industrialSectorArr[4] = "Printing"
industrialSectorArr[5] = "Publishing"

var telecomSectorArr = new Array(3)
telecomSectorArr[0] = "Telecom Related Infrastructure"
telecomSectorArr[1] = "Wireless"
telecomSectorArr[2] = "Wireline"

var transportSectorArr = new Array(4)
transportSectorArr[0] = "Airport and Infrastructure"
transportSectorArr[1] = "Logistics & Supply Chain"
transportSectorArr[2] = "Marine"
transportSectorArr[3] = "Rail"

//arrays to hold financing product values
var energyProductArr = new Array(14)
energyProductArr[0] = "Corporate Finance"
energyProductArr[1] = "Equipment Finance"
energyProductArr[2] = "Fleet Finance"
energyProductArr[3] = "High Yield Debt"
energyProductArr[4] = "Inventory Finance"
energyProductArr[5] = "Leasing"
energyProductArr[6] = "Limited Partnerships"
energyProductArr[7] = "Parts Finance"
energyProductArr[8] = "Preferred Equity"
energyProductArr[9] = "Project Finance"
energyProductArr[10] = "Real Estate Finance"
energyProductArr[11] = "Rolling Stock Finance"
energyProductArr[12] = "Structured Equity"
energyProductArr[13] = "Vendor Finance"

var industrialProductArr = new Array(6)
industrialProductArr[0] = "Lease"
industrialProductArr[1] = "Limited Partnerships"
industrialProductArr[2] = "Preferred Equity"
industrialProductArr[3] = "Private/Common Equity"
industrialProductArr[4] = "Secured Debt"
industrialProductArr[5] = "Subordinated Debt"

var telecomProductArr = new Array(3)
telecomProductArr[0] = "Private Equity"
telecomProductArr[1] = "Senior Secured Debt"
telecomProductArr[2] = "Structured Product"

var transportProductArr = new Array(6)
transportProductArr[0] = "Lease"
transportProductArr[1] = "Limited Partnerships"
transportProductArr[2] = "Preferred Equity"
transportProductArr[3] = "Private/Common Equity"
transportProductArr[4] = "Secured Debt"
transportProductArr[5] = "Subordinated Debt"

//function to modify select boxes based on current industry selection
function changeSelect(currentForm) {
	//alert("entered here");
	var secField = currentForm.sector
	var prodField = currentForm.product
	secField.options.length = 0
	secField.options[0] = new Option("All Energy                                                                                   ", "All Energy", true, true)
	prodField.options.length = 0
	prodField.options[0] = new Option("All                                              ", "All", true, true)
		for(var i = 0; i < energySectorArr.length; i++) {
			secField.options[i+1] = new Option(energySectorArr[i], energySectorArr[i])
		}
		for(var i = 0; i < energyProductArr.length; i++) {
			prodField.options[i+1] = new Option(energyProductArr[i], energyProductArr[i])
		}
	//secField.options[secField.options.length] = new Option("Other", "Other")
	//prodField.options[prodField.options.length] = new Option("Other", "Other")
}
