// JavaScript Document
// -------------------------------------------------------------------
// Created by: Michael Johnson T. See
// Created on: July 10, 2008
// Created for: Eton Properties Philippines, Inc.
// -------------------------------------------------------------------
 
// Reset family drop-down
function ResetSelection () {
	if (this.form1 != undefined) {
		this.form1.categories.options[0].selected = true;
		this.form1.subcategories.options[0].selected = true;
		this.form1.downloads.options[0].selected = true;
	}
}
// End -->

// Set Projects
function SetSubCategory () {
	var categories = document.form1.categories;
	var subcategories = document.form1.subcategories;
	var downloads = document.form1.downloads;
	subcategories.length = 0;
	downloads.length = 0;
	if (categories.options[0].selected) {
		subcategories.options[0] = new Option("The Manors","The Manors");
		subcategories.options[1] = new Option("West Wing Residences","West Wing Residences");
		subcategories.options[2] = new Option("West Wing Villas","West Wing Villas");
	}
	else if (categories.options[1].selected) {
		subcategories.options[0] = new Option("West Wing Residences","West Wing Residences");
	}
}
// End -->

// Set Downloads
function SetDownloads () {
	var subcategories = document.form1.subcategories;
	var downloads = document.form1.downloads;
	downloads.length = 0;
	if (subcategories.options[0].selected) {
		if (document.form1.subcategories.value == "The Manors") {
			downloads.options[0] = new Option("Brochure","http://www.beltoncommunities.com/pdf/themanorsatnorthbeltoncommunities/brochure.pdf");
			downloads.options[1] = new Option("Flyer","http://www.beltoncommunities.com/pdf/themanorsatnorthbeltoncommunities/flyer.pdf");
			downloads.options[2] = new Option("Project Information Sheet (Bianca)","http://www.beltoncommunities.com/pdf/themanorsatnorthbeltoncommunities/projectinformationsheet_bianca.pdf");
			downloads.options[3] = new Option("Project Information Sheet (Camilla)","http://www.beltoncommunities.com/pdf/themanorsatnorthbeltoncommunities/projectinformationsheet_camilla.pdf");
			downloads.options[4] = new Option("Project Information Sheet (Diana)","http://www.beltoncommunities.com/pdf/themanorsatnorthbeltoncommunities/projectinformationsheet_diana.pdf");			
			downloads.options[5] = new Option("Project Information Sheet (Emilia)","http://www.beltoncommunities.com/pdf/themanorsatnorthbeltoncommunities/projectinformationsheet_emilia.pdf");
			downloads.options[6] = new Option("Project Information Sheet (Emilia)","http://www.beltoncommunities.com/pdf/themanorsatnorthbeltoncommunities/projectinformationsheet_francesca.pdf");
			downloads.options[7] = new Option("Request for Reservation","http://www.beltoncommunities.com/pdf/themanorsatnorthbeltoncommunities/requestforreservation.pdf");
			downloads.options[8] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
		
		else if (document.form1.subcategories.value == "West Wing Residences") {
			downloads.options[0] = new Option("Flyer (Local)","http://www.beltoncommunities.com/pdf/westwingresidencesatetoncity/flyer_local.pdf");
			downloads.options[1] = new Option("Flyer (International)","http://www.beltoncommunities.com/pdf/westwingresidencesatetoncity/flyer_international.pdf");
			downloads.options[2] = new Option("Project Information Sheet","http://www.beltoncommunities.com/pdf/westwingresidencesatetoncity/projectinformationsheet.pdf");			
			downloads.options[3] = new Option("Request for Reservation","http://www.beltoncommunities.com/pdf/westwingresidencesatetoncity/requestforreservation.pdf");
			downloads.options[4] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}

	}
	
	else if (subcategories.options[1].selected) {
		if (document.form1.subcategories.value == "West Wing Residences") {
			downloads.options[0] = new Option("Flyer","http://www.beltoncommunities.com/pdf/westwingresidencesatnorthbeltoncommunities/flyer.pdf");
			downloads.options[1] = new Option("Project Information Sheet","http://www.beltoncommunities.com/pdf/westwingresidencesatnorthbeltoncommunities/projectinformationsheet.pdf");			
			downloads.options[2] = new Option("Request for Reservation","http://www.beltoncommunities.com/pdf/westwingresidencesatnorthbeltoncommunities/requestforreservation.pdf");
			downloads.options[3] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
	}
	
	else if (subcategories.options[2].selected) {
		if (document.form1.subcategories.value == "West Wing Villas") {
			downloads.options[0] = new Option("Flyer","http://www.beltoncommunities.com/pdf/westwingvillasatnorthbeltoncommunities/flyer.pdf");
		}
	}
}
// End -->

// Set Enable Download
function EnableDownload (target) {	
		document.getElementById(target).disabled = false;
}
// End -->

// Set Disable Download
function DisableDownload (target) {	
		document.getElementById(target).disabled = true;
}
// End -->