var roomDetails =
[ 
    {'nodeID':'room3405509', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>One of the larger rooms, on the ground floor of the building. It has its own bathroom, and comes with a TV and facilities for making tea and coffee.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Bath, TV, Hairdryer, Wake Up Service/Alarm Clock, Balcony, Radio, Ironing Facilities, Bathroom Amenities, Fan, Toilet, Bathroom, Heating, View (sea, garden, landmark, etc.), Electric Kettle.</p>', 'clickTest':false},
    {'nodeID':'room3405508', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>This room features a TV and facilities for making tea and coffee. It is a ground-floor room, with its own bathroom.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Bath, TV, Hairdryer, Wake Up Service/Alarm Clock, Balcony, Radio, Ironing Facilities, Bathroom Amenities, Fan, Toilet, Bathroom, Heating, View (sea, garden, landmark, etc.), Electric Kettle.</p>', 'clickTest':false},
    {'nodeID':'room3405507', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>These rooms are at the top of the house on the third and fourth floors. Please be advised that there is no lift and rooms on the 3rd or 4th floors may not be suitable for less mobile guests. </p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, Bath, TV, Hairdryer, Wake Up Service/Alarm Clock, Balcony, Radio, Ironing Facilities, Bathroom Amenities, Fan, Toilet, Bathroom, View (sea, garden, landmark, etc.), Electric Kettle.</p>', 'clickTest':false},
    {'nodeID':'room3405506', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>This room has access to the balcony with its view over the square and sea. It also features a TV and facilities for making tea and coffee.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, Bath, TV, Hairdryer, Wake Up Service/Alarm Clock, Balcony, Radio, Ironing Facilities, Bathroom Amenities, Fan, Toilet, Bathroom, View (sea, garden, landmark, etc.), Electric Kettle.</p>', 'clickTest':false},
    {'nodeID':'room3405504', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>A quiet room with four-poster bed and views over the courtyard. Or, a room with king-size bed, large windows and a balcony with sea views.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, Bath, TV, Hairdryer, Wake Up Service/Alarm Clock, Balcony, Radio, Ironing Facilities, Bathroom Amenities, Fan, Toilet, Bathroom, View (sea, garden, landmark, etc.), Electric Kettle.</p>', 'clickTest':false},
    {'nodeID':'room3405503', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>With views to the rear of the building, these rooms have a TV and facilities for making tea and coffee.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, Bath, TV, Hairdryer, Wake Up Service/Alarm Clock, Balcony, Radio, Ironing Facilities, Bathroom Amenities, Fan, Toilet, Bathroom, Heating, View (sea, garden, landmark, etc.), Electric Kettle.</p>', 'clickTest':false},
    {'nodeID':'room3405502', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Situated on the second and third floors, these rooms have their own bathroom, a TV, and facilities for making tea and coffee. Please be advised that there is no lift and rooms on the higher floors may not be suitable for less mobile guests. </p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, Bath, TV, Hairdryer, Wake Up Service/Alarm Clock, Balcony, Radio, Ironing Facilities, Bathroom Amenities, Fan, Toilet, Bathroom, View (sea, garden, landmark, etc.), Electric Kettle.</p>', 'clickTest':false},
    {'nodeID':'room3405501', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>These rooms are situated on the second, third and fourth floor, and have either a view to the front or rear of the building. Should you have a preference for floor or view then please request when booking (subject to availability). Please be advised that there is no lift and rooms on the third or fourth floors may not be suitable for less mobile guests. </p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, Bath, TV, Hairdryer, Wake Up Service/Alarm Clock, Balcony, Radio, Ironing Facilities, Bathroom Amenities, Fan, Toilet, Bathroom, Heating, View (sea, garden, landmark, etc.), Electric Kettle.</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;
    }
} 


