var roomDetails =
[ 
    {'nodeID':'room11497002', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Cottage has a family room, double room, bathroom and shower room. There is a comfortable lounge with three piece suite and an electric fire and a separate dining room with further seating.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, TV, Telephone, Radio, Refrigerator, Ironing Facilities, Seating Area, DVD Player, Microwave, Bathroom, Heating, Kitchen, Bath or Shower.</p>', 'clickTest':false},
    {'nodeID':'room11497001', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>The cottage consists of a Double and Twin room, Fitted kitchen with dishwasher, microwave, fridge/freezer and electric cooker and all cooking utensils.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, TV, Telephone, Radio, Refrigerator, Ironing Facilities, Seating Area, DVD Player, Microwave, Bathroom, Heating, Kitchen, Bath or Shower.</p>', 'clickTest':false},
    {'nodeID':'room156', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>These large spacious rooms have 1 double bed and either bunk bed or single beds. These rooms are for family occupancy only. The family room will sleep 2 adults and 2 children. Some family rooms are large attic rooms. All rooms have a lovely view of the garden and fields.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, TV, Telephone, Hairdryer, Wake Up Service/Alarm Clock, Bathrobe, Radio, Ironing Facilities, DVD Player, Heating, Bath or Shower.</p>', 'clickTest':false},
    {'nodeID':'room155', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>These are large rooms, 1 of which has a small sitting room. All have lovely views overlooking the garden, croquet lawns or surrounding fields.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, TV, Hairdryer, Wake Up Service/Alarm Clock, Bathrobe, Radio, Ironing Facilities, DVD Player, Toilet, Heating, Bath or Shower.</p>', 'clickTest':false},
    {'nodeID':'room154', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>All of these large rooms have comfortable chairs and period furniture. There is 1 double room on the ground floor, which is accessible without using stairs. The room has a lovely view overlooking the front garden.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, TV, Telephone, Hairdryer, Wake Up Service/Alarm Clock, Trouser Press, Bathrobe, Radio, Ironing Facilities, DVD Player, Heating, Bath or Shower.</p>', 'clickTest':false},
    {'nodeID':'room153', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>These large rooms have lovely views over the garden.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, TV, Hairdryer, Wake Up Service/Alarm Clock, Bathrobe, Radio, Ironing Facilities, DVD Player, Toilet, Heating.</p>', 'clickTest':false}
];

// Example of roomDetails contents:
//
// var roomDetails =
// [ 
//     {'nodeID':'room0', 'description':'room0 description', 'amenities':'room 0 amenities', 'clickTest':false},
//     {'nodeID':'room1', 'description':'room1 description', 'amenities':'room 1 amenities', 'clickTest':false},
// ];

function secondClicktest(roomID) {
    var theroom = roomDetails[roomID];

    if (theroom["clickTest"] == false)
    {
        document.getElementById(theroom["nodeID"]).innerHTML=theroom["description"]+" "+theroom["amenities"];
        return theroom["clickTest"] = true;
    } else
    {
        document.getElementById(theroom["nodeID"]).innerHTML="";
        return theroom["clickTest"] = false;
    }
} 

