/** Initial Set **/ var lt_theatre_promotion = { show_theatre : true, call_centre : 'off', advert_chosen : 'http://images.londontown.com/TheatrePromotions/Images/Deliveries/theatredinner3.jpg', advert_header : 'http://images.londontown.com/TheatrePromotions/Images/SpecialOffers-Header.gif', advert_primary : 'http://images.londontown.com/TheatrePromotions/Images/Deliveries/discountedtheatre.gif', advert_cycle : 1, advert_advisors : 'http://images.londontown.com' + '/TheatrePromotions/Images/Deliveries/advisors2.jpg', advert_hotel : 'http://images.londontown.com' + '/TheatrePromotions/Images/Deliveries/hoteloffers.gif', advert_pass : 'http://images.londontown.com' + '/TheatrePromotions/Images/Deliveries/pass.jpg', enclosure : null, runner : function() { var dimensions = lt_theatre_promotion.dimensions(); enclosure = document.createElement("div") ; enclosure.id = "lt_theatre_promotion"; enclosure.style.position = 'absolute'; enclosure.style.left = (dimensions[0]/2) + (594/2) + 10; enclosure.style.top = 105; enclosure.style.width = 112; var advisorLink = document.createElement('a'); advisorLink.href = "javascript: window.open('/hotels/about0800LONDON', 'About0800LONDON', 'scrollbars=no,width=398,height=500'); void(0);"; if (lt_theatre_promotion.call_centre == 'on') { var advisors = document.createElement("img"); advisors.src = lt_theatre_promotion.advert_advisors; advisors.alt = "ADVISORS AVAILABLE"; advisors.title = "ADVISORS AVAILABLE"; advisors.border = "0"; advisorLink.appendChild(advisors); enclosure.appendChild(advisorLink); } if (lt_theatre_promotion.show_theatre) { var specialOffer = document.createElement("img"); specialOffer.src = lt_theatre_promotion.advert_header; var advert_1 = document.createElement("img"); advert_1.src = lt_theatre_promotion.advert_hotel; advert_1.style.cursor = 'pointer'; advert_1.onmousedown = function(){ location.href = 'http://www.londontown.com/hotels'; } advert_1.alt = "Discounts on London Hotels"; advert_1.title = "Discounts on London Hotels"; var advert_2 = document.createElement("img"); advert_2.src = lt_theatre_promotion.advert_primary; advert_2.style.cursor = 'pointer'; advert_2.onmousedown = function(){ location.href = 'http://www.londontown.com/halfpricetickets/'; } var advert_3 = document.createElement("img"); advert_3.src = lt_theatre_promotion.advert_chosen; advert_3.style.cursor = 'pointer'; advert_3.onmousedown = function(){ location.href = 'http://www.londontown.com/TheatreAndDinner/Home'; } var advert_4 = document.createElement("img"); advert_4.src = lt_theatre_promotion.advert_pass; advert_4.style.cursor = 'pointer'; advert_4.onmousedown = function(){ location.href = 'http://www.londontown.com/lpass'; } enclosure.appendChild(specialOffer); enclosure.appendChild(advert_1); enclosure.appendChild(lt_theatre_promotion.sep(21)); enclosure.appendChild(lt_theatre_promotion.sep(4)); enclosure.appendChild(advert_2); enclosure.appendChild(lt_theatre_promotion.sep(21)); //enclosure.appendChild(advert_1); //enclosure.appendChild(lt_theatre_promotion.sep(21)); enclosure.appendChild(advert_3); enclosure.appendChild(lt_theatre_promotion.sep(21)); enclosure.appendChild(advert_4); } document.body.appendChild(enclosure); }, sep : function(height) { var d = document.createElement("div"); d.style.paddingBottom = height; return d; }, dimensions : function() { var viewportwidth; var viewportheight; if (typeof window.innerWidth != 'undefined'){ viewportwidth = window.innerWidth, viewportheight = window.innerHeight } else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) { viewportwidth = document.documentElement.clientWidth, viewportheight = document.documentElement.clientHeight } else { viewportwidth = document.getElementsByTagName('body')[0].clientWidth, viewportheight = document.getElementsByTagName('body')[0].clientHeight } return new Array(viewportwidth,viewportheight); }, test : function() { try { if( document.body ) { lt_theatre_promotion.runner(); } else { setTimeout( function() { lt_theatre_promotion.test(); } , 1500 ); } } catch ( exceptionElement ) { } }, scroll : function () { var dimensions = lt_theatre_promotion.dimensions(); enclosure.style.left = (dimensions[0]/2) + (594/2) + 10; } }; var iphone = 'NO'; if (iphone!='YES') { setTimeout( function() { lt_theatre_promotion.test(); } , 700 ); window.onresize = lt_theatre_promotion.scroll; }