function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }document.body.className = document.body.className + ' claro';dojo.require("dijit.form.DateTextBox");dojo.require("dijit.form.Button");dojo.require("dijit.form.FilteringSelect");var sessionID = readCookie('THORsessionID'); if (!sessionID){ var sessionID = Math.floor(Math.random()*999999) document.cookie = 'THORsessionID = ' + sessionID + ';' } function thgieh_demo991(){ // alert('domain: thor.org.uk'); window.updateIFRM_availability_demo991( 0 ); } function updateIFRM_availability_demo991( height ) { var iframe = document.getElementById( 'frame_availability_demo991' ); //alert(height); iframe.setAttribute( 'height', height ); if (height != 0){ document.getElementById('availability_demo991').scrollIntoView(true); //alert(height); document.getElementById('avform_demo991').style.display = 'none'; } } function display_thor_availability_demo991 (){ var open = readCookie('THOR_open'); var containerDiv = document.getElementById('availability_demo991'); var numOfLinks = 0; var linkingcode = containerDiv.getElementsByTagName("a"); for (var i=0; i'; }else {searchbarHTML += '
';searchbarHTML += '
';searchbarHTML += '
';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '
';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '';searchbarHTML += '
';searchbarHTML += '
';searchbarHTML += '
';searchbarHTML += '';searchbarHTML += '
';searchbarHTML += '';}}containerDiv.innerHTML = searchbarHTML;}function sendUiMessage_demo991 (form){ // document.getElementById('avform').innerHTML = 'checking'; document.getElementById('wait').style.display = 'block'; // var roomVar = form.room.value; var dateVar = dijit.byId('THORdate_demo991').attr('value'); dateVar = dojo.date.stamp.toISOString(dateVar, {selector: 'date'}); var nightsVar = form.nights.value; var thorIDVar = form.thorID.value; var styleVar = form.domain.value; var sizeVar = form.size.value; var selflocation = self.location; var selflocation = String(selflocation); var selflocation = selflocation.replace("http://", ""); //alert('sendUi4'); document.getElementById('frame_availability_demo991').src = "http://www.thor.org.uk/widget/availability/v2/basic.php?" + "date=" + dateVar + "&nights=" + nightsVar + "&thorID=" + thorIDVar + "&domain=" + styleVar + "&size=" + sizeVar + "&selflocation=" + selflocation + "&sessionID=" + sessionID;}