﻿var gaL = [];

function DisplayStorageUnits()
{
	var objForm = document.forms['bookonline'];
	var strLocation=objForm['location'].value;
	var strStorageOption="";
	
	// GRAB OUT THE SIZES HERE....
	var objOptions = objForm['storageunit'];
	//REMOVE CURRENT OPTIONS
	for(var o=objOptions.options.length-1;o>=1;o--) {
		objOptions.remove(o);
	}
	if (strLocation!="") {
		//ADD RELEVANT UNITS FOR THE LOCATION SELECTED
		for (var i=0; i<gaL.length; i++) { 
			if (gaL[i].locationName==strLocation) {
				strStorageOption = gaL[i].locationUnitSize + 'm (' + gaL[i].locationUnitAreaM3 + ' m3)';
				objOptions.options[objOptions.length] = new Option(strStorageOption, strStorageOption, false, false);
			}
		}
	}
}

function sL(strLocationName, strUnitSize, strAreaM3, strAreaM2, strCostWeek, strCostMonth)
{
	this.locationName=strLocationName;
	this.locationUnitSize=strUnitSize;
	this.locationUnitAreaM3=strAreaM3;
	this.locationUnitAreaM2=strAreaM2;
	this.locationUnitCostWeek=strCostWeek;
	this.locationUnitCostMonth=strCostMonth;
}

