var scripts = document.getElementsByTagName('script'); var bookingSystem = scripts[scripts.length-1]; var mtvanMember = 5654; function loadAfterJquery(){ // Load any additional scripts other than the base jQuery library. //$(document).ready(function(){ //}); } if (typeof jQuery == 'undefined'){ var script = document.createElement('script'); script.src = "//static.mtvan.com/system/mtvan-3.0/js/jquery-1.4.2.min.js"; script.onreadystatechange = function(){ if (this.readyState == 'complete'){ loadAfterJquery(); } } script.onload = loadAfterJquery; document.getElementsByTagName('head')[0].appendChild(script); }else{ if (typeof $ == 'undefined'){ $ = jQuery; } loadAfterJquery(); } document.write('
Booking system not enabled for this domain (mtvan.com).
Powered by mtvan.com - Customer Booking System V1.
mtvan.com Ltd on mtvan.
'); window.addEventListener("message", receiveMessage, false); function receiveMessage(e){ if (e.origin !== "http://www.mtvan.com" && e.origin !== "http://beta.mtvan.com" && e.origin !== "https://www.mtvan.com" && e.origin !== "https://beta.mtvan.com"){ return; } if (typeof e.data.height != 'undefined'){ document.getElementById('mtvan-booking-system').style.height = e.data.height; } if (typeof e.data.scrollTopFrame != 'undefined'){ $('html, body').animate({ scrollTop: $('#mtvan-booking-system').offset().top }, 200); } }