var roomDetails =
[ 
    {'nodeID':'room109792', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Our en-suite rooms look out on to the Bay, they are clean and comfortable with central heating for comfort in Spring, Autumn and Winter. All rooms have tea and coffee making facilities. This room can be split into a twin. Please specify in special requests section when booking if required. Views look out south towards the sea, St Bride\'s bay and the island of Skomer. This room can accommodate extra people on a sofa bed. Contact us for more information.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, Hairdryer, Ironing Facilities, Toilet, Heating.</p>', 'clickTest':false},
    {'nodeID':'room9590', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Our en-suite rooms look out on to the Bay, they are clean and comfortable with central heating for comfort in Spring, Autumn and Winter. All rooms have tea and coffee making facilities. This room can be split into a twin. Please specify in special requests section when booking if required. Beautiful sea view overlooking Skomer Island in the South to Ramsey Island in the West.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, 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;
    }
} 


