var prevRoomReqlength = 2;//initialise to starting amount for 2nd menufunction update2ndmenu(){	for(var i=0; i < menu1choice[document.theform.NumberAndSexOfSeekers.selectedIndex].RoomReqoption.length; i++)		{		if ( ( i + 1 ) > prevRoomReqlength)			{			eval('document.theform.RoomReq.options[' + i + '] = new Option()');			}		eval('document.theform.RoomReq.options[' + i + '].value = menu1choice[document.theform.NumberAndSexOfSeekers.selectedIndex].RoomReqoption[i]'); //set new value of RoomReq		eval('document.theform.RoomReq.options[' + i + '].text  = menu1choice[document.theform.NumberAndSexOfSeekers.selectedIndex].RoomReqoption[i]'); //set new text of RoomReq		}	        	// set length of maker menu	document.theform.RoomReq.length = menu1choice[document.theform.NumberAndSexOfSeekers.selectedIndex].RoomReqoption.length;//i.e. set to number of items in the RoomReqchoice array		// set prev length	prevRoomReqlength = menu1choice[document.theform.NumberAndSexOfSeekers.selectedIndex].RoomReqoption.length;//i.e. set to number of items in the RoomReqchoice array    document.theform.RoomReq.selectedIndex = 0;}var menu1choice = new Array();menu1choice[0] = new Object();menu1choice[0].NumberAndSexOfSeekers = '';  //NumberAndSexOfSeekers doesnt actually do anything, but is helpful for debuggingmenu1choice[0].RoomReqoption = new Array();menu1choice[0].RoomReqoption[0] = '';menu1choice[1] = new Object();menu1choice[1].NumberAndSexOfSeekers = '1 Male';menu1choice[1].RoomReqoption = new Array();menu1choice[1].RoomReqoption[0] = 'a single or double room';menu1choice[1].RoomReqoption[1] = 'a double room';menu1choice[2] = new Object();menu1choice[2].NumberAndSexOfSeekers = '1 Female';menu1choice[2].RoomReqoption = new Array();menu1choice[2].RoomReqoption[0] = 'a single or double room';menu1choice[2].RoomReqoption[1] = 'a double room';menu1choice[3] = new Object();menu1choice[3].NumberAndSexOfSeekers = '1 Male 1 Female';menu1choice[3].RoomReqoption = new Array();menu1choice[3].RoomReqoption[0] = 'a double room (we are partners)';menu1choice[3].RoomReqoption[1] = '2 rooms';menu1choice[4] = new Object();menu1choice[4].NumberAndSexOfSeekers = '2 Males';menu1choice[4].RoomReqoption = new Array();menu1choice[4].RoomReqoption[0] = '2 rooms';menu1choice[4].RoomReqoption[1] = 'a twin room or 2 rooms';menu1choice[4].RoomReqoption[2] = 'a double room (we are partners)';menu1choice[5] = new Object();menu1choice[5].NumberAndSexOfSeekers = '2 Females';menu1choice[5].RoomReqoption = new Array();menu1choice[5].RoomReqoption[0] = '2 rooms';menu1choice[5].RoomReqoption[1] = 'a twin room or 2 rooms';menu1choice[5].RoomReqoption[2] = 'a double room (we are partners)';