// 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("8 Adriatico","8 Adriatico");
		subcategories.options[1] = new Option("68 Roces","68 Roces");
		subcategories.options[2] = new Option("Belton Place","Belton Place");
		subcategories.options[3] = new Option("Eton Baypark Manila","Eton Baypark Manila");
		subcategories.options[4] = new Option("Eton Emerald Lofts","Eton Emerald Lofts");
		subcategories.options[5] = new Option("Eton Parkview Greenbelt","Eton Parkview Greenbelt");
		subcategories.options[6] = new Option("Eton Tower Makati","Eton Tower Makati");
		subcategories.options[7] = new Option("One Archers Place","One Archers Place");
		subcategories.options[8] = new Option("The Eton Residences Greenbelt","The Eton Residences Greenbelt");
	}
	else if (categories.options[1].selected) {
		subcategories.options[0] = new Option("Eton Cyberpod Centris","Eton Cyberpod Centris");
		subcategories.options[1] = new Option("Eton Cyberpod Corinthian","Eton Cyberpod Corinthian");
	}
	else if (categories.options[2].selected) {
		subcategories.options[0] = new Option("Eton Centris","Eton Centris");
		subcategories.options[1] = new Option("Eton City","Eton City");
	}
	else if (categories.options[3].selected) {
		subcategories.options[0] = new Option("Annual Report","Annual Report");
		subcategories.options[1] = new Option("Perspectives","Perspectives");
		subcategories.options[2] = new Option("PSE Disclosures","PSE Disclosures");
		
	}
}
// 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 == "8 Adriatico") {
			downloads.options[0] = new Option("Brochure","http://www.eton.com.ph/pdf/8adriatico/brochure.pdf");
			downloads.options[1] = new Option("Project Information Sheet","http://www.eton.com.ph/pdf/8adriatico/projectinformationsheet.pdf");
			downloads.options[2] = new Option("Request for Reservation","http://www.eton.com.ph/pdf/8adriatico/requestforreservation.pdf");
			downloads.options[3] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
		else if (document.form1.subcategories.value == "Eton Cyberpod Centris") {
			downloads.options[0] = new Option("Brochure","http://www.eton.com.ph/pdf/etoncyberpodcentris/brochure.pdf");
		}
		else if (document.form1.subcategories.value == "Eton Centris") {
			
		}
		else if (document.form1.subcategories.value == "Annual Report") {
			downloads.options[0] = new Option("2009","http://www.eton.com.ph/pdf/annualreport/2009.pdf");
			downloads.options[1] = new Option("2008","http://www.eton.com.ph/pdf/annualreport/2008.pdf");
			downloads.options[2] = new Option("2007","http://www.eton.com.ph/pdf/annualreport/2007.pdf");
		}
	}
	
	else if (subcategories.options[1].selected) {
		if (document.form1.subcategories.value == "68 Roces") {
			downloads.options[0] = new Option("Flyer","http://www.eton.com.ph/pdf/68roces/flyer.pdf");
			downloads.options[1] = new Option("Project Information Sheet","http://www.eton.com.ph/pdf/68roces/projectinformationsheet.pdf");
			downloads.options[2] = new Option("Request for Reservation","http://www.eton.com.ph/pdf/68roces/requestforreservation.pdf");
			downloads.options[3] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
		else if (document.form1.subcategories.value == "Eton Cyberpod Corinthian") {
			downloads.options[0] = new Option("Brochure","http://www.eton.com.ph/pdf/etoncyberpodcorinthian/brochure.pdf");
		}
		else if (document.form1.subcategories.value == "Eton City") {
			downloads.options[0] = new Option("Post Cards","http://www.eton.com.ph/pdf/etoncity/postcards.pdf");
			downloads.options[1] = new Option("Brochure - South Lake Village","http://www.eton.com.ph/pdf/etoncity/brochure_southlakevillage.pdf");
			downloads.options[2] = new Option("Brochure - RiverBend","http://www.eton.com.ph/pdf/etoncity/brochure_riverbend.pdf");
			downloads.options[3] = new Option("Project Information Sheet (South Lake Village)","http://www.eton.com.ph/pdf/etoncity/projectinformationsheet_southlakevillage.pdf");
			downloads.options[4] = new Option("Request for Reservation (South Lake Village)","http://www.eton.com.ph/pdf/etoncity/requestforreservation_southlakevillage.pdf");
			downloads.options[5] = new Option("Project Information Sheet (RiverBend)","http://www.eton.com.ph/pdf/etoncity/projectinformationsheet_riverbend.pdf");
			downloads.options[6] = new Option("Request for Reservation (RiverBend)","http://www.eton.com.ph/pdf/etoncity/requestforreservation_riverbend.pdf");
			downloads.options[7] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
		else if (document.form1.subcategories.value == "Perspectives") {
			downloads.options[0] = new Option("September 2008 - Vol. 3","http://www.eton.com.ph/pdf/perspectives/volume_03.pdf");
			downloads.options[1] = new Option("March 2008 - Vol. 2","http://www.eton.com.ph/pdf/perspectives/volume_02.pdf");
			downloads.options[2] = new Option("November 2007 - Vol. 1","http://www.eton.com.ph/pdf/perspectives/volume_01.pdf");
		}
	}
	
	else if (subcategories.options[2].selected) {
		if (document.form1.subcategories.value == "Belton Place") {
			downloads.options[0] = new Option("Brochure","http://www.eton.com.ph/pdf/beltonplace/brochure.pdf");
			downloads.options[1] = new Option("Project Information Sheet","http://www.eton.com.ph/pdf/beltonplace/projectinformationsheet.pdf");
			downloads.options[2] = new Option("Request for Reservation","http://www.eton.com.ph/pdf/beltonplace/requestforreservation.pdf");
			downloads.options[3] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
			downloads.options[4] = new Option("Google Earth File","kmz/beltonplace.kmz");
		}
		else if (document.form1.subcategories.value == "PSE Disclosures") {
			downloads.options[0] = new Option("2008","http://www.eton.com.ph/pdf/psedisclosures/2008.pdf");
			downloads.options[1] = new Option("2007","http://www.eton.com.ph/pdf/psedisclosures/2007.pdf");
		}
	}
	
	else if (subcategories.options[3].selected) {
		if (document.form1.subcategories.value == "Eton Baypark Manila") {
			downloads.options[0] = new Option("Brochure","http://www.eton.com.ph/pdf/etonbayparkmanila/brochure.pdf");
			downloads.options[1] = new Option("Project Information Sheet","http://www.eton.com.ph/pdf/etonbayparkmanila/projectinformationsheet.pdf");
			downloads.options[2] = new Option("Request for Reservation","http://www.eton.com.ph/pdf/etonbayparkmanila/requestforreservation.pdf");
			downloads.options[3] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
	}
	
	else if (subcategories.options[4].selected) {
		if (document.form1.subcategories.value == "Eton Emerald Lofts") {
			downloads.options[0] = new Option("Project Information Sheet","http://www.eton.com.ph/pdf/etonemeraldlofts/projectinformationsheet.pdf");
			downloads.options[1] = new Option("Request for Reservation","http://www.eton.com.ph/pdf/etonemeraldlofts/requestforreservation.pdf");
			downloads.options[2] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
	}
	
	else if (subcategories.options[5].selected) {
		if (document.form1.subcategories.value == "Eton Parkview Greenbelt") {
			downloads.options[0] = new Option("Brochure","http://www.eton.com.ph/pdf/etonparkviewgreenbelt/brochure.pdf");
			downloads.options[1] = new Option("Typical Floor Plan","http://www.eton.com.ph/pdf/etonparkviewgreenbelt/typicalfloorplan.pdf");
			downloads.options[2] = new Option("Typical Floor Plan - Premium","http://www.eton.com.ph/pdf/etonparkviewgreenbelt/typicalfloorplan_premium.pdf");
			downloads.options[3] = new Option("Project Information Sheet","http://www.eton.com.ph/pdf/etonparkviewgreenbelt/projectinformationsheet.pdf");
			downloads.options[4] = new Option("Request for Reservation","http://www.eton.com.ph/pdf/etonparkviewgreenbelt/requestforreservation.pdf");
			downloads.options[5] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
	}
	else if (subcategories.options[6].selected) {
		if (document.form1.subcategories.value == "Eton Tower Makati") {
			downloads.options[0] = new Option("Flyer","http://www.eton.com.ph/pdf/etontowermakati/flyer.pdf");
			downloads.options[1] = new Option("Project Information Sheet","http://www.eton.com.ph/pdf/oetontowermakati/projectinformationsheet.pdf");
			downloads.options[2] = new Option("Request for Reservation","http://www.eton.com.ph/pdf/etontowermakati/requestforreservation.pdf");
			downloads.options[3] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
		}
	}
	else if (subcategories.options[7].selected) {
		if (document.form1.subcategories.value == "One Archers Place") {
			downloads.options[0] = new Option("Brochure","http://www.eton.com.ph/pdf/onearchersplace/brochure.pdf");
			downloads.options[1] = new Option("Project Information Sheet - West Tower","http://www.eton.com.ph/pdf/onearchersplace/projectinformationsheet_westtower.pdf");
			downloads.options[2] = new Option("Project Information Sheet - East Tower","http://www.eton.com.ph/pdf/onearchersplace/projectinformationsheet_easttower.pdf");
			downloads.options[3] = new Option("Request for Reservation - West Tower","http://www.eton.com.ph/pdf/onearchersplace/requestforreservation_westtower.pdf");
			downloads.options[4] = new Option("Request for Reservation - East Tower","http://www.eton.com.ph/pdf/onearchersplace/requestforreservation_easttower.pdf");
			downloads.options[5] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
			downloads.options[6] = new Option("Google Earth File","kmz/onearchersplace.kmz");
		}
	}
	else if (subcategories.options[8].selected) {
		if (document.form1.subcategories.value == "The Eton Residences Greenbelt") {
			downloads.options[0] = new Option("Brochure","http://www.eton.com.ph/pdf/theetonresidencesgreenbelt/brochure.pdf");
			downloads.options[1] = new Option("Project Information Sheet","http://www.eton.com.ph/pdf/theetonresidencesgreenbelt/projectinformationsheet.pdf");
			downloads.options[2] = new Option("Request for Reservation","http://www.eton.com.ph/pdf/theetonresidencesgreenbelt/requestforreservation.pdf");
			downloads.options[3] = new Option("Client Information Sheet","http://www.eton.com.ph/pdf/global/clientinformationsheet.pdf");
			downloads.options[4] = new Option("Google Earth File","kmz/theetonresidencesgreenbelt.kmz");
		}
	}
}
// 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 -->