var roomDetails =
[ 
    {'nodeID':'room22440801', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Spacious room situated at the top of the house, includes a lounge area, original Victorian fireplace and views across Ilfracombe to the sea.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, TV, Hairdryer, Radio, Work Desk, CD Player, Toilet, Heating, Fireplace, View (sea, garden, landmark, etc.).</p>', 'clickTest':false},
    {'nodeID':'room159321', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Art Deco themed room with views across Ilfracombe to the sea and the countryside.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, TV, Hairdryer, Radio, Work Desk, CD Player, Toilet, Heating, View (sea, garden, landmark, etc.).</p>', 'clickTest':false},
    {'nodeID':'room63754', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Larger bedroom with views across Ilfracombe towards the countryside.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, TV, Hairdryer, Radio, Refrigerator, Work Desk, Ironing Facilities, Seating Area, DVD Player, CD Player, Toilet, Video, Heating, View (sea, garden, landmark, etc.).</p>', 'clickTest':false},
    {'nodeID':'room55409', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Maximum occupancy of 2 adults and 2 children (aged under 16 years). Please confirm number of adults and children on the day of booking.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, TV, Hairdryer, Radio, Ironing Facilities, DVD Player, CD Player, Toilet, Video Games, Bathroom, Heating, View (sea, garden, landmark, etc.).</p>', 'clickTest':false},
    {'nodeID':'room54525', 'description':'', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, TV, Hairdryer, Radio, Work Desk, CD Player, Toilet, Bathroom, Heating, View (sea, garden, landmark, etc.).</p>', 'clickTest':false},
    {'nodeID':'room54489', 'description':'<p style="padding-bottom: 8px;"><b>Description: </b>Spacious room with views of the countryside and garden.</p>', 'amenities':'<p style="padding-bottom: 8px;"><b>Room amenities: </b>Tea/Coffee Maker, Shower, TV, Hairdryer, Radio, Work Desk, Ironing Facilities, CD Player, Toilet, Bathroom, Heating, View (sea, garden, landmark, etc.).</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;
    }
} 


