'')venueIcon.onmousedown=function(){window.open("http:\/\/"+destinationPRO);}
venueIcon.appendChild(i);Util.stack['venues'].appendChild(venueIcon);Util.stack['venue_icon_reference']=venueIcon;VenueIconManager.LabelItem();},createVenueIconSpecial:function(geoh,geov,zoomLevel,title,second,url,leftItemName)
{VenueIconManager.zind++;var coordinates=Util.geoToPixel(geoh,geov);var iconSize=VenueIconManager.getSizeLevel(Zoom.level);var i=Util.element("img",{'MozUserSelect':'none'},{'src':VenueIconManager.IconSet[iconSize].image});var venueIcon=Util.element("div",{'zIndex':(999+VenueIconManager.zind),'height':VenueIconManager.IconSet[iconSize].height,'width':VenueIconManager.IconSet[iconSize].width,'position':'absolute','left':(coordinates[0]-VenueIconManager.IconSet[iconSize].offsetleft),'top':(coordinates[1]-VenueIconManager.IconSet[iconSize].offsettop)},{'oldIndex':(999+VenueIconManager.zind),'ik':i,'iconSize':iconSize,'geoh':geoh,'geov':geov,'offsetleft':VenueIconManager.IconSet[iconSize].offsetleft,'offsettop':VenueIconManager.IconSet[iconSize].offsettop,'eType':'PIN_ELEMENT','URL':url});venueIcon.appendChild(i);if(destinationPRO>'')venueIcon.onmousedown=function(){window.open("http:\/\/"+destinationPRO);}
venueIcon.selfReposition=function()
{var pixels=Util.geoToPixel(this.geoh,this.geov);var iconSize=VenueIconManager.getSizeLevel(Zoom.level);this.style.left=pixels[0]-VenueIconManager.IconSet[iconSize].offsetleft;this.style.top=pixels[1]-VenueIconManager.IconSet[iconSize].offsettop;VenueIconManager.zChangeByObject(this,Zoom.level);}
Util.stack.venues.appendChild(venueIcon);Util.stack['venue_icon_reference']=venueIcon;VenueIconManager.LabelItemSpecial(venueIcon,title,second,leftItemName);return venueIcon;},LabelItemSpecial:function(icon,title,second,leftItemName)
{try
{var id="ID"+Math.random();var iconSize=VenueIconManager.getSizeLevel(Zoom.level);var eventBubble=Util.element("img",{'position':'absolute','left':0,'top':0},{'multiIcon':1,'id':id});icon.bubble=eventBubble;Util.stack['eventBubbleIcon']=eventBubble;eventBubble.onload=function()
{setTimeout(function(){JSON.Load("PHP/Image/MultiIcon.php?offsetWidth="+VenueIconManager.IconSet[iconSize].w+"&offsetHeight="+VenueIconManager.IconSet[iconSize].offsettop+"&sizer=10&oFont=../../fonts/arial.ttf&id="+id+"&venueSize=1&l1="+title+"&l2="+second+"&jsWidth=true&");},600);}
eventBubble.src="http:\/\/www.londontown.com/hotelmapbeta/PHP/Image/eventSystemIcon.php?sizer=10&oFont=../../fonts/arial.ttf&l1="+title+"&l2="+second+"&key="+Math.random();Util.stack['venue_icon_reference'].appendChild(eventBubble);var fgint=setInterval(function()
{try{JSON_Element_PinManager.addRowIcon("false",title,leftItemName,Util.stack['venue_icon_reference'].geoh,Util.stack['venue_icon_reference'].geov,false,true,"","VOID");clearInterval(fgint);fgint=null;}catch(wwwa){}},1000);}
catch(proMarkerRemoveExcveption){}},zChangeByObject:function(object,zoomLevel)
{venueIcon=object;var iconSize=VenueIconManager.getSizeLevel(zoomLevel);var coordinates=Util.geoToPixel(venueIcon.geoh,venueIcon.geov);venueIcon.style.left=coordinates[0];venueIcon.style.top=coordinates[1];venueIcon.style.top=parseInt(venueIcon.style.top)-VenueIconManager.IconSet[iconSize].offsettop;venueIcon.style.left=parseInt(venueIcon.style.left)-VenueIconManager.IconSet[iconSize].offsetleft;venueIcon.offsetleft=VenueIconManager.IconSet[iconSize].offsetleft;venueIcon.offsettop=VenueIconManager.IconSet[iconSize].offsettop;venueIcon.height=VenueIconManager.IconSet[iconSize].height;venueIcon.width=VenueIconManager.IconSet[iconSize].width;venueIcon.removeChild(venueIcon.ik);var i=document.createElement("img");i.src=VenueIconManager.IconSet[iconSize].image;venueIcon.appendChild(i);venueIcon.ik=i;venueIcon.iconSize=iconSize;object.bubble.style.left=0-(object.bubble.totalWidth/2-VenueIconManager.IconSet[iconSize].w);object.bubble.style.top=parseInt(venueIcon.offsettop);},zoomLevelIconChange:function(zoomLevel)
{venueIcon=Util.stack['venue_icon_reference'];var iconSize=VenueIconManager.getSizeLevel(zoomLevel);var coordinates=Util.geoToPixel(venueIcon.geoh,venueIcon.geov);venueIcon.style.left=coordinates[0];venueIcon.style.top=coordinates[1];venueIcon.style.top=parseInt(venueIcon.style.top)-VenueIconManager.IconSet[iconSize].offsettop;venueIcon.style.left=parseInt(venueIcon.style.left)-VenueIconManager.IconSet[iconSize].offsetleft;venueIcon.offsetleft=VenueIconManager.IconSet[iconSize].offsetleft;venueIcon.offsettop=VenueIconManager.IconSet[iconSize].offsettop;venueIcon.height=VenueIconManager.IconSet[iconSize].height;venueIcon.width=VenueIconManager.IconSet[iconSize].width;venueIcon.removeChild(venueIcon.ik);var i=document.createElement("img");i.src=VenueIconManager.IconSet[iconSize].image;venueIcon.appendChild(i);venueIcon.ik=i;venueIcon.iconSize=iconSize;Util.setTrans(i,70);i.onmouseover=function(){Util.setTrans(this,100);}
i.onmouseout=function(){Util.setTrans(this,70);}
JSON.Load("PHP/Image/eventSystemIcon.php?venueSize=1&l1="+hotelenc+"&jsWidth=true&l2=&");},getSizeLevel:function(currentZoomLevel)
{var defaultSize='small';if(currentZoomLevel>=6)
{defaultSize='large';}
else if(currentZoomLevel>=3)
{defaultSize='medium';}
return defaultSize;},LabelItem:function()
{try
{if(isEvent!='HACKHACK')
{var eventBubble=document.createElement("img");Util.stack['eventBubbleIcon']=eventBubble;eventBubble.style.position='absolute';eventBubble.style.left=0;eventBubble.style.top=0;eventBubble.multiIcon=0;eventBubble.onload=function()
{setTimeout(function(){JSON.Load("PHP/Image/eventSystemIcon.php?venueSize=1&l1="+hotelenc+"&jsWidth=true&l2=&");},600);}
eventBubble.src="PHP/Image/eventSystemIcon.php?l1="+hotelenc+"&l2=&key="+Math.random();setTimeout(function(){JSON.Load("PHP/Image/eventSystemIcon.php?venueSize=1&l1="+hotelenc+"&jsWidth=true&l2=&");},5000);eventBubble.style.zIndex='99999991';Util.stack['venue_icon_reference'].appendChild(eventBubble);VenueIconManager.PointerCreator();}}
catch(proMarkerRemoveExcveption){}},PointerCreator:function()
{var done=false;try
{if(JSON_Element_PinManager)
{done=true;JSON_Element_PinManager.addRowIcon("false",hotelenc,hoteldec,Util.stack['venue_icon_reference'].geoh,Util.stack['venue_icon_reference'].geov,true,true,"","VOID");}}catch(e01)
{}
if(!done)setTimeout(function(){VenueIconManager.PointerCreator();},2000);}};
var callCentreInterface={interval:2500,intervalCount:0,intervalWait:null,adminCount:'3',curStatus:'online',polling:false,poll:null,navPointImages:{'online':s3+'Elements/CallCentreApp/online.png','offline':s3+'Elements/CallCentreApp/offline.png'},notice:function(message)
{Layers.switchBlack(true);var dims=Util.getDimensions();var message_notice=Util.element("div",{'cursor':'pointer','zIndex':'99999999','position':'absolute','left':(dims[0]/2)-(507/2),'top':((dims[1]/2)-(82/2))-50,'width':'507','height':'82','backgroundImage':'url('+s3+'Elements/CallCentreApp/notice1.png)','fontFamily':'arial','fontSize':'12px','color':'#FFFFFF'},null);var inner_message=Util.element("div",{'fontFamily':'arial','fontSize':'15px','color':'#000000','zIndex':'99999999','position':'absolute','left':0,'top':45,'width':'507','height':'82','textAlign':'center'},{'innerHTML':message});message_notice.appendChild(inner_message);document.body.appendChild(message_notice);message_notice.onmousedown=function()
{Layers.switchBlack(false);this.parentNode.removeChild(this);}},runMouseAction:function(object,event)
{if(object.isDown)
{event=(event)?event:window.event;var x=event.clientX-object.downPointX;var y=event.clientY-object.downPointY;object.parentNode.style.left=object.posX+x;object.parentNode.style.top=object.posY+y;}},browserLanguage:function()
{var language=(navigator.appName=='Netscape')?navigator.language:navigator.browserLanguage;var languageType='';if(language.indexOf('en')>-1)languageType='English';else if(language.indexOf('nl')>-1)languageType='Dutch';else if(language.indexOf('fr')>-1)languageType='French';else if(language.indexOf('de')>-1)languageType='German';else if(language.indexOf('ja')>-1)languageType='Japanese';else if(language.indexOf('it')>-1)languageType='Italian';else if(language.indexOf('pt')>-1)languageType='Portuguese';else if(language.indexOf('es')>-1)languageType='Spanish';else if(language.indexOf('sv')>-1)languageType='Swedish';else if(language.indexOf('zh')>-1)languageType='Chinese';return languageType;},createChatArea:function()
{var playerName=prompt("What is your name?","");if(playerName&&playerName!='undefined')
{var agentName="Waiting..";var geos=Util.getGeo();var dateSegmentsAsString=Util.getDatesAsQueryString();JSON.Load("Script/JSON/Actions/JSON_ChatInitialise.php?"+dateSegmentsAsString+"lang="+callCentreInterface.browserLanguage()+"&geoh1="+Math.round(geos[0])+"&geov1="+Math.round(geos[1])+"&geoh2="+Math.round(geos[2])+"&geov2="+Math.round(geos[3])+"&chInit=true&chatName="+playerName+"&session_id="+londonMapsSession+"&");var chatArea=Util.element("div",{'zIndex':'99999999','position':'absolute','left':'240px','top':'100px','width':'187','height':'320','backgroundImage':'url('+s3+'Elements/CallCentreApp/chat_area.png)','backgroundRepeat':'none'},null);var chatKill=Util.element("div",{'cursor':'pointer','MozUserSelect':'none','position':'absolute','left':'156','top':'1','width':'27','height':'27','backgroundColor':'#FF0000'},null);chatArea.appendChild(chatKill);Util.setTrans(chatKill,1);chatKill.onmousedown=function(){callCentreInterface.kill();}
var writing=Util.element("img",{'display':'none','position':'absolute','left':'155px','top':'30px'},{'src':s3+'Elements/CallCentreApp/writing.gif'});chatArea.appendChild(writing);Util.stack['WRITING_ITEM']=writing;var chatMovePoint=Util.element("div",{'cursor':'move','MozUserSelect':'none','position':'absolute','left':'3','top':'1','width':'156','height':'27','backgroundColor':'#000000'},null);Util.setTrans(chatMovePoint,1);chatMovePoint.onmousedown=function(event)
{this.isDown=true;event=(event)?event:window.event;this.downPointX=event.clientX;this.downPointY=event.clientY;this.posX=parseInt(this.parentNode.style.left);this.posY=parseInt(this.parentNode.style.top);window.onmousemove=document.onmousemove=function(event)
{callCentreInterface.runMouseAction(Util.stack['chatMovePoint'],event);}}
chatMovePoint.onmouseup=function()
{this.isDown=false;window.onmousemove=document.onmousemove=EventObject_MouseHandler.MouseMove;}
chatArea.appendChild(chatMovePoint);var userName=Util.element("div",{'position':'absolute','left':'39px','top':'32px','width':'170','height':'15'},{'className':'boldArialCal','innerHTML':agentName});chatArea.appendChild(userName);var speechPoint=Util.element("div",{'overflow':'auto','position':'absolute','left':'3','top':'57','width':'180','height':'206'},{'className':'normArialCal','innerHTML':''});chatArea.appendChild(speechPoint);var entryArea=Util.element("textarea",{'overflow':'hidden','border':'0px solid #cccccc','position':'absolute','left':'10px','top':'270px','width':'117','height':'39'},{'className':'normArialCal','type':'textarea','value':''});speechPoint.innerHTML="System: Please wait a moment
";entryArea.onmousedown=function(){}
entryArea.focus();entryArea.speechPoint=speechPoint;entryArea.onkeydown=function(e){this.myKeyDown(e);}
entryArea.myKeyDown=function(e)
{e=(e)?e:window.event;if(e.which==13)
{this.speechPoint.innerHTML=this.speechPoint.innerHTML+"You: "+this.value+"
";JSON.Load("Script/JSON/Actions/JSON_XChange.php?user=true&s="+londonMapsSession+"&m="+escape(this.value)+"&");this.value='';try{Util.stack['JSON_CHAT'].messageWindow.scrollTop=999999;}catch(eeee){}
return false;}}
chatArea.appendChild(entryArea);var sendButton=Util.element("div",{'cursor':'pointer','position':'absolute','left':'135','top':'268','width':'46','height':'43','backgroundColor':'#000000'},null);Util.setTrans(sendButton,1);sendButton.entryArea=entryArea;sendButton.onmousedown=function(e)
{this.entryArea.speechPoint.innerHTML=this.entryArea.speechPoint.innerHTML+"You: "+this.entryArea.value+"
";JSON.Load("Script/JSON/Actions/JSON_XChange.php?user=true&s="+londonMapsSession+"&m="+escape(this.entryArea.value)+"&");this.entryArea.value='';try{Util.stack['JSON_CHAT'].messageWindow.scrollTop=999999;}catch(eeee){}
return false;}
chatArea.appendChild(sendButton);document.body.appendChild(chatArea);speechPoint.userName=userName;Util.stack['chatMovePoint']=chatMovePoint;Util.stack['JSON_CHAT']=callCentreInterface;Util.stack.JSON_CHAT['messageWindow']=speechPoint;Util.stack['JSON_MAIN']=chatArea;callCentreInterface.poll=setInterval(function()
{try
{var geos=Util.getGeo();Util.stack['JSON_CHAT'].polling=true;JSON.Load("Script/JSON/Actions/JSON_XChange.php?&geoh1="+Math.round(geos[0])+"&geov1="+Math.round(geos[1])+"&geoh2="+Math.round(geos[2])+"&geov2="+Math.round(geos[3])+"&poll=true&sid="+londonMapsSession+"&");}catch(ee){}},2500);}
else
{alert("We need a valid name..");}},kill:function()
{JSON.Load("Script/JSON/Actions/JSON_XChange.php?remove=true&s="+londonMapsSession+"&");clearInterval(callCentreInterface.poll);callCentreInterface.poll=null;Util.stack['JSON_MAIN'].parentNode.removeChild(Util.stack['JSON_MAIN']);Util.stack['JSON_MAIN']=null;},addCallCentreApp:function()
{try
{Util.stack['CallCentreApp']=Util.stack['LEFTPANELB'];if(callCentreInterface.adminCount<1)callCentreInterface.curStatus='offline';var callCentreImage=Util.element("img",{'cursor':'pointer'},{'src':callCentreInterface.navPointImages[callCentreInterface.curStatus]});callCentreImage.onmousedown=function()
{if(callCentreInterface.curStatus=='online')
{if(!Util.stack['JSON_MAIN']){callCentreInterface.createChatArea();}else{callCentreInterface.notice("You already have a chat window open!");}}
else
{location.href='mailto:Assist_Me@HotelMap.com';}};callCentreImage.onmouseover=function()
{Util.stack['callShadow'].style.display='none';clearTimeout(callCentreInterface.intervalWait);callCentreInterface.intervalWait=null;if(!this.blockSub)
{var procode='';var imageReference=(procode)?s3+'Elements/CallCentreApp/blockArea_Offer.png':s3+'Elements/CallCentreApp/blockArea_NoOffer.png';var blockSubImage=Util.element("div",{'display':'','width':186,'height':172,'backgroundImage':'url('+imageReference+')','backgroundRepeat':'none'},null);this.parentNode.appendChild(blockSubImage);this.blockSub=blockSubImage;blockSubImage.callCentreImage=this;blockSubImage.onmouseover=function()
{clearTimeout(callCentreInterface.intervalWait);callCentreInterface.intervalWait=null;}
blockSubImage.onmouseout=function()
{var ref=this;callCentreInterface.intervalWait=setTimeout(function()
{Util.stack['callShadow'].style.display='';ref.style.display='none';},700);}
if(procode)
{var offerCode=Util.element("div",{'fontFamily':'arial','fontSize':'11','color':'#FFFFFF','zIndex':'9999999','position':'relative','left':'109px','top':'98px','width':'90px','height':'30px'},{'innerHTML':procode});blockSubImage.appendChild(offerCode);}
else
{var offerCode=Util.element("div",{'fontFamily':'arial','fontSize':'11','color':'#FFFFFF','zIndex':'9999999','position':'relative','left':'19px','top':'98px','width':'90px','height':'30px'},{'innerHTML':' '});blockSubImage.appendChild(offerCode);}
var phoneNumber='020 7437 4370';if(procode)phoneNumber=(venueIconEnabled)?'020 7292 2335':'020 7292 2329';if(PRO_SYSTEM.match("R48M4"))phoneNumber="0207 420 4980";var phoneCode=Util.element("div",{'fontFamily':'arial','fontSize':'19','color':'#FFFFFF','zIndex':'9999999','position':'relative','left':'17px','top':'46px','width':'180px','height':'50px'},{'innerHTML':phoneNumber});blockSubImage.appendChild(phoneCode);var emailAddress='Assist_Me@HotelMap.com';var emailCode=Util.element("div",{'fontFamily':'arial','fontSize':'11','color':'#FFFFFF','zIndex':'9999999','position':'relative','left':'17px','top':'60px','width':'180px','height':'50px'},{'innerHTML':emailAddress});blockSubImage.appendChild(emailCode);}
else
{this.blockSub.style.display='';Util.stack['callShadow'].style.display='none';}}
callCentreImage.onmouseout=function()
{var ref=this;callCentreInterface.intervalWait=setTimeout(function()
{Util.stack['callShadow'].style.display='';ref.blockSub.style.display='none';},700);}
Util.stack.CallCentreApp.appendChild(callCentreImage);var shadow=Util.element("div",{'display':'','width':186,'height':2,'overflow':'hidden','backgroundImage':'url('+s3+'Elements/CallCentreApp/shadow.gif)','backgroundRepeat':'none'},null);Util.stack.CallCentreApp.appendChild(shadow);Util.stack['callShadow']=shadow;}
catch(callCentreException)
{alert("callCentreException: "+callCentreException.message);}}};
var datasets =
{
photocollection : {},
photoicons : {},
photoshown : null,
photoinfo : null
};
var SystemPreloader =
{
doFullImageLoadedCheck : function()
{
setTimeout( function() { if ( Util.stack['preload_done'] ){ primaryBuilding(); } else { SystemPreloader.doFullImageLoadedCheck(); } }, 50);
},
initialisePreloadImageSequence : function()
{
Util.stack['preload_done'] = false;
if ( !isNewSession && document.all ) {
//alert("Is here");
Util.stack['preload_done'] = true;
//alert("Here too");
runDateSystem();
} else {
/** $Id: Hotelmap.pre.php,v 1.27 2010/08/11 11:18:03 james Exp $ **/
/** Preload the images we need **/
preloadImageSelection=[{'image':s3+'Elements/Search/filter_bot_point.png','style':'default'},{'image':s3+'Elements/Search/search_hotels.png','style':'default'},{'image':s3+'Elements/Search/info2.png','style':'default'},{'image':s3+'Elements/Search/right_cal.gif','style':'default'},{'image':s3+'Elements/Search/cal_arrival1.png','style':'default'},{'image':s3+'Elements/Search/close_seach_window.png','style':'default'},{'image':s3+'Elements/Search/filter_top_point.png','style':'default'},{'image':s3+'Elements/Search/search_ajax.gif','style':'default'},{'image':s3+'Elements/Search/left_cal.gif','style':'default'},{'image':s3+'Elements/Search/cal_arrival_event1.png','style':'default'},{'image':s3+'Elements/Search/hotel_spinner.gif','style':'default'},{'image':s3+'Elements/Search/cal_departure1.png','style':'default'},{'image':s3+'Elements/Search/close_seach_window_hover.png','style':'default'},{'image':s3+'Elements/Search/filter_sub_1_mid.png','style':'default'},{'image':s3+'Elements/Search/cal_departure_event1.png','style':'default'},{'image':s3+'Elements/Search/search_spin_1.gif','style':'default'},{'image':s3+'Elements/black_loader.gif','style':'default'},{'image':s3+'Elements/Pins/edit.png','style':'default'},{'image':s3+'Elements/Pins/done.png','style':'default'},{'image':s3+'Elements/Pins/ACross.png','style':'default'},{'image':s3+'Elements/Overview/overview-housing.png','style':'default'},{'image':s3+'Elements/Zoom/zoom_slider.gif','style':'default'},{'image':s3+'Elements/Zoom/zoom_minus.png','style':'default'},{'image':s3+'Elements/Zoom/zoom_scroll.png','style':'default'},{'image':s3+'Elements/Zoom/zoom_plus.png','style':'default'},{'image':s3+'Elements/NameIcon/pointer.png','style':'default'},{'image':s3+'Elements/NameIcon/pointer1.png','style':'default'},{'image':s3+'Elements/NameIcon/bg.png','style':'default'},{'image':s3+'Elements/NameIcon/right.png','style':'default'},{'image':s3+'Elements/NameIcon/bg.gif','style':'default'},{'image':s3+'Elements/NameIcon/right.gif','style':'default'},{'image':s3+'Elements/NameIcon/background.png','style':'default'},{'image':s3+'Elements/NameIcon/left.png','style':'default'},{'image':s3+'Elements/NameIcon/left.gif','style':'default'},{'image':s3+'Elements/VariableRate/vr-bot.png','style':'default'},{'image':s3+'Elements/VariableRate/newtop.png','style':'default'},{'image':s3+'Elements/VariableRate/vr-mid.png','style':'default'},{'image':s3+'Elements/Plinths/SmallSmall.png','style':'default'},{'image':s3+'Elements/Plinths/MediumMedium.png','style':'default'},{'image':s3+'Elements/Plinths/MediumLarge_pink.png','style':'default'},{'image':s3+'Elements/Plinths/MediumLarge.png','style':'default'},{'image':s3+'Elements/Plinths/MediumSmall.png','style':'default'},{'image':s3+'Elements/Plinths/SmallSmall_pink.png','style':'default'},{'image':s3+'Elements/Plinths/MediumMedium_pink.png','style':'default'},{'image':s3+'Elements/Plinths/MediumSmall_pink.png','style':'default'},{'image':s3+'Elements/Notes/pin_left.png','style':'default'},{'image':s3+'Elements/Notes/save.png','style':'default'},{'image':s3+'Elements/Notes/close.png','style':'default'},{'image':s3+'Elements/Notes/cancel.png','style':'default'},{'image':s3+'Elements/Notes/editnote.png','style':'default'},{'image':s3+'Elements/Notes/NoteShadow.png','style':'default'},{'image':s3+'Elements/Notes/NoteBody.png','style':'default'},{'image':s3+'Elements/ShowPanel/CheckBack.png','style':'default'},{'image':s3+'Elements/ShowPanel/Board_UnCheck.png','style':'default'},{'image':s3+'Elements/ShowPanel/Board_Check.png','style':'default'},{'image':s3+'Elements/ShowPanel/SHOW_PANEL_TEMP.png','style':'default'},{'image':s3+'Elements/ShowPanel/SHOW_PANEL_TEMP_NOC.png','style':'default'},{'image':s3+'Elements/ShowPanel/olympic_on.png','style':'default'},{'image':s3+'Elements/Header/wedding.png','style':'default'},{'image':s3+'Elements/Header/hide-off.png','style':'default'},{'image':s3+'Elements/Header/hide-on.png','style':'default'},{'image':s3+'Elements/Header/shadow.png','style':'default'},{'image':s3+'Elements/Header/print-off.png','style':'default'},{'image':s3+'Elements/Header/print-on.png','style':'default'},{'image':s3+'Elements/Header/hyb_green_tick.gif','style':'default'},{'image':s3+'Elements/Header/ShowPanels.png','style':'default'},{'image':s3+'Elements/Header/hyb_grey_cross.gif','style':'default'},{'image':s3+'Elements/Header/heading.png','style':'default'},{'image':s3+'Elements/NI/hotel_on.png','style':'default'},{'image':s3+'Elements/NI/notes_on.png','style':'default'},{'image':s3+'Elements/NI/parking_on.png','style':'default'},{'image':s3+'Elements/NI/tube_on.png','style':'default'},{'image':s3+'Elements/NI/olympic_on.png','style':'default'},{'image':s3+'Elements/ICONS1/3stars.png','style':'default'},{'image':s3+'Elements/ICONS1/BB1.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM2/Small/CHAIN.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM2/Medium/CHAIN.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM2/Large/CHAIN.png','style':'default'},{'image':s3+'Elements/ICONS1/APARTMENT1.png','style':'default'},{'image':s3+'Elements/ICONS1/CHAIN_animated-spinner2.gif','style':'default'},{'image':s3+'Elements/ICONS1/5stars.png','style':'default'},{'image':s3+'Elements/ICONS1/fully_booked.gif','style':'default'},{'image':s3+'Elements/ICONS1/bbrp.png','style':'default'},{'image':s3+'Elements/ICONS1/fully_booked.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM3/Large/CHAIN.png','style':'default'},{'image':s3+'Elements/ICONS1/bbr.jpg','style':'default'},{'image':s3+'Elements/ICONS1/4stars.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Small/BB.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Small/HOSTEL.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Small/APARTMENT.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Small/CHAIN.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Medium/BB.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Medium/HOSTEL.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Medium/APARTMENT.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Medium/CHAIN.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Large/BB.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Large/HOSTEL.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Large/APARTMENT.png','style':'default'},{'image':s3+'Elements/ICONS1/ZOOM1/Large/CHAIN.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/pin_left.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/find_low.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/npinmid.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/pin_right.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/more_arrow.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/pin_back.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/pin_selector_1.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/top-sp.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/npinpoint.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/bot-spacer.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/find_main.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/topPrimary.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/menu_din_1.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/mid-spacer.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/npinright.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/npinleft.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/bot-spacer22.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/find_mid.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/find_main_shad.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/backing.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/menu_attrac.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/primary_top.png','style':'default'},{'image':s3+'Elements/_new_leftpanel_find/menu_shop_1.png','style':'default'},{'image':s3+'Elements/CATS/_CAT_Dining_MIDDLE.png','style':'default'},{'image':s3+'Elements/Filter/price_marker.png','style':'default'},{'image':s3+'Elements/Filter/LargeMain2.png','style':'default'},{'image':s3+'Elements/Filter/filter-core-1.png','style':'default'},{'image':s3+'Elements/Filter/wifi.png','style':'default'},{'image':s3+'Elements/Filter/dining.png','style':'default'},{'image':s3+'Elements/Filter/Filter_Price_background.gif','style':'default'},{'image':s3+'Elements/Filter/arrow.png','style':'default'},{'image':s3+'Elements/Filter/filter_sub_1_mid.png','style':'default'},{'image':s3+'Elements/Filter/arrow-1.png','style':'default'}];
var previouscount = 0;
var previousvalue = 0;
var activeImageLoads = new Array(preloadImageSelection.length);
for ( var j = 0 ; j < preloadImageSelection.length; j++ ) activeImageLoads[j] = false;
var imagePlacementContainer = document.createElement("div");
imagePlacementContainer.style.display = 'none';
document.body.appendChild(imagePlacementContainer);
var tCounter = 0;
/** Preload the images **/
for ( var i = 0; i < preloadImageSelection.length; i++)
{
tCounter++;
var temporaryImageHolder = document.createElement("img");
temporaryImageHolder.skinner = tCounter;//data1[i].image;
temporaryImageHolder.style.display = 'none';
temporaryImageHolder.onload = function()
{
activeImageLoads[this.skinner]=true;
if ( this.src.match("search_hotels")) setTimeout(function(){runDateSystem();},200);
}
temporaryImageHolder.src = preloadImageSelection[i].image;
imagePlacementContainer.appendChild(temporaryImageHolder);
}
Util.stack['epo'] = imagePlacementContainer;
/** Test function for image loaders **/
function runImageLoadTest()
{
if ( !Util.stack['core1'] )
{
var dimensions = Util.getDimensions();
try
{
var coreLoadElement = Util.element("div", {'zIndex':'9999999','position':'absolute', 'left':((dimensions[0]/2)-(699/2)), 'top':((dimensions[1]/2)-(251/2)), 'width':699, 'height':251},null);
var topImage = Util.element("img", {'position':'absolute', 'left':0, 'top':0},null);
var middleImage = Util.element("img", {'display':'none','position':'absolute', 'left':0, 'top':52},null);
var lowerImage = Util.element("div", {'position':'absolute', 'left':0, 'top':(52+133),'backgroundImage':'url('+s3+'Elements/Opening/lowerScreen.png)', 'width':699, 'height':67},null);
topImage.onload = function(){ this.style.display = ''; }
topImage.src = (designmods['Logo']) ? 'Images/Elements/EuroStar/upperScreen.png' : s3+'Elements/Opening/upperScreen.png';
middleImage.sessionType = isNewSession;
middleImage.onload = function(){ if ( isNewSession) this.style.display = ''; }
middleImage.src = s3+'Elements/Opening/middleScreen.jpg';
if ( !isNewSession )
{
lowerImage.style.top = 52;
}
var loader1 = Util.element("div", {'position':'absolute', 'left':129, 'top':36,'backgroundPosition':'right','backgroundImage':'url('+s3+'Elements/Opening/back_tot.png)', 'width':2, 'height':11},null);
var leftImage = Util.element("img", {'position':'absolute', 'left':0, 'top':0}, {'src':s3+' Elements/Opening/beg_tot.png'});
var loadertext = Util.element("div", {'fontFamily':'arial','fontSize':12, 'color':'#000000','position':'absolute', 'left':129, 'top':18, 'width':400, 'height':17},null);
loadertext.innerHTML = 'Loading HotelMap.com';
loader1.appendChild(leftImage);
lowerImage.appendChild(loader1);
lowerImage.appendChild(loadertext);
loader1.textItem = loadertext;
coreLoadElement.appendChild(topImage);
coreLoadElement.appendChild(middleImage);
coreLoadElement.appendChild(lowerImage);
document.body.appendChild(coreLoadElement);
coreLoadElement.pload = loader1;
Util.stack['core1']=coreLoadElement;
try { if (hybrid=='true') Util.stack['core1'].style.display = 'none'; } catch ( e_kkdj2 ){}
} catch (e2) { alert("Wee"+e2.message); }
}
var naming = 'Loading HotelMap™ application data';
var splitTimer = 250;
var numberOfActiveImages = 0;
var loaded = true;
for ( var i = 0 ; i < tCounter; i++)
{
if ( !activeImageLoads[i])
{
loaded = false;
}
else
{
numberOfActiveImages++;
var perc = Math.round((numberOfActiveImages/tCounter)*100);
Util.stack['percent_check'] = perc;
var remains = preloadImageSelection.length - numberOfActiveImages;
if ( perc > 40 ) naming = perc + '% - Loading images';
if ( perc > 75 ) naming = perc + '% - Loading preference';
if ( perc > 90 ) naming = perc + '% - Loading date system';
Util.stack['core1'].pload.style.width = (448/100)*perc;
Util.stack['core1'].pload.textItem.innerHTML = naming;
}
}
if ( numberOfActiveImages == previousvalue )
{
if ( previouscount > 23 )
{
Util.stack['preload_done'] = true;
loaded = true;
}
if ( numberOfActiveImages >= (tCounter-15))
{
Util.stack['preload_done'] = true;
loaded = true;
}
previouscount++;
}
else
{
previouscount = 0;
}
previousvalue = numberOfActiveImages;
if ( loaded )
{
Util.stack['preload_done'] = true;
//Util.stack['epo'].parentNode.removeChild(Util.stack['epo']);
try {
// Util.stack['loaderState'].parentNode.removeChild(Util.stack['loaderState']);
Util.stack['core1'].parentNode.removeChild(Util.stack['core1']);
} catch(ee){}
}
else
{
setTimeout(function(){runImageLoadTest();},250);
}
}
runImageLoadTest();
}
SystemPreloader.doFullImageLoadedCheck();
},
processAbsoluteImageRequirements:function()
{
// Preset to true - cycle images and if not loaded set to false
preRequiredValue=true;
for ( var i =0;i Talking to hotel";incOfferRate=document.createElement("div");incOfferRate.innerHTML="
Talking to hotel";incOfferRate.style.display='none';hotelElement.panelRateExc=excOfferRate;hotelElement.panelRateInc=incOfferRate;el_hotelRate.appendChild(excOfferRate);el_hotelRate.appendChild(incOfferRate);PanelContent.master.appendChild(el_hotelRate);},starInfo:function(hotelElement)
{hotelElement.starCount=parseInt(hotelElement.stars)
var el_hotelStars=document.createElement("div");el_hotelStars.className='hotel_listing_stars';var mystar=document.createElement("img");mystar.src=s3+'Elements/RightPan/p-star.png';var starsAsInt=hotelElement.starCount;if(starsAsInt>5)starsAsInt=0;for(var k=0;k";
//Util.stack.debug.innerHTML += "Left : " + parseInt(price_cover.leftSlide.style.left) + "
";
//Util.stack.debug.innerHTML += "LEft13 : " + (parseInt(price_cover.leftSlide.style.left)+13) + "
";
if ( locationX >= parseInt(price_cover.rightSlide.style.left)+25 && locationX <= parseInt(price_cover.rightSlide.style.left)+13+25 )
{
price_cover.activeSlide = price_cover.rightSlide;
price_cover.isLeft = false;
}
if ( locationX >= parseInt(price_cover.leftSlide.style.left)+25 && locationX <= parseInt(price_cover.leftSlide.style.left)+13+25 )
{
price_cover.activeSlide = price_cover.leftSlide;
price_cover.isLeft = true;
}
if ( price_cover.activeSlide )
{
price_cover.curLeft = parseInt( price_cover.activeSlide.style.left ) + 25;
window.onmousemove = this.mousemove;
document.onmousemove = this.mousemove;
}
}
/**
* Remove the mouse movement references and run a sweep on the filters to
* readjust the hotels
*/
price_cover.onmouseout = function()
{
window.onmousemove = null;
document.onmousemove = null;
this.isDown = false;
this.runSweep();
// JSON_Action_Filter.runFilterSweep();
// item.filterShown="NO";
}
price_cover.runSweep = function()
{
EventObject_MouseHandler.System_Data_Poll();
}
/**
* as above
*/
price_cover.onmouseup = function()
{
window.onmousemove = null;
document.onmousemove = null;
this.isDown = false;
this.runSweep();
// JSON_Action_Filter.runFilterSweep();
}
/**
* Handles the movement on the price sliders. It also only allows incrementals
* of 50 pounds by using a nearest method.
*/
price_cover.onmousemove = function(e)
{
e = (e)?e:window.event;
var currentLocX = e.clientX - parseInt( Util.stack['core_base'].style.left );
var movement = currentLocX - this.locationX;
var amountSpan = hotel_information.highestOffer - hotel_information.lowestOffer;
var widthSpan = this.parentNode.spanShift;
var pixelsPerPound = amountSpan / widthSpan;
var currentXPosition = (this.curLeft + movement) - 7;
// Ensure that the mouse is down
if ( this.isDown )
{
if ( this.isLeft == true && this.isLeft != null ) // Left hand slider
{
if ( (currentXPosition) >= this.parentNode.minimumLeft && (currentXPosition) <= parseInt(this.rightSlide.style.left) )
{
var currentLowPounds = Math.round(pixelsPerPound * ((currentXPosition) - this.parentNode.minimumLeft));
var price = _PriceCheck( currentLowPounds );
if ( price != null )
{
var xPositionDetermined = Math.round(( price + ( pixelsPerPound * this.parentNode.minimumLeft ) ) / pixelsPerPound);
hotel_information.price_low = price ;
Util.stack['price_low'].innerHTML = "\u00A3 " + price ;
this.activeSlide.style.left = xPositionDetermined;
this.filler.style.left = parseInt(this.leftSlide.style.left);
this.filler.style.width = parseInt(this.rightSlide.style.left) - parseInt(this.leftSlide.style.left);
}
}
}
if ( this.isLeft == false && this.isLeft != null ) // Right hand slider
{
if ( (currentXPosition) <= this.parentNode.maximumRght && (currentXPosition ) >= parseInt(price_cover.leftSlide.style.left) )
{
var currentLowPounds = Math.round(pixelsPerPound * ((currentXPosition) - this.parentNode.minimumLeft));
var price = _PriceCheck( currentLowPounds );
if ( price != null )
{
var xPositionDetermined = Math.round(( price + ( pixelsPerPound * this.parentNode.minimumLeft ) ) / pixelsPerPound);
hotel_information.price_high = price ;
Util.stack['price_high'].innerHTML = "\u00A3 " + price ;
this.activeSlide.style.left = xPositionDetermined;
this.filler.style.left = parseInt(this.leftSlide.style.left);
this.filler.style.width = parseInt(this.rightSlide.style.left) - parseInt(this.leftSlide.style.left);
}
}
}
}
}
price_div.appendChild(price_sliderLeft);
price_div.appendChild(price_sliderRght);
price_div.appendChild(price_cover);
price_div.appendChild(price_slideFill);
price_div.appendChild(price_lowest);
price_div.appendChild(price_highest);
price_div.leftSlide = price_sliderLeft;
price_div.rightSlide = price_sliderRght;
price_div.appendChild(pricesText);
majorPrice.appendChild( price_div );
core_base.appendChild(majorPrice);
function _PriceCheck( currentLowPounds )
{
var price = null;
if ( currentLowPounds > 0 && currentLowPounds < 50 ) price = 0;
if ( currentLowPounds >= 50 && currentLowPounds < 100 ) price = 50;
if ( currentLowPounds >= 100 && currentLowPounds < 150 ) price = 100;
if ( currentLowPounds >= 150 && currentLowPounds < 200 ) price = 150;
if ( currentLowPounds >= 200 && currentLowPounds < 250 ) price = 200;
if ( currentLowPounds >= 250 && currentLowPounds < 300 ) price = 250;
if ( currentLowPounds >= 300 && currentLowPounds < 350 ) price = 300;
if ( currentLowPounds >= 350 && currentLowPounds < 400 ) price = 350;
if ( currentLowPounds >= 400 && currentLowPounds < 450 ) price = 400;
if ( currentLowPounds >= 450 && currentLowPounds < 490 ) price = 450;
if ( currentLowPounds >= 490 ) price = 500;
return price;
}
// --
// RIGHT PANEL TABS - ONE IS HOTELS AND THE OTHER IS FAVORITES
// --
var right_panel_tab = document.createElement("div");
right_panel_tab.style.backgroundImage = 'url('+s3+'Elements/RightPan/rp-tab-hot-on.png)';
right_panel_tab.style.backgroundRepeat = 'no-repeat';
right_panel_tab.style.width = 236
right_panel_tab.style.height = 34;
right_panel_tab.selectedElement = "HOTEL";
core_base.appendChild(right_panel_tab);
totalPanelHeight = totalPanelHeight - 32;
totalPanelHeight = totalPanelHeight - 26; // Drag Panel.
Util.stack['right_panel_tab'] = right_panel_tab ;
right_panel_tab.onmousedown = function()
{
this.tabDown();
}
right_panel_tab.tabFavoriteMaker = function()
{
this.selectedElement = 'HOTEL';
this.tabDown();
}
right_panel_tab.tabHotelsTabOn = function()
{
this.selectedElement = 'FAVORITES';
this.tabDown();
}
right_panel_tab.tabDown = function()
{
var selectionType = this.selectedElement;
if ( selectionType == "HOTEL" )
{
featureWatcher.favoriteTabSelected = 1;
EventObject_MouseHandler.favoritesOnly = true;
EventObject_MouseHandler.System_Data_Poll();
right_panel_tab.style.backgroundImage = 'url('+s3+'Elements/RightPan/rp-tab-fav-on.png)';
Util.stack['hotel_tab'].style.display = 'none';
Util.stack['fav_tab'].style.display = '';
this.selectedElement = 'FAVORITE';
if ( Util.stack['fav_tab'].childNodes.length == 0 )
{
var noticePoint = document.createElement("div");
noticePoint.className = 'no_favorites';
noticePoint.style.padding = '9';
noticePoint.innerHTML = 'You do not currently have any favourites, switch back to the hotels on map tab.';
Util.stack['noticePoint'] = noticePoint;
Util.stack['fav_tab'].appendChild(noticePoint);
}
}
else
{
try
{
if ( Util.stack['noticePoint'] ) Util.stack['noticePoint'].parentNode.removeChild(Util.stack['noticePoint']);
} catch ( e2asjoei ) { }
EventObject_MouseHandler.favoritesOnly = false;
EventObject_MouseHandler.System_Data_Poll();
right_panel_tab.style.backgroundImage = 'url('+s3+'Elements/RightPan/rp-tab-hot-on.png)';
Util.stack['hotel_tab'].style.display = '';
Util.stack['fav_tab'].style.display = 'none';
this.selectedElement = 'HOTEL';
}
}
// --
// FAVORITE CONTAINER WHICH HOLDS FAVOTITE HOTEL PANEL ITEMS
// --
var favorite_container = document.createElement("div") ;
favorite_container.className = 'NEW_RIGHTPANEL_Base';
favorite_container.style.height = totalPanelHeight;
favorite_container.style.width = 234 ;
favorite_container.style.paddingLeft = '4px';
favorite_container.id = 'hotel_tab';
favorite_container.style.display = 'none';
favorite_container.style.overflow = 'hidden';
Util.stack['fav_tab'] = favorite_container;
core_base.appendChild( favorite_container ) ;
/** Hotel Holder **/
var hotel_container = document.createElement("div") ;
hotel_container.className = 'NEW_RIGHTPANEL_Base';
hotel_container.style.height = totalPanelHeight;
hotel_container.style.width = 234 ;
hotel_container.style.paddingLeft = '4px';
hotel_container.id = 'hotel_tab';
hotel_container.style.overflow = 'hidden';
hotel_container.onmouseover = function()
{
if (window.addEventListener)
{
window.removeEventListener('DOMMouseScroll', EventObject_MouseWheel.wheelActive , false)
window.addEventListener('DOMMouseScroll', EventObject_MouseWheel.scrollHotelList , false);
}
window.onmousewheel = document.onmousewheel = null;
window.onmousewheel = document.onmousewheel = EventObject_MouseWheel.scrollHotelList;
}
/** Scroll Elements which attach themsevles to the hotel and favorite panbels **/
var scroll_lot = document.createElement("div");
scroll_lot.style.width = 12;
scroll_lot.style.border = '1px solid #C0C0C0';
scroll_lot.style.height = parseInt(hotel_container.style.height)-14;
scroll_lot.style.backgroundColor = '#FFFFFF';
scroll_lot.style.left = parseInt(hotel_container.style.width) -20;
scroll_lot.style.top = originalHeight-totalPanelHeight -20;
scroll_lot.style.position = 'absolute';
scroll_lot.style.zIndex = '99999999';
scroll_lot.style.overflow = 'hidden';
Util.setTrans( scroll_lot, 60);
scroll_lot.style.display = 'none';
Util.stack['scroll_lot'] = scroll_lot;
var scroll_inner = document.createElement("div");
scroll_inner.style.position = 'absolute';
scroll_inner.style.left = 1;
scroll_inner.style.top = 1;
scroll_inner.style.width = 10;
scroll_inner.style.backgroundColor = '#000000';
scroll_inner.style.height = 15;
scroll_lot.appendChild(scroll_inner);
Util.stack['scroll_inner'] = scroll_inner;
/** Movement actions for hotel and favorite containers **/
hotel_container.onmousedown = function( event )
{
var scroll_height = (parseInt( Util.stack['scroll_lot'].style.height ) / parseInt(Util.stack['hotel_tab'].scrollHeight)) * 100;
var height_size = ( parseInt(Util.stack['scroll_lot'].style.height) / 100 ) * scroll_height;
Util.stack['scroll_inner'].style.height = height_size;
this.appendChild(Util.stack['scroll_lot']);
event = ( event ) ? event : window.event ;
var startDate = new Date();
JSON_Element_RightPanel.start_date = startDate.getTime();
JSON_Element_RightPanel.current_scroll_top = parseInt(Util.stack.hotel_tab.scrollTop);
JSON_Element_RightPanel.current_mouse_top = event.clientY;
window.onmousemove = this.trackscroll;
document.onmousemove = this.trackscroll;
JSON_Element_RightPanel.active_selection = true;
if ( !Util.stack.movementClient )
{
var movementClient = document.createElement("div") ;
movementClient.style.width = this.style.width;
movementClient.style.height = this.style.height;
movementClient.style.left = 0;
movementClient.style.top = this.scrollTop;
movementClient.style.position = 'absolute';
movementClient.style.backgroundColor = '#ffffff';
movementClient.style.zIndex = '999999999';
movementClient.style.cursor = 'pointer';
movementClient.mmm = function()
{
///this.parentNode.appleslide();
this.parentNode.removeChild(this);
Util.stack['movementClient'] = false;
JSON_Element_RightPanel.active_selection = false;
window.onmousemove = null;
document.onmousemove = null;
Util.stack['scroll_lot'].style.display = 'none';
event.preventDefault() ;
try{ event.stopPropagation(); } catch (e1) {}
try{ event.cancelBubble(); } catch (e2) {}
return false;
}
movementClient.onmouseout = function(){ this.mmm(); }
Util.setTrans( movementClient, 0 ) ;
this.appendChild( movementClient ) ;
Util.stack['movementClient'] = movementClient ;
}
event.preventDefault() ;
try{ event.stopPropagation(); } catch (e1) {}
try{ event.cancelBubble(); } catch (e2) {}
return false;
}
hotel_container.triggerMouseUp = hotel_container.onmouseup = function()
{
if ( Util.stack.movementClient )
{
Util.stack['scroll_lot'].style.display = 'none';
this.removeChild( Util.stack['movementClient'] );
Util.stack['movementClient'] = false;
JSON_Element_RightPanel.active_selection = false;
window.onmousemove = null;
document.onmousemove = null;
}
}
hotel_container.trackscroll = function(e)
{
if ( JSON_Element_RightPanel.active_selection )
{
Util.stack['scroll_lot'].style.display = '';
e=(e)?e:window.event;
var curTop = parseInt(Util.stack.hotel_tab.scrollTop);
var mseTop = e.clientY;
var mouse_scrolling_top = (JSON_Element_RightPanel.current_mouse_top - e.clientY);
Util.stack.hotel_tab.scrollTop = JSON_Element_RightPanel.current_scroll_top + mouse_scrolling_top;
Util.stack.debug.innerHTML = Util.stack.hotel_tab.scrollTop;
var scrollPosition = ( parseInt(Util.stack['hotel_tab'].scrollTop) / parseInt(Util.stack['hotel_tab'].scrollHeight) ) * 100 ;
var topPoint = (( parseInt( Util.stack['scroll_lot'].style.height ) / 100 ) * scrollPosition );
Util.stack['scroll_inner'].style.top = topPoint;
}
}
/*** Favorites Tab Scroll Mechanism - Yuk **/
favorite_container.onmousedown = function( event )
{
var scroll_height1 = (parseInt( Util.stack['scroll_lot'].style.height ) / parseInt(Util.stack['fav_tab'].scrollHeight)) * 100;
var height_size = ( parseInt(Util.stack['scroll_lot'].style.height) / 100 ) * scroll_height1;
Util.stack['scroll_inner'].style.height = height_size;
this.appendChild(Util.stack['scroll_lot']);
event = ( event ) ? event : window.event ;
var startDate = new Date();
JSON_Element_RightPanel.start_date = startDate.getTime();
JSON_Element_RightPanel.current_scroll_top = parseInt(Util.stack.fav_tab.scrollTop);
JSON_Element_RightPanel.current_mouse_top = event.clientY;
window.onmousemove = this.trackscroll;
document.onmousemove = this.trackscroll;
JSON_Element_RightPanel.active_selection = true;
if ( !Util.stack.movementClient )
{
var movementClient = document.createElement("div") ;
movementClient.style.width = this.style.width;
movementClient.style.height = this.style.height;
movementClient.style.left = 0;
movementClient.style.top = this.scrollTop;
movementClient.style.position = 'absolute';
movementClient.style.backgroundColor = '#ffffff';
movementClient.style.zIndex = '999999999';
movementClient.style.cursor = 'pointer';
movementClient.onmouseout = function()
{
this.parentNode.appleslide();
this.parentNode.removeChild(this);
Util.stack['movementClient'] = false;
JSON_Element_RightPanel.active_selection = false;
window.onmousemove = null;
document.onmousemove = null;
Util.stack['scroll_lot'].style.display = 'none';
event.preventDefault() ;
try{ event.stopPropagation(); } catch (e1) {}
try{ event.cancelBubble(); } catch (e2) {}
return false;
}
Util.setTrans( movementClient, 0 ) ;
this.appendChild( movementClient ) ;
Util.stack['movementClient'] = movementClient ;
}
event.preventDefault() ;
try{ event.stopPropagation(); } catch (e1) {}
try{ event.cancelBubble(); } catch (e2) {}
return false;
}
favorite_container.onmouseup = function()
{
if ( Util.stack.movementClient )
{
Util.stack['scroll_lot'].style.display = 'none';
this.removeChild( Util.stack['movementClient'] );
Util.stack['movementClient'] = false;
JSON_Element_RightPanel.active_selection = false;
window.onmousemove = null;
document.onmousemove = null;
}
}
favorite_container.trackscroll = function(e)
{
if ( JSON_Element_RightPanel.active_selection )
{
Util.stack['scroll_lot'].style.display = '';
e=(e)?e:window.event;
var curTop = parseInt(Util.stack.fav_tab.scrollTop);
var mseTop = e.clientY;
var mouse_scrolling_top = (JSON_Element_RightPanel.current_mouse_top - e.clientY);
Util.stack.fav_tab.scrollTop = JSON_Element_RightPanel.current_scroll_top + mouse_scrolling_top;
var scrollPosition = ( parseInt(Util.stack['fav_tab'].scrollTop) / parseInt(Util.stack['fav_tab'].scrollHeight) ) * 100 ;
var topPoint = (( parseInt( Util.stack['scroll_lot'].style.height ) / 100 ) * scrollPosition );
Util.stack['scroll_inner'].style.top = topPoint;
}
}
/** Ends -- **/
/** Append the hotel containing element to the base system **/
Util.stack['hotel_tab'] = hotel_container;
core_base.appendChild( hotel_container ) ;
/** The lower blue drag panel on the right pabel **/
var drag_panel = document.createElement("div");
drag_panel.style.backgroundImage = 'url('+s3+'Elements/RightPan/rp-drag.png)';
drag_panel.style.backgroundRepeat = 'no-repeat';
drag_panel.style.width = 236;
drag_panel.style.height = 26;
Util.stack['drag_icon_rightpanel'] = drag_panel;
core_base.appendChild( drag_panel ) ;
/** Append the main core enclosure to the system **/
Layers.coreElement.appendChild( core_base ) ;
Util.stack['core_base'] = core_base;
JSON_Element_RightPanel.ipad_movement_functionality();
/** Accomodation Loading Notice on the right panel on first start **/
var accommodationLoadingElement = document.createElement("div");
accommodationLoadingElement.style.padding = '5';
accommodationLoadingElement.style.fontFamily = 'verdana';
accommodationLoadingElement.style.fontSize = '11';
accommodationLoadingElement.style.textAlign='center';
accommodationLoadingElement.innerHTML = '
Please wait whilst we connect to London\'s leading hotels, apartments, backpacker hostels and bed & breakfasts.
';
accommodationLoadingElement.style.display = 'none';
Util.stack['right_pan_spin'] = accommodationLoadingElement;
hotel_container.accommodationLoadingElement = accommodationLoadingElement;
hotel_container.appendChild(accommodationLoadingElement);
//alert("IPAD: " + browser_ipad);
try{
if ( browser_ipad == '1' && 2==1 )
{
core_base.style.display = 'none';
right_panel_top.style.display = 'none';
core_base.style.left = dims[0];
try {
setTimeout(function(){ Util.stack.core_base.slideShut(); } ,4000 );
} catch ( exception ){}
}}catch(ekjsd){}
}
}
/*JSON_Element_RightPanel.init() ;*/
// $Id: JSON_Element_Overview.php,v 1.22 2010/08/06 13:47:40 james Exp $
var JSON_Element_Overview = {
/***
* Overview (top left) block construction. Shadow, map and overview box
*/
run : function()
{
var overviewElement = document.createElement("div");
overviewElement.style.position = 'absolute';
overviewElement.style.left = 0;
overviewElement.style.top = 0;
overviewElement.style.width = 160;
overviewElement.style.height = 124;
overviewElement.style.backgroundImage = 'url('+s3+'Elements/Overview/overview-housing.png)';
var internalOverview = document.createElement("div");
internalOverview.style.position = 'absolute';
internalOverview.style.overflow = 'hidden';
internalOverview.style.left = 7;
internalOverview.style.top = 4;
internalOverview.style.width = 150;
internalOverview.style.height = 112;
internalOverview.style.border = '0px solid #000000';
overviewElement.appendChild(internalOverview);
var internalMap = document.createElement("img");
internalMap.src = s3+'Elements/Overview/east-end-overview3.jpg?d='+Math.random();
internalMap.style.position = 'absolute';
internalMap.style.left = 0;
internalMap.style.top = 0;
internalOverview.appendChild(internalMap);
overviewElement.map = internalMap;
overviewElement.int = internalOverview;
var box = document.createElement("div");
box.style.position = 'absolute';
box.style.left = 0;
box.style.top =0 ;
box.style.width = 10;
box.style.height = 10;
box.style.border = '1px solid #000000';
box.style.backgroundColor = '#cccccc';
Util.setTrans(box,50);
internalOverview.appendChild(box);
overviewElement.box = box;
Util.stack['LEFTPANEL0'].appendChild(overviewElement);
Util.stack['ov'] = overviewElement;
var navPane = document.createElement("div");
navPane.style.position = 'absolute';
navPane.style.left = 7;
navPane.style.top = 4;
navPane.style.width = 150;
navPane.style.height = 112;
navPane.style.zIndex = 999999;
navPane.style.backgroundColor = '#000000';
Util.setTrans(navPane,5);
Util.stack['navpane'] = navPane;
overviewElement.appendChild(navPane);
navPane.style.cursor = 'pointer';
navPane.box = box;
navPane.onmouseup = function(e)
{
var map = this.parentNode.map;
var curLeft = Math.abs(parseInt(map.style.left));
var curTop = Math.abs(parseInt(map.style.top));
var x = e.clientX - Util.findPosX(this);
var y = e.clientY - Util.findPosY(this);
var ratioX = 480 / Zoom.limiters[Zoom.level].x2;
var ratioY = 328 / Zoom.limiters[Zoom.level].y2;
x = (curLeft + x) / ratioX;
y = (curTop + y) / ratioY;
Util.slide(x,y);
}
},
/***
* Process the position of the currently viewable map in the upper left corner (overview map)
* This is an event function which is called by the MouseMove management function
*/
processPosition : function( override )
{
if ( EventObject_MouseHandler.mouseDown || override)
{
var overviewCore = Util.stack['ov'];
var internal = overviewCore.int;
var ovMap = overviewCore.map;
var box = overviewCore.box;
if ( ovMap )
{
var ratioX = 480 / Zoom.limiters[Zoom.level].x2;
var ratioY = 328 / Zoom.limiters[Zoom.level].y2;
var currentCentreMapX = Math.abs(parseInt(Util.stack.map.style.left)) + (parseInt( Layers.coreElement.style.width )/2);
var currentCentreMapY = Math.abs(parseInt(Util.stack.map.style.top)) + (parseInt( Layers.coreElement.style.height )/2);
var newCentreX = (currentCentreMapX * ratioX)-(154/2);
var newCentreY = (currentCentreMapY * ratioY)-(114/2);
ovMap.style.left = 0-newCentreX;
ovMap.style.top = 0-newCentreY;
var boxWidth = parseInt( Layers.coreElement.style.width ) * ratioX;
var boxHeight = parseInt( Layers.coreElement.style.height ) * ratioY;
box.style.left = (154/2) - (boxWidth/2);
box.style.top = (114/2) - (boxHeight/2);
box.style.width = boxWidth;
box.style.height = boxHeight;
}
}
}
}
/*
JSON_Element_Overview.run();
JSON_Element_Overview.processPosition(true);
Util.stack['overview'] = JSON_Element_Overview;
*/
// +-------------------------------------------------------------------------------------+
// | LondonTown.com HotelMap - Version 2.0 |
// | Copyright (C) 2008, All Rights Reserved, Globalvision Media |
// +-------------------------------------------------------------------------------------+
// | File: JSON_Element_Zoom.php |
// | Vers: $Id: JSON_Element_Zoom.php,v 1.24 2010/05/04 13:11:36 james Exp $ |
// | Auth: James Holden (james_holden@londonmarketing.com) |
// | Last: $Auth: $ |
// | Desc: Creates the top left ZOOM slider bar on the map.
// +-------------------------------------------------------------------------------------+
// This is now slightly modified to fit as an "object" that slots into LEFTPANEL which is
// created in Layers.
var JSON_Element_Zoom = {
slider_height : 60,
slider_left : 185,
slider_ratio : 0,
slider_top : 0,
/****
* addZoomLevelElement
* @desc add the zoom level middle for scale etc
*/
addZoomLevelElement : function()
{
var zoomElement = Util.addElement("zoomElEnclosure", "div", "", 28, 70, 160, 25, "", true, {'zIndex':'70','cursor':'pointer','backgroundImage':'url('+s3+'Elements/Zoom/zoom_scroll.png)'});
Util.stack['ZOOMD']=zoomElement;
zoomElement.onmousedown = function(e)
{
e = (e) ? e : window.event;
if (e)
{
var y = e.clientY;
y = y - (parseInt(Util.stack['SPLIT'].style.top) + 28);
y = parseInt(this.style.height) - y;
y = Math.round( y / JSON_Element_Zoom.slider_ratio ) ;
if ( y >= 8 ) y = 7;
if ( y > Zoom.level ) { Zoom.zoomIn(y); } else { Zoom.zoomOut(y); }
Util.stack.slider.style.top = JSON_Element_Zoom.slider_height-(Zoom.level * JSON_Element_Zoom.slider_ratio);
}
}
Util.stack['LEFTPANEL0'].appendChild( zoomElement );
return zoomElement;
},
/*****
* addZoomBottom
* @desc Adds the zoom out icon (top left)
*/
addZoomBottom : function()
{
var zoomElementBottom = Util.addElement("zoomElBottom","div","", 28,29,160,95,"",true,{'cursor':'pointer', 'zIndex':'70','backgroundImage':'url('+s3+'Elements/Zoom/zoom_minus.png)'});
zoomElementBottom.onmousedown = function()
{
featureWatcher.zoomingUsed = 1;
if ( Zoom.level > 0 && !Zoom.zoom_active )
{
Zoom.zoomOut();
Util.stack.slider.style.top = JSON_Element_Zoom.slider_height-(Zoom.level * JSON_Element_Zoom.slider_ratio);
}
}
Util.stack['LEFTPANEL0'].appendChild( zoomElementBottom );
Util.stack['ZOOMC']=zoomElementBottom;
Util.kill(zoomElementBottom);
},
addZoomTop : function()
{
var zoomElementTop = Util.addElement("zoomElTop","div","",28,25, 160,0, "", true, {'cursor':'pointer','backgroundImage':'url('+s3+'Elements/Zoom/zoom_plus.png)'});
zoomElementTop.onmousedown = function()
{
featureWatcher.zoomingUsed = 1;
if ( Zoom.level < Zoom.limiters.length-1 && !Zoom.zoom_active )
{
Zoom.zoomIn();
Util.stack.slider.style.top = JSON_Element_Zoom.slider_height-(Zoom.level * JSON_Element_Zoom.slider_ratio);
}
}
Util.stack['LEFTPANEL0'].appendChild( zoomElementTop );
Util.stack['ZOOMB']=zoomElementTop;
Util.kill(zoomElementTop);
},
addSliderElement : function(zoomElement)
{
var slider = Util.addElement("sliderEl", "div", "", 18,10,3,(JSON_Element_Zoom.slider_height-(Zoom.level * JSON_Element_Zoom.slider_ratio)),"",true,{'backgroundRepeat':'no-repeat','backgroundImage':'url('+s3+'Elements/Zoom/zoom_slider.gif)'});
Util.stack['ZOOMA']=slider;
zoomElement.appendChild( slider );
Util.stack['slider'] = slider;
Util.kill(slider,top);
},
run : function()
{
JSON_Element_Zoom.slider_ratio = JSON_Element_Zoom.slider_height / (Zoom.limiters.length-1);
var zoomElement = JSON_Element_Zoom.addZoomLevelElement();
JSON_Element_Zoom.addSliderElement( zoomElement ) ;
JSON_Element_Zoom.addZoomBottom();
JSON_Element_Zoom.addZoomTop();
Util.kill(zoomElement);
}
}
/*
JSON_Element_Zoom.run();
Util.stack['zoomer'] =JSON_Element_Zoom;
*/
// +-------------------------------------------------------------------------------------+
// | LondonTown.com HotelMap - Version 2.0 |
// | Copyright (C) 2008, All Rights Reserved, Globalvision Media |
// +-------------------------------------------------------------------------------------+
// | File: Resizer.Main.js.php |
// | Vers: $Id: Resizer.Main.js.php,v 1.26 2010/08/06 13:47:43 james Exp $ |
// | Auth: James Holden (james_holden@londonmarketing.com) |
// | Last: $Auth: $ |
// | Desc: Handles the resizing of the various elements if the browser shape is changed. |
// +-------------------------------------------------------------------------------------+
var resizing = {} ;
resizing.handler =
{
run : function()
{
// Dimensions please.
var dimensions = Util.getDimensions() ;
// Move the Call Centre Left Item
try
{
Util.stack['call_centre'].style.top = dimensions[1] - 40;
} catch ( callCentreMoveException ){}
// Lets adjust the right hand panel.
try {
Util.stack['myContainerOlympics'].style.top = ( dimensions[1] - 100 ) + "px";
} catch ( noOlympicPoint ){}
try
{
if ( Util.stack['searchbox'] )
{
Util.stack['searchbox'].style.top = (dimensions[1]/2) - (parseInt(Util.stack['searchbox'].style.height)/2);
Util.stack['searchbox'].style.left = (dimensions[0]/2) - (670/2);
}
}
catch ( exceptionCal ){
}
if ( Util.stack['core_base'] )
{
Util.stack['core_base'].style.left = dimensions[0] - 234; // Auto Adjust for width changes to the pabel
var currentHeight = parseInt( Util.stack['core_base'].style.height ) ;
Util.stack['core_base'].style.height = dimensions[1] - 83; // Auto adjust for the height changes
var newHeight = parseInt( Util.stack['core_base'].style.height );
// Difference is used to determine how much to add or take off the right hander panels.
var difference = newHeight - currentHeight;
Util.stack.hotel_tab.style.height = parseInt( Util.stack.hotel_tab.style.height ) + difference;
Util.stack.fav_tab.style.height = parseInt( Util.stack.fav_tab.style.height ) + difference;
Util.stack.scroll_lot.style.height = parseInt(Util.stack.hotel_tab.style.height)-14;
if ( Util.stack['popout'] )
{
try{
Util.stack['popout'].parentNode.removeChild(Util.stack['popout']);
Util.stack['popout'] = null;
} catch (e1){}
}
}
if ( Util.stack['dMessage'])
{
Util.stack['dMessage'].style.top = dimensions[1]-31;
Util.stack['dMessage'].d1.style.top = dimensions[1]-30;
}
try
{
//Print Map Resize
var centralX = ( dimensions[0] / 2 ) - (Util.stack['print_core'].sysWidth / 2);
var centralY = ( dimensions[1] / 2 ) - (Util.stack['print_core'].sysHeight / 2);
Util.stack['print_core'].transPanel.style.left = centralX;
Util.stack['print_core'].transPanel.style.top = centralY+25;
Util.stack['print_core'].internalImage.style.left = (dimensions[0]/2) - (376/2) ;
Util.stack['print_core'].internalImage.style.top = ( parseInt( Util.stack['print_core'].transPanel.style.top ) + Util.stack['print_core'].sysHeight ) - 200;
} catch ( printMapMoverException ) {
//alert("Some Shit Error: " + printMapMoverException.message);
}
// Top Heading Panel
try { Util.stack.header_.style.width = dimensions[0]; } catch(Eol){}
Layers.coreElement.style.width = dimensions[0];
Layers.coreElement.style.top = dimensions[1];
Util.stack.dat.style.width = dimensions[0];
Util.stack.dat.style.height = dimensions[1];
Util.stack.black.style.top = 0;
Util.stack.black.style.left = 0;
Util.stack.black.style.width = dimensions[0];
Util.stack.black.style.height = dimensions[1];
try { Util.stack.loadingimageroot.style.top = dimensions[1]-50;} catch(Eok){}
try
{
Util.stack['feedback_button'].style.left = dimensions[0] - 310;
Util.stack['TorchAMap'].style.left = dimensions[0] - 107;
//Util.stack['email_icon'].style.left = dimensions[0] - 174;
Util.stack['show_panel_icon'].style.left = dimensions[0] - 18;
Util.stack['show_panel_icon_alter'].style.left = dimensions[0] - 107;
//Util.stack['aboutMap'].style.left = dimensions[0] - 307;
Util.stack['printMapIcon'].style.left = dimensions[0] - 175;
Util.stack['printMapIcon'].waitImage.style.left = dimensions[0] - 175;
Util.stack['curicon'].style.left = dimensions[0] - 238;
Util.stack['curicon'].waitImage.style.left = dimensions[0] - 238;
} catch(e1){
//alert("Exception in top level movement: " + e1.message);
}
try {
Layers.coreElement.style.width = dimensions[0];
Layers.coreElement.style.height = dimensions[1];
} catch(e2){}
try {
Util.stack.blacknote.style.width = dimensions[0];
Util.stack.blacknote.style.top = (dimensions[1] / 2 ) - 80;
} catch(e3){}
if ( Util.stack['noticeie'] )
{
Util.stack.noticeie.style.left = (dimensions[0]/2) - (376/2) ;
Util.stack.noticeie.style.top = dimensions[1] - 69;
}
loadImages.process();
loadImages.doImages();
EventObject_MouseHandler.System_Data_Poll();
if ( Util.stack['photo_montage_backing'] )
{
try { Util.stack['waitGallery'].parentNode.removeChild(Util.stack['waitGallery']); } catch ( e1 ) {}
try { Util.stack['photo_montage_back'].parentNode.removeChild(Util.stack['photo_montage_back']); } catch ( e2 ) {}
try { Util.stack['photo_montage_back1'].parentNode.removeChild(Util.stack['photo_montage_back1']); } catch ( e3 ) {}
try { Util.stack['photo_montage_nav'].parentNode.removeChild(Util.stack['photo_montage_nav']); } catch ( e4 ) {}
try { Util.stack['photo_montage_backing'].parentNode.removeChild(Util.stack['photo_montage_backing']); } catch ( e5 ) {}
try { Util.stack['photo_montage_mouse'].parentNode.removeChild(Util.stack['photo_montage_mouse']); } catch ( e6 ){}
try { Util.stack['photo_montage_nav1'].parentNode.removeChild(Util.stack['photo_montage_nav1']); } catch ( e6 ){}
try { Util.stack['pintroImage'].parentNode.removeChild(Util.stack['pintroImage']); } catch ( e6 ){}
Util.stack['photo_montage_backing']=null;
Layers.switchBlack(false);
Util.stack['TorchAMap'].ranger();
}
try
{
Util.stack['limages'].style.left = dimensions[0]-460;
} catch (ehuj){}
}
}
// +-------------------------------------------------------------------------------------+
// | LondonTown.com HotelMap - Version 2.0 |
// | Copyright (C) 2008, All Rights Reserved, Globalvision Media |
// +-------------------------------------------------------------------------------------+
// | File: Dates.js |
// | Vers: $Id: Dates.js,v 1.17 2010/05/04 13:11:37 james Exp $ |
// | Auth: James Holden (james_holden@londonmarketing.com) |
// | Last: $Auth: $ |
// | Desc: Processes date based information for use within the hotelsearch system |
// +-------------------------------------------------------------------------------------+
var DataSets =
{
// Holder for month conversions from int to string
Months : Array("", "January","February","March","April","May","June","July","August","September","October","November","December"),
/**
* getEnding
* @param day int
* @return char2 - day ending
* @desc Obtains the correct ending to a day
*/
getEnding : function( day )
{
day = parseInt(day);
var ending = 'th';
if ( day <= 3 || day == 21 || day == 22 || day == 23 || day == 31)
{
switch (day)
{
case 1: ending = 'st'; break;
case 2: ending = 'nd'; break;
case 3: ending = 'rd'; break;
case 21: ending = 'st'; break;
case 22: ending = 'nd'; break;
case 23: ending = 'rd'; break;
case 31: ending = 'st'; break;
}
}
return ending;
},
/**
* populate
* @param name string
* @param value string
* @desc populate commerce_dates with a value
*/
populate : function( name, value )
{
commerce_dates[name]=value;
},
/**
* populateHotelPanel
* @desc Populate the system view with the correct data informaiton
*/
populateHotelPanel : function()
{
var date_arrival = Util.stack['DATE_VIEW'];
var date_nights = Util.stack['DATE_NIGHTS'];
var date_rooms = Util.stack['DATE_ROOMS'];
var date_adults = Util.stack['DATE_ADULTS'];
var date_children = Util.stack['DATE_CHILDREN'];
var date_string = commerce_dates['ARRIVAL_MONTH_YEAR'];
date_string = date_string.split("-");
date_arrival.innerHTML = commerce_dates['ARRIVAL_DAY']+""+DataSets.getEnding(commerce_dates['ARRIVAL_DAY'])+" "+DataSets.Months[date_string[0]]+" "+date_string[1];
Util.stack['DATE_NIGHTS'].innerHTML = commerce_dates['NUM_NIGHTS'];
Util.stack['DATE_ROOMS'].innerHTML = commerce_dates['NUM_ROOMS'];
Util.stack['DATE_ADULTS'].innerHTML = commerce_dates['NUM_ADULTS'];
Util.stack['DATE_CHILDREN'].innerHTML = commerce_dates['NUM_CHILDREN'];
},
/**
* get
* @param id string
* @return string - value of commerce_dates
*/
get : function(id)
{
return commerce_dates[id];
}
};
// We will auto fill the commerce_dates variable with the correct information
DataSets.populate("ARRIVAL_DAY", "11") ;
DataSets.populate("ARRIVAL_MONTH_YEAR", "2-2012") ;
DataSets.populate("NUM_NIGHTS", "1") ;
DataSets.populate("NUM_ROOMS", "1") ;
DataSets.populate("NUM_ADULTS", "2") ;
DataSets.populate("NUM_CHILDREN", "0") ;
// Dates END - jh
function JSON_Commerce_HotelFeed()
{
var data = [];
var commerceStack = null;
var myHotelPanel = null;
this.run = function(json)
{
try { prometric.viewedRates = true; } catch ( e ) {}
data = json;
commerceStack = Util.stack.commerce; // Reference to the commerce stack which holds hotel info on the view window
myHotelPanel = Util.stack.hotel_tab; // Reference to the hotel tab on the right panel
var hotel_base = document.createElement("div"); // Base node which contains hotel information
hotel_base.style.position = 'absolute'; // Ensure position
var hotel_icon_on_map = document.createElement("img"); // Hotel Icon Image Reference
hotel_icon_on_map.style.position = 'absolute'; // Ensure Position
hotel_icon_on_map.style.zIndex = 1; // Index ensures it sits above ..
if ( data.length > 0 ) // We have results
{
var hotelsInMe = new Array(); // This stores the collection of hotels we are creating for faster reference in other parts
for ( var i = 0, dh; dh = data[i]; i++ ) // // Cycle the results
{
var active = true;
if ( invalids && invalids.length > 0 )
{
for ( var t = 0; t= 90) { hotel_information.surveyCount++; base_clone.survey =base_clone.myfilters.survey; }
}
// Create the counts for the numbers in the filter popout..
if ( dh.type == 'APARTMENT' ) hotel_information.apartmentCount++;
if ( dh.type == 'INDEPENDENT') hotel_information.independentCount++;
if ( dh.type == 'HOSTEL') hotel_information.hostelCount++;
if ( dh.type == 'CHAIN') hotel_information.hotelCount++;
if ( dh.type != 'CHAIN' && dh.type != 'APARTMENT' && dh.type != 'INDEPENDENT' && dh.type != 'HOSTEL' ) hotel_information.hostelCount++;
commerceStack.appendChild(base_clone);
} catch( insertHotelError){
}
}
} // end for data cycle
commerceStack.hotelsInMe = hotelsInMe; // Create a reference to the hotels int he system here.
} // end if data
this.data = null;
this.myfilters = null;
try
{
if (Util.stack['venue_icon_reference'] && __collisionDetectionRun==0)
{
setTimeout(
function()
{
try { if ( Util.stack['eventBubbleIcon'].multiIcon == 0 ) JSON.Load("PHP/Image/eventSystemIcon.php?collisionDetection=true&venueSize=1&l1="+hotelenc+"&jsWidth=true&l2=&"); } catch ( eeeeee ) {}
}, 2000
);
__collisionDetectionRun = 1;
}
} catch(eol){}
} // end function
} // end class
function JSON_Commerce_HotelSearch()
{
var data = [];
var collection = new Array();
var commerceStack = null;
var myHotelPanel = null;
var df = null;
this.getLength = function()
{
return data.length;
}
this.run = function(json)
{
data = json;
commerceStack = Util.stack.commerce;
myHotelPanel = Util.stack.hotel_tab;
df = document.createDocumentFragment();
if ( data.length > 0 && commerceStack.hotelsInMe.length > 0) // Ensure we have result data for pricing and then hotels from the base feed in the system
{
//if (!(myHotelPanel.currentEntry)) myHotelPanel.currentEntry = 0; // No ide what this is for.
for ( var i = 0 ; i < data.length ; i++ ) // Go through the results for this hotel
{
var data_element = data[i]; // Single hotel response
var hotelElement = commerceStack.hotelsInMe[data_element.base]; // Obtain the hotel from the commerce stack
if (hotelElement && !hotelElement.bookingURL && !hotelElement.taxView && data_element.searchResults.length > 0 ) // Do we have a refernce to the element AND search results?
{
icon.manager.whichicon( hotelElement.hotelIcon, "PRICE", hotelElement.subtype, hotelElement.stars, hotelElement.features.totalbedrooms );
if ( !hotelElement.eventMode ) hotelElement.filterShown = "YES";
hotelElement.enablePriceChange = true;
try // #00010
{
Util.stack.hotel_tab.removeChild(Util.stack.fullyBooked[hotelElement.id]);
} catch ( exceptionOnRemoveItem ) {}
hotelElement.searchResults = data_element.searchResults; // Search Results Listing
/** Ensure the pricing is rounding high **/
hotelElement.lowestOffer = Math.round(data_element.lowestPrice); //parseInt(data_element.lowestPrice); // Lowest offer rate
hotelElement.incTaxLowest = Math.round(data_element.lowestPrice) + ((parseInt(data_element.lowestPrice)/100)*20); //parseInt(data_element.lowestPrice) + ((parseInt(data_element.lowestPrice)/100)*17.5);
hotelElement.bookingURL = data_element.bookingURL; // Booking URL to launch!
hotelElement.chainName = data_element.chnm; // Chain Name
hotelElement.hotelAddress = data_element.addr; // Address of hotel
hotelElement.hotelDescription = data_element.desc; // Description
hotelElement.isVariableRate = data_element.isVR; // Variable Rate Test
hotelElement.thumb = data_element.thumb;
hotelElement.rateDate = 1328976549; // The time this rate was set..
hotelElement.lowRoomType = data_element.searchResults[0].roomType;
hotelElement.taxView = 'exclude';
hotelElement.bkString = data_element.searchResults[0].bb_bk_string;
hotelElement.bbID = data_element.base;
var isSingleVariableRate = false;
var rateLines = Array();
var hotelPanelLowestOffer = hotelLowestOffer.cloneNode(true); // Some reference from HotelJSLibrary..?
var hotelPanelLowestOfferRed = hotelLowestOfferRed.cloneNode(true); // As above
var variableRateLines = new Array(hotelElement.alt); // A Whole bunch of bits to determine lowest offers and variable rates!
if (hotelElement.searchResults)
{
var searchResult = hotelElement.searchResults[0];
if ( searchResult.vr.length == 1)
{
isSingleVariableRate = true;
}
if (searchResult && searchResult.vr && searchResult.vr.length > 1)
{
// BugZilla: BugID #31 - Add the title of the hotel to the initial stack.
variableRateLines = new Array(hotelElement.alt, searchResult.roomType);
// EOF-#31
for (var v = 0; v < searchResult.vr.length; v++ )
{
var dateRate = searchResult.vr[v];
variableRateLines.push(dateRate.weekday+" "+dateRate.date+": £"+Math.round(dateRate.rateExVat));
rateLines.push(dateRate.weekday +": \u00A3"+Math.round(dateRate.rateExVat));
}
hotelPanelLowestOfferRed.variableRateLines = variableRateLines;
hotelPanelLowestOfferRed.onmouseover = HotelJSLibrary.vrToolTip;
}
}
hotelPanelLowestOffer.appendChild(hotelPanelLowestOfferRed);
// OFFER TEXT
var offerText = "\u00A3"+Math.floor(hotelElement.lowestOffer);
var offerIncText = "\u00A3"+Math.floor(hotelElement.incTaxLowest);
var lowestOfferValue = document.createElement("div"); lowestOfferValue.innerHTML = offerText; //document.createTextNode(offerText);
var lowestOfferInc = document.createElement("div"); lowestOfferInc.innerHTML = offerIncText;
lowestOfferInc.style.display = 'none';
/* if ( data_element.base == '154413')
{
console.log("Rate Calculation: Lowest: £" + hotelElement.lowestOffer);
console.log("Rate Calculation: @20%: £" + ((parseInt(data_element.lowestPrice)/100)*20) );
console.log("Rate Calculation: Final Cost: £" + (Math.round(data_element.lowestPrice) + ((parseInt(data_element.lowestPrice)/100)*20)));
console.log("Rate Calculation Value Final: " + hotelElement.incTaxLowest ) ;
}
*/
try
{
var percentageDiscount = searchResult.pureDiscount;
if ( percentageDiscount != null && percentageDiscount != 'undefined' && parseInt(percentageDiscount) > 1 )
{
hotelLowestOfferWhite.style.fontFamily = 'Verdana, Helvetica, Sans-serif';
var percentageDiscountElement = Util.element("div",{'fontFamily':'arial','width':'51px','fontSize':'11px','fontWeight':'bold','zIndex':'108','textAlign':'center','position':'absolute','left':'0px','top':'0px','color':'#ffffff'},null);
percentageDiscountElement.style.display = 'none';
percentageDiscountElement.innerHTML = percentageDiscount + "% off";
percentageDiscountElement.save=percentageDiscount + "% off";
percentageDiscountElement.incr=0;
hotelElement.appendChild(percentageDiscountElement);
hotelElement.discountAmout = percentageDiscountElement;
}
} catch ( whocares ){}
hotelPanelLowestOfferRed.appendChild(lowestOfferValue);
hotelPanelLowestOfferRed.appendChild(lowestOfferInc);
hotelElement.lowestPriceExc = lowestOfferValue;
hotelElement.lowestPriceInc = lowestOfferInc;
hotelElement.taxView = 'exclude';
/* Currency and tax ammendment */
if ( Currency && Currency.taxPreference == 'include')
{
lowestOfferInc.style.display = '';
lowestOfferValue.style.display = 'none';
}
/* end */
hotelElement.switchPrices = function(what)
{
if ( what == "exclude" )
{
this.taxView = 'exclude';
this.lowestPriceExc.style.display = '';
this.lowestPriceInc.style.display = 'none';
this.panelRateExc.style.display = '';
this.panelRateInc.style.display = 'none';
try
{
for( var i in Util.stack['ratePoints'] )
{
Util.stack['ratePoints'][i].switchMode("exclude");
}
} catch (ignore_1){}
}
else
{
this.taxView = 'include';
this.lowestPriceExc.style.display = 'none';
this.lowestPriceInc.style.display = '';
this.panelRateExc.style.display = 'none';
this.panelRateInc.style.display = '';
try
{
for( var i in Util.stack['ratePoints'] )
{
Util.stack['ratePoints'][i].switchMode("include");
}
} catch (ignore_2){}
}
}
var hotelIconLowestOfferWhite = hotelLowestOfferWhite.cloneNode(true);
var lowestOfferIconText = document.createTextNode(offerText);
hotelIconLowestOfferWhite.appendChild(lowestOfferInc);
hotelIconLowestOfferWhite.appendChild(lowestOfferValue);
hotelIconLowestOfferWhite.variableRateLines = variableRateLines;
hotelIconLowestOfferWhite.showName = HotelJSLibrary.vrToolTip;
hotelElement.appendChild(hotelIconLowestOfferWhite);
hotelElement.whiteRate = true;
hotelElement.whiteNodeText = hotelIconLowestOfferWhite;
/**
* Produce the Alert Icon if the rate suggested is actually a variable rate
* Visual: The Red Icon on the hotel price icons on the actual map
**/
if (hotelElement.isVariableRate == "yes" && !isSingleVariableRate)
{
hotelElement.rateLines = rateLines;
var vr_rate_icon = document.createElement("img");
vr_rate_icon.style.position = 'absolute';
vr_rate_icon.style.left = -4;
vr_rate_icon.style.top = -4;
vr_rate_icon.src = s3+'Elements/VariableRate/vr-icon.png';
vr_rate_icon.style.zIndex = 9999994;
hotelElement.appendChild( vr_rate_icon );
/** Create the hover mechanism **/
hotelIconLowestOfferWhite.isContainerActive = false;
hotelIconLowestOfferWhite.objectReference = null;
hotelIconLowestOfferWhite.onmouseover = function()
{
if ( this.objectReference && this.objectReference != null )
{
this.objectReference.parentNode.removeChild( this.objectReference );
this.objectReference = null;
}
this.isContainerActive = true;
var objView = document.createElement("div");
objView.style.position = 'absolute';
objView.style.left = 56; //parseInt(this.parentNode.iconWidth) - 15;
objView.style.top = 0;
objView.style.zIndex = 9999995;
objView.style.width = 114;
objView.style.height = 200;
var headingImage = document.createElement("img");
headingImage.src = s3+"Elements/VariableRate/newtop.png";
objView.appendChild(headingImage);
var rateHousing = document.createElement("div");
rateHousing.style.backgroundImage = 'url('+s3+'Elements/VariableRate/vr-mid.png)';
rateHousing.style.width = 114;
var rateDays = {
'Mon' : 'Monday:',
'Tue' : 'Tuesday:',
'Wed' : 'Wednesday:',
'Thu' : 'Thursday:',
'Fri' : 'Friday:',
'Sat' : 'Saturday:',
'Sun' : 'Sunday:'
};
var tab = document.createElement("table");
tab.style.backgroundImage = 'url('+s3+'Elements/VariableRate/vr-mid.png)';
tab.style.width = 114;
for ( var i = 0 ; i < this.parentNode.rateLines.length ; i ++ )
{
var segments = this.parentNode.rateLines[i].split(":");
var row = tab.insertRow(0);
var cel1 = row.insertCell(0);
var cel2 = row.insertCell(1);
cel1.innerHTML = rateDays[segments[0]];
cel1.style.paddingLeft = 11;
cel1.style.paddingTop = 2;
cel1.className = 'white_vr_name_price';
cel2.innerHTML = segments[1].replace(".00","");
cel2.style.paddingLeft = 0;
cel2.style.paddingTop = 2;
cel2.className = 'white_vr_name_price';
}
rateHousing.style.paddingBottom = '3px';
objView.appendChild(tab);
var bottomImage = document.createElement("img");
bottomImage.src = s3+'Elements/VariableRate/vr-bot.png';
objView.appendChild(bottomImage);
this.objectReference = objView;
this.parentNode.appendChild(objView);
}
hotelIconLowestOfferWhite.onmouseout = function()
{
this.isContainerActive = false;
var thisInternal = this;
setTimeout( function()
{
if ( !thisInternal.isContainerActive && thisInternal.objectReference && thisInternal.objectReference != null )
{
thisInternal.objectReference.parentNode.removeChild( thisInternal.objectReference );
thisInternal.objectReference = null;
}
}, 400 );
}
} // End Red Icon
/** ------------------------------------------------------------- **/
/** Build the elements which appear on the hotel panel items page **/
/** ------------------------------------------------------------- **/
// This is the HOTEL Panel on the right side
var hotelPanelItem = hotelStack.cloneNode(true); // Create the hotel panel which will sit on the right
hotelPanelItem.hotelNode = hotelElement; // Mehj?
hotelPanelItem.lowestOffer = Math.floor(hotelElement.lowestOffer); // Lowest Offer
hotelElement.hotelPanelItem = hotelPanelItem; // Ooooh, more useless self references
hotelPanelItem.style.cursor = 'pointer';
hotelPanelItem.lowestOffer = parseInt(hotelElement.lowestOffer);
hotelPanelItem.hoverState = false;
hotelPanelItem.style.dislay = 'none';
hotelPanelItem.style.cursor = 'pointer';
hotelPanelItem.onmouseover = function(){
/* Enhancement: 19-09-2008: Enable the hotel names to appear on panel hover. */
this.hotelNode.labelOn();
/* END */
if ( Util.stack['hotel_selected_panel_item']!=this && this.hoverState==false)
this.backgroundSwitch("on");
}
hotelPanelItem.onmouseout = function(){ if ( Util.stack['hotel_selected_panel_item']!=this && this.hoverState==true) this.backgroundSwitch("off"); }
hotelPanelItem.backgroundSwitch = function( state )
{
if ( state == "on")
{
this.hoverState = true;
this.style.backgroundImage = "url("+s3+"Elements/RightPan/rp-back-on.png)";
}
else
{
this.hotelNode.isChosen=false;
try { this.hotelNode.namingElement.style.display = 'none'; } catch ( erty ) {}
this.hoverState = false;
this.style.backgroundImage = "url("+s3+"Elements/RightPan/rp-back-off.png)";
}
}
/** Hotel Name Element **/
var el_hotelName = document.createElement("div") ;
el_hotelName.className = 'hotel_listing_font_name';
el_hotelName.style.cursor = 'pointer';
el_hotelName.id = 'HOTEL_NAME_ELEMENT';
el_hotelName.style.cursor = 'pointer';
el_hotelName.appendChild( document.createTextNode( hotelElement.alt ) ) ;
hotelPanelItem.appendChild( el_hotelName );
el_hotelName.onmousedown = function()
{
HotelJSLibrary.selectHotel(this.parentNode.hotelNode,false);
}
/** Hotel Rates **/
var el_hotelRate = document.createElement("div");
el_hotelRate.className = 'hotel_listing_room_rate';
el_hotelRate.onmousedown = function() { HotelJSLibrary.selectHotel(this.parentNode.hotelNode,false); }
excOfferRate = document.createElement("div"); excOfferRate.innerHTML = "" + hotelElement.lowRoomType + ": " + offerText + "";
incOfferRate = document.createElement("div"); incOfferRate.innerHTML = "" + hotelElement.lowRoomType + ": " + offerIncText + "";
incOfferRate.style.display = 'none';
hotelElement.panelRateExc = excOfferRate;
hotelElement.panelRateInc = incOfferRate;
el_hotelRate.appendChild( excOfferRate );
el_hotelRate.appendChild( incOfferRate );
hotelPanelItem.appendChild ( el_hotelRate );
var el_hotelImageShadow = document.createElement("img");
el_hotelImageShadow.src = s3+'Elements/RightPan/picture_shadow.png';
el_hotelImageShadow.style.position = 'absolute';
el_hotelImageShadow.style.left = 2;
el_hotelImageShadow.style.top = 2;
hotelPanelItem.appendChild( el_hotelImageShadow );
/**
* Determines from the data obtained from JSON_Action_Favorite
* whether this item was previously a selected favorite..
*/
var isFavOn = false;
if ( Util.stack['fav_'] )
{
for ( var k = 0 ;k < Util.stack['fav_'].data.length; k++ )
{
if ( Util.stack['fav_'].data[k].base == hotelElement.hotelId )
{
isFavOn = true;
}
}
}
/** Hotel Image **/
var el_hotelImage = document.createElement("img") ;
el_hotelImage.imageReference = 'http:\/\/srv-londonimages-5.londontown.com/' +hotelElement.defaultIcon + '?d='+Math.random();
el_hotelImage.isIconed = false;
el_hotelImage.src = (isFavOn) ? 'http:\/\/srv-londonimages-4.londontown.com/' +hotelElement.defaultIcon + '?d='+Math.random() : s3+'Elements/trans.png';
el_hotelImage.className = 'hotel_listing_imge';
hotelPanelItem.appendChild ( el_hotelImage );
hotelPanelItem.iconImage = el_hotelImage;
el_hotelImage.style.cursor = 'pointer';
el_hotelImage.onmousedown = function()
{
featureWatcher.hotelMoreInformation = 1;
HotelJSLibrary.selectHotel(this.parentNode.hotelNode,false);
}
/** Hotel Stars **/
hotelElement.starCount = parseInt(data_element.stars)
var el_hotelStars = document.createElement("div");
el_hotelStars.className = 'hotel_listing_stars';
var starsAsInt = parseInt(hotelElement.stars);
if ( starsAsInt > 5 ) starsAsInt = 0;
for ( var k = 0 ; k < starsAsInt ; k++ )
{
var star = document.createElement("img");
star.src = s3+'Elements/RightPan/p-star.png';
el_hotelStars.appendChild(star);
}
el_hotelStars.style.cursor = 'pointer';
el_hotelStars.onmousedown = function() { HotelJSLibrary.selectHotel(this.parentNode.hotelNode,false); }
hotelPanelItem.appendChild ( el_hotelStars );
var propertyType = 'Hotel';
switch ( hotelElement.myfilters.minor )
{
case 'LUXURYTOWN': propertyType = 'Luxury Town House'; break;
case 'DESIGN': propertyType = 'Luxury Design Hotel'; break;
case 'BUSINESS': propertyType = 'Luxury Business Hotel'; break;
case 'CLASSIC': propertyType = 'Luxury Classic Hotel'; break;
case '2STAR_SMALL_HOTEL': propertyType = 'Small Hotel'; break;
case '2STAR_HOTEL': propertyType = 'Hotel'; break;
case '3STAR_HOTEL': propertyType = 'Hotel'; break;
case '4STAR_HOTEL': propertyType = 'Hotel'; break;
case '4STAR_BUSINESS': propertyType = 'Business Hotel'; break;
case '5STAR_HOTEL': propertyType = 'Hotel'; break;
case 'NONLUX_DESIGN': propertyType = 'Design Hotel'; break;
case 'NONLUX_LUXURYTOWN': propertyType = 'Town House'; break;
case 'NONLUX_BUSINESS': propertyType = 'Business Hotel'; break;
case 'NONLUX_CLASSIC': propertyType = 'Classic Hotel'; break;
case 'APARTMENT': propertyType = 'Apartment'; break;
case 'BB': propertyType = 'Bed \u0026 Breakfast'; break;
case 'BACKPACKER': propertyType = 'Backpacker Hostel'; break;
}
var el_p = document.createElement("div"); el_p.innerHTML=propertyType;
hotelPanelItem.appendChild( el_p );
el_p.className = 'hotel_listing_property_type';
var dis = 79;
if ( starsAsInt )
{
dis = dis + ( 8 * starsAsInt ) + 8;
}
el_p.style.left = dis ;
el_p.onmousedown = function() {
featureWatcher.hotelMoreInformation = 1;
HotelJSLibrary.selectHotel(this.parentNode.hotelNode,false); }
/** More Info Button **/
var el_moreInfoButton = document.createElement("img");
el_moreInfoButton.hotelElement = hotelElement;
el_moreInfoButton.src = s3+"Elements/RightPan/more_info.png";
el_moreInfoButton.style.position = 'absolute';
el_moreInfoButton.style.left = 131;
el_moreInfoButton.style.top = 53;
el_moreInfoButton.onmouseover =function(){ this.src = s3+"Elements/RightPan/more_info_hover.png"; }
el_moreInfoButton.onmouseout =function(){ this.src = s3+"Elements/RightPan/more_info.png"; }
el_moreInfoButton.onmousedown =function(){ HotelJSLibrary.selectHotel(this.parentNode.hotelNode,false); }
hotelPanelItem.appendChild( el_moreInfoButton );
/** Book Button **/
var el_bookButton = document.createElement("img");
el_bookButton.hotelElement = hotelElement;
if ( hotelElement.bbID.match("BB"))
{
el_bookButton.src = "Images/Elements/enq1.gif";
}
else
{
el_bookButton.src = s3+"Elements/RightPan/bookbutton.png";
}
el_bookButton.style.position = 'absolute';
el_bookButton.style.left = 184;
el_bookButton.style.top = 53;
el_bookButton.onmousedown = function()
{
featureWatcher.bookButton = 1;
var hot = this.hotelElement;
try
{
var uri = (hot.taxView=="exclude") ? hot.bookingURL + "&taxPreference=no" : hot.bookingURL + "&taxPreference=yes";
uri = uri + "&mapProCode=" + PRO_SYSTEM;
uri = uri + "&hotelmapDOM=" + hotelmapDOM;
if ( hot.hotelId.match("BB"))
{
var queryString = "?" + hot.bkString;
SecureManagement.Windows.PadlockLauncher.build(uri+"&bookingCode="+hot.searchResults[0].bkc,"HOT");
//SecureManagement.Windows.PadlockLauncher.build(uri,"HOT");
//SecureManagement.Windows.PadlockLauncher.build("inde_book.php"+queryString,"BB");
// var widthOfPopup = 1000;
// var newWindow = window.open(uri,"",'width='+widthOfPopup+',height='+screen.height+',resizable=yes,scrollbars=yes');
// newWindow.focus();
// callCentreInterface.notice("Your booking page was opened in a new window");
}
else
{
SecureManagement.Windows.PadlockLauncher.build(uri,"HOT");
//jsHotelMore.createViewPane(hot.hotelId, hot.bookingURL);
setTimeout(function(){
try{
Util.stack['hotel_tab'].triggerMouseUp();
Util.stack['scroll_lot'].style.display = 'none';
} catch ( eascd ) {}
},100);
}
}
catch( e_errorPoint ) {
}
}
hotelPanelItem.appendChild( el_bookButton );
/** Favorite Element **/
var el_hotelFavorite = document.createElement("img");
el_hotelFavorite.src = s3+'Elements/RightPan/but-fav-off.png';
el_hotelFavorite.className = 'hotel_listing_favorite';
el_hotelFavorite.id = "FAVORITE_IMAGE";
el_hotelFavorite.activeItem = false; //(isFavOn) ? true :
el_hotelFavorite.elementReference = hotelElement;
el_hotelFavorite.localIcon = hotelPanelItem.iconImage;
hotelPanelItem.appendChild ( el_hotelFavorite );
hotelPanelItem.favoriteCaller = el_hotelFavorite;
if ( isFavOn )
{
el_hotelFavorite.elementReference.favoriteElement = true;
el_hotelFavorite.activeItem = true;
el_hotelFavorite.src = s3+'Elements/RightPan/but-fav-on.png';
var cloneElement = el_hotelFavorite.parentNode.cloneNode(true);
cloneElement.realFavoriteReference = this;
cloneElement.realFavoriteReference = el_hotelFavorite;
cloneElement.hotelNode = el_hotelFavorite.parentNode.hotelNode;
cloneElement.localIcon = hotelPanelItem.iconImage;
el_hotelFavorite.cloneReference = cloneElement;
var imageCollection = cloneElement.getElementsByTagName("img");
for ( var p = 0 ; p < imageCollection.length; p++ )
{
if ( imageCollection[p].id=='FAVORITE_IMAGE' )
{
imageCollection[p].onmousedown = function()
{
featureWatcher.favoriteAdded = 1;
this.parentNode.realFavoriteReference.favoriteController(this.parentNode);
}
}
}
var divCollection = cloneElement.getElementsByTagName("div");
for ( var p = 0 ; p < divCollection.length; p++ )
{
if ( divCollection[p].id=='HOTEL_NAME_ELEMENT' )
{
divCollection[p].onmousedown = function()
{
featureWatcher.moreHotelInformation = 1;
HotelJSLibrary.selectHotel(this.parentNode.hotelNode);
}
}
}
Util.stack['fav_tab'].appendChild(cloneElement);
}
el_hotelFavorite.onmousedown = function()
{
featureWatcher.favoriteAdded = 1;
this.favoriteController(false);
}
el_hotelFavorite.favoriteController = function(isClone)
{
if ( !isClone )
{
if ( !this.activeItem )
{
JSON.Load("Script/JSON/Actions/JSON_Action_Favorites.php?action=save&base=" + this.parentNode.hotelNode.hotelId + "&session=" + londonMapsSession + "&" );
this.elementReference.favoriteElement = true;
this.activeItem = true;
this.src = s3+'Elements/RightPan/but-fav-on.png';''
var cloneElement = this.parentNode.cloneNode(true);
cloneElement.realFavoriteReference = this;
cloneElement.hotelNode = this.parentNode.hotelNode;
this.cloneReference = cloneElement;
var imageCollection = cloneElement.getElementsByTagName("img");
for ( var p = 0 ; p < imageCollection.length; p++ )
{
if ( imageCollection[p].id=='FAVORITE_IMAGE' )
{
imageCollection[p].onmousedown = function()
{
this.parentNode.realFavoriteReference.favoriteController(this.parentNode);
}
}
}
var divCollection = cloneElement.getElementsByTagName("div");
for ( var p = 0 ; p < divCollection.length; p++ )
{
if ( divCollection[p].id=='HOTEL_NAME_ELEMENT' )
{
divCollection[p].onmousedown = function()
{
HotelJSLibrary.selectHotel(this.parentNode.hotelNode);
}
}
}
Util.stack['fav_tab'].appendChild(cloneElement);
}
else
{
JSON.Load("Script/JSON/Actions/JSON_Action_Favorites.php?action=delete&base=" + this.parentNode.hotelNode.hotelId + "&session=" + londonMapsSession + "&" );
this.elementReference.favoriteElement = false;
this.activeItem = false;
this.src = s3+'Elements/RightPan/but-fav-off.png';
Util.stack['fav_tab'].removeChild(this.cloneReference);
EventObject_MouseHandler.System_Data_Poll();
}
}
else
{
this.elementReference.favoriteElement = false;
this.activeItem = false;
this.src = s3+'Elements/RightPan/but-fav-off.png';
Util.stack['fav_tab'].removeChild(isClone);
JSON.Load("Script/JSON/Actions/JSON_Action_Favorites.php?action=delete&base=" + this.parentNode.hotelNode.hotelId + "&session=" + londonMapsSession + "&" );
EventObject_MouseHandler.System_Data_Poll();
}
}
hotelElement.onmousedown = function()
{
featureWatcher.moreHotelInformation = 1;
HotelJSLibrary.selectHotel(this,true);
}
try{
if ( myHotelPanel.accommodationLoadingElement )
{
myHotelPanel.removeChild(myHotelPanel.accommodationLoadingElement);
myHotelPanel.accommodationLoadingElement = false;
}
} catch (eee){}
myHotelPanel.appendChild(hotelPanelItem); // BLOCK
myHotelPanel.currentEntry++;
Util.priceNodeCheck(hotelElement);
}
}
EventObject_MouseHandler.System_Data_Poll();
// HotelJSLibrary.sortHotelsByPriceOrder();
}
/*
setTimeout(function()
{
EventObject_MouseHandler.System_Data_Poll();
HotelJSLibrary.sortHotelsByPriceOrder();
}, 1000);
*/
}
}
var EventObject_MouseWheel={deltaActive:false,deltaEvent:null,x:0,y:0,wheelActive:function(event)
{if(hybrid!='true'){EventObject_MouseWheel.deltaActive=true;event=(event)?event:window.event;EventObject_MouseWheel.deltaEvent=event;if(event.wheelDelta)
{delta=event.wheelDelta/120;if(window.opera)delta=-delta;}
else if(event.detail)
{delta=-event.detail/3;}
EventObject_MouseHandler.x=event.clientX;EventObject_MouseHandler.y=event.clientY;if(delta>0)
{if(Zoom.level<(Zoom.limiters.length-1)){Zoom.zoomIn('void',true);Util.stack.slider.style.top=Util.stack.zoomer.slider_height-(Zoom.level*Util.stack.zoomer.slider_ratio);}}
else
{if(Zoom.level>0){Zoom.zoomOut('void',true);Util.stack.slider.style.top=Util.stack.zoomer.slider_height-(Zoom.level*Util.stack.zoomer.slider_ratio);}}
if(event.preventDefault)event.preventDefault();event.returnValue=false;EventObject_MouseWheel.deltaActive=false;}},scrollHotelList:function(event)
{EventObject_MouseWheel.deltaActive=true;event=(event)?event:window.event;EventObject_MouseWheel.deltaEvent=event;if(event.wheelDelta)
{delta=event.wheelDelta/120;if(window.opera)delta=-delta;}
else if(event.detail)
{delta=-event.detail/3;}
if(delta>0)
{Util.stack['hotel_tab'].scrollTop=parseInt(Util.stack['hotel_tab'].scrollTop)-25;}
else
{Util.stack['hotel_tab'].scrollTop=parseInt(Util.stack['hotel_tab'].scrollTop)+25;}
if(event.preventDefault)event.preventDefault();event.returnValue=false;EventObject_MouseWheel.deltaActive=false;}}
function fadememe( obj, start, end ) {
obj.style.display = '';
if ( obj ) {
if ( start < end ) {
obj.style.MozOpacity = start / 100 ;
obj.style.opacity = start / 100;
obj.style.filter = "alpha(opacity="+start+")";
start = start + 5;
setTimeout( function() { fadememe( obj, start, end ); }, 10 );
} else {
obj.style.MozOpacity = end ;
obj.style.opacity = end;
obj.style.filter = "alpha(opacity="+end+")";
}
}
}
// parent.parent.SecureManagement.Windows.closePanel()
var SecureManagement =
{
type : 'HOT',
Windows :
{
closePanel : function()
{
try { Util.stack['SecureManager'].Windows.KillSystem(); } catch ( noKillException ){}
},
container : null,
PadlockLauncher :
{
width : 255,
height : 205,
background : '#F8F8F8',
graphic : '',
hotel : true,
build : function( uri, type )
{
JSON.Load("Script/JSON/Actions/JSON_Log.php?session="+londonMapsSession +"&point=bookButton&");
try{ uri = uri + "&preferredCurrency="+Currency.currency_selected; } catch ( emptyCurrencyObject ){}
//alert("URL_MODE: " + uri);
var dimensions = Util.getDimensions();
SecureManagement.type=type;
Util.stack['TorchAMap'].ranger();
setTimeout(function(){
Util.stack.commerce.style.display = 'none';
if ( Util.stack['popout'] ) { Util.stack['popout'].style.display = 'none'; }
if ( Util.stack['core_base'] ) { Util.stack['core_base'].style.display = 'none'; }
if ( Util.stack.header_ ) { Util.stack.header_.style.display = 'none'; }
if ( Util.stack['SPLIT'] ) { Util.stack['SPLIT'].style.display = 'none'; }
Layers.switchBlack(true);
var iframe = document.createElement("iframe");
iframe.style.position = 'absolute';
iframe.style.display = 'none';
iframe.style.left = 0;
iframe.style.top = 0;
iframe.style.width = 879;
iframe.style.height = 512;
if ( dimensions[1] < 512 ) iframe.style.height = dimensions[1]-20;
iframe.style.overflow = 'hidden';
iframe.frameBorder = '0';
iframe.border = 0;
iframe.frameBorder = 0;
iframe.style.border = '0px solid #000000';
iframe.scrolling = 'no';
iframe.allowTransparency='true';
iframe.src = uri;
setTimeout(function()
{
Util.stack['SecureManager'] = SecureManagement;
var dimensions = Util.getDimensions();
var PadlockDIV = document.createElement("div");
var noticeDiv = document.createElement("div");
noticeDiv.style.position = 'absolute';
noticeDiv.style.left = 0;
noticeDiv.style.top = 0;
noticeDiv.style.width = '100%';
noticeDiv.style.height = '21';
noticeDiv.style.backgroundImage = 'url('+s3+'Elements/Secure/SecureBar.png)';
noticeDiv.style.backgroundRepeat = 'repeat-x';
PadlockDIV.appendChild(noticeDiv);
//PadlockDIV.style.backgroundImage = 'url('+s3+'Elements/Secure/SecureSurround.png)';
//PadlockDIV.style.backgroundRepeat = 'no-repeat';
PadlockDIV.style.position = 'absolute';
PadlockDIV.style.width = SecureManagement.Windows.PadlockLauncher.width;
PadlockDIV.style.height = SecureManagement.Windows.PadlockLauncher.height;
PadlockDIV.style.backgroundColor = SecureManagement.Windows.PadlockLauncher.background;
PadlockDIV.style.left = (dimensions[0]/2) - (SecureManagement.Windows.PadlockLauncher.width/2);
PadlockDIV.style.top = (dimensions[1]/2) - (SecureManagement.Windows.PadlockLauncher.height/2) - 30;
PadlockDIV.style.zIndex = 99999999;
var image = document.createElement("img");
image.src = s3+'Elements/Secure/SecureSpin.gif';
image.style.position = 'absolute';
image.style.left = (SecureManagement.Windows.PadlockLauncher.width/2)-(75/2);
image.style.top = (SecureManagement.Windows.PadlockLauncher.height/2)-(75/2) - 15;
PadlockDIV.appendChild(image);
var image1 = document.createElement("img");
image1.src = s3+'Elements/Secure/SecureNotice1.png';
image1.style.position = 'absolute';
image1.style.left = (SecureManagement.Windows.PadlockLauncher.width/2)-(250/2);
image1.style.top = (SecureManagement.Windows.PadlockLauncher.height/2)-(75/2) - 10 + 79;
PadlockDIV.appendChild(image1);
PadlockDIV.imageReference = image;
PadlockDIV.imageReference1 = image1;
document.body.appendChild(PadlockDIV);
SecureManagement.Windows.container = PadlockDIV;
PadlockDIV.iframe = iframe;
PadlockDIV.appendChild(iframe);
setTimeout(function(){SecureManagement.Windows.PadlockExpander.build();},1500);
}, 800 );
},500);
}
},
KillSystem : function()
{
//SecureManagement.Windows.container.goldglow.parentNode.removeChild(SecureManagement.Windows.container.goldglow);
SecureManagement.Windows.container.parentNode.removeChild(SecureManagement.Windows.container);
setTimeout(function()
{
Layers.switchBlack(false);
Util.stack.commerce.style.display = '';
if ( Util.stack['popout'] ) { Util.stack['popout'].style.display = ''; }
if ( Util.stack['core_base'] ) { Util.stack['core_base'].style.display = ''; }
if ( Util.stack.header_ ) { Util.stack.header_.style.display = ''; }
if ( Util.stack['SPLIT'] ) { Util.stack['SPLIT'].style.display = ''; }
setTimeout(function(){Util.stack['TorchAMap'].ranger();},1000);
},500);
},
PadlockExpander :
{
width : 879,
height : 512,
background : '#ffffff',
build : function()
{
var dimensions = Util.getDimensions();
if ( dimensions[1] < 512 ) SecureManagement.Windows.PadlockExpander.height = dimensions[1]-20;
var change = false;
if ( parseInt(SecureManagement.Windows.container.style.width) < SecureManagement.Windows.PadlockExpander.width )
{
change = true;
SecureManagement.Windows.container.style.left = (dimensions[0]/2) - ((parseInt(SecureManagement.Windows.container.style.width) + 70)/2);
SecureManagement.Windows.container.style.width = parseInt(SecureManagement.Windows.container.style.width) + 70;
}
if ( parseInt(SecureManagement.Windows.container.style.height) < SecureManagement.Windows.PadlockExpander.height )
{
change = true;
SecureManagement.Windows.container.style.top = (dimensions[1]/2) - ((parseInt(SecureManagement.Windows.container.style.height) + 70)/2);
SecureManagement.Windows.container.style.height = parseInt(SecureManagement.Windows.container.style.height) + 70;
}
if ( change )
{
SecureManagement.Windows.container.imageReference.style.left = (parseInt(SecureManagement.Windows.container.style.width)/2)-(75/2);
SecureManagement.Windows.container.imageReference.style.top = (parseInt(SecureManagement.Windows.container.style.height)/2)-(75/2)-15;
SecureManagement.Windows.container.imageReference1.style.left = (parseInt(SecureManagement.Windows.container.style.width)/2)-(250/2);
SecureManagement.Windows.container.imageReference1.style.top = (parseInt(SecureManagement.Windows.container.style.height)/2)-(75/2)-10+79;
setTimeout(function()
{
SecureManagement.Windows.PadlockExpander.build();
},20);
}
else
{
setTimeout(function()
{
SecureManagement.Windows.container.iframe.style.display = '';
// fadememe(SecureManagement.Windows.container.iframe,0,100);
SecureManagement.Windows.container.style.left = (dimensions[0]/2) - ( SecureManagement.Windows.PadlockExpander.width/2);
SecureManagement.Windows.container.style.width = SecureManagement.Windows.PadlockExpander.width-1;
SecureManagement.Windows.container.style.top = (dimensions[1]/2) - (SecureManagement.Windows.PadlockExpander.height/2);
SecureManagement.Windows.container.style.height = SecureManagement.Windows.PadlockExpander.height;
SecureManagement.Windows.container.imageReference1.style.left = (parseInt(SecureManagement.Windows.container.style.width)/2)-(250/2);
SecureManagement.Windows.container.imageReference1.style.top = (parseInt(SecureManagement.Windows.container.style.height)/2)-(75/2)-10+79;
SecureManagement.Windows.container.imageReference.style.left = (parseInt(SecureManagement.Windows.container.style.width)/2)-(75/2);
SecureManagement.Windows.container.imageReference.style.top = (parseInt(SecureManagement.Windows.container.style.height)/2)-(75/2);
},2000);
setTimeout( function(){
SecureManagement.Windows.container.imageReference.parentNode.removeChild(SecureManagement.Windows.container.imageReference);
SecureManagement.Windows.container.imageReference1.parentNode.removeChild(SecureManagement.Windows.container.imageReference1);
var close = document.createElement("img");
if ( SecureManagement.type == "HOT" )
{
close.src = "Images/Elements/close_hotel.png";
}
else
{
close.src = "Images/Elements/close_bb.png";
}
close.style.position = 'absolute';
close.style.left = 879-24;
close.style.top = 0;
close.style.zIndex = 99999999;
close.style.cursor = 'pointer';
close.onmousedown = function()
{
Util.stack['SecureManager'].Windows.KillSystem();
}
SecureManagement.Windows.container.appendChild(close);
},6000);
}
}
}
}
}
var Currency={date_cal:null,enabled:true,currency_selected:"GBP",taxPreference:'exclude',rates:{'AUD':{'symbol':'36', 'name':'Australia Dollars', 'rateratio':'1.4771437948'},'CAD':{'symbol':'36', 'name':'Canada Dollars', 'rateratio':'1.578214305'},'CNY':{'symbol':'165', 'name':'China Yuan Renminbi', 'rateratio':'9.91541079'},'EUR':{'symbol':'8364', 'name':'Euro', 'rateratio':'1.19391987'},'JPY':{'symbol':'165', 'name':'Japan Yen', 'rateratio':'122.3299215'},'MXN':{'symbol':'36', 'name':'Mexico Pesos', 'rateratio':'20.167857015'},'RUB':{'symbol':'1073', 'name':'Russia Rubles', 'rateratio':'47.36533275'},'ZAR':{'symbol':'82', 'name':'South Africa Rand', 'rateratio':'12.210717408'},'GBP':{'symbol':'163', 'name':'United Kingdom Pounds', 'rateratio':'1'},'USD':{'symbol':'36', 'name':'United States Dollars', 'rateratio':'1.5753'}},isNotGBP:function(){return(Currency.currency_selected!='GBP')?true:false;},getCurrencySelectorHTML:function()
{var cur='";return cur;},getCurrencySelectorHTMLDatePanel:function()
{var cur='";return cur;},switchTaxRateTo:function(selection)
{Currency.taxPreference=selection;for(var i=0;iExclude TAX';cur+='';cur+="";return cur;},eventActive:function()
{Layers.switchBlack(true);var dimensions=Util.getDimensions();var width=376;var height=182;var left=(dimensions[0]/2)-(width/2);var top=(dimensions[1]/2)-(height/2);var currencyMain=Util.element("div",{'position':'absolute','zIndex':'999999999','left':left,'top':top,'width':width,'height':height},null);var currencyHeading=Util.element("div",{'backgroundImage':'url(Images/Elements/Currency/currency_heading1.png)','position':'absolute','zIndex':'999999999','left':0,'top':0,'width':width,'height':53},null);var currencyMiddle=Util.element("div",{'backgroundImage':'url(Images/Elements/Currency/currency_middle.gif)','position':'absolute','zIndex':'999999999','left':0,'top':53,'width':width,'height':123},null);var currencyFooting=Util.element("div",{'backgroundImage':'url(Images/Elements/Currency/cfoot2.png)','position':'absolute','zIndex':'999999999','left':0,'top':140,'width':width,'height':45},null);currencyMain.appendChild(currencyHeading);currencyMain.appendChild(currencyMiddle);currencyMain.appendChild(currencyFooting);var currencyOverlay=Util.element("div",{'backgroundImage':'url(Images/Elements/Currency/currency_overlay.png)','position':'absolute','zIndex':'999999999','left':18,'top':18,'width':339,'height':126},null);currencyMain.appendChild(currencyOverlay);var closeButton=Util.element("img",{'zIndex':'999999999','cursor':'pointer','position':'absolute','left':'320','top':'11'},{'src':'Images/Elements/Currency/close.gif'});closeButton.onmousedown=function(){document.body.removeChild(Util.stack['currencyBlock']);Layers.switchBlack(false);}
currencyMain.appendChild(closeButton);var currencySelectorHTML=Currency.getCurrencySelectorHTML();var selectorBlock=Util.element("div",{'zIndex':'999999999','position':'absolute','left':18,'top':65},{'innerHTML':currencySelectorHTML});currencyMain.appendChild(selectorBlock);var taxHTML=Currency.getTaxSwitchHTML();var taxSelector=Util.element("div",{'zIndex':'999999999','position':'absolute','left':18,'top':147},{'innerHTML':taxHTML});currencyMain.appendChild(taxSelector);document.body.appendChild(currencyMain);Util.stack['currencyBlock']=currencyMain;},manageCurrencyNode:function(node,gb_overide)
{if(Currency.isCurrencyEnabled||gb_overide)
{var ratio=Currency.rates[Currency.currency_selected].rateratio;var symbol=Currency.rates[Currency.currency_selected].symbol;if(!node.isFullyBooked)
{if(node&&node.searchResults&&node.searchResults.length>0)
{node.currency=Currency.currency_selected;var offerRate=Math.round(parseFloat(node.searchResults[0].offer)*parseFloat(ratio));var offerRateInc=Math.round((parseFloat(node.searchResults[0].offer)+(parseFloat(node.searchResults[0].offer)*0.2))*ratio);node.lowestPriceExc.innerHTML=''+symbol+';'+offerRate;node.lowestPriceInc.innerHTML=''+symbol+';'+offerRateInc;node.panelRateExc.innerHTML=""+node.lowRoomType+": "+symbol+";"+offerRate+"";node.panelRateInc.innerHTML=""+node.lowRoomType+": "+symbol+";"+offerRateInc+"";}}}},manageCurrency:function(gb_overide)
{if(Currency.isCurrencyEnabled||gb_overide)
{var ratio=Currency.rates[Currency.currency_selected].rateratio;var symbol=Currency.rates[Currency.currency_selected].symbol;for(var i=0;i0)
{var offerRate=Math.round(parseFloat(node.searchResults[0].offer)*parseFloat(ratio));var offerRateInc=Math.round((parseFloat(node.searchResults[0].offer)+(parseFloat(node.searchResults[0].offer)*0.175))*ratio);node.lowestPriceExc.innerHTML=''+symbol+';'+offerRate;node.lowestPriceInc.innerHTML=''+symbol+';'+offerRateInc;node.panelRateExc.innerHTML=""+node.lowRoomType+": "+symbol+";"+offerRate+"";node.panelRateInc.innerHTML=""+node.lowRoomType+": "+symbol+";"+offerRateInc+"";}}}}},switchCurrency:function(currency)
{try{if(currency!='GBP')
{Currency.date_cal.style.display='';Currency.date_cal.innerHTML='Your map will display rates in '+Currency.rates[currency].name+' ('+Currency.rates[currency].symbol+';)
however you will pay the hotel directly in British Pounds (£)'}
else
{Currency.date_cal.style.display='none';}}
catch(e){console.log("Errror: "+e.message);}
try
{if(currency!='GBP'&&Currency.rates[currency])
{Currency.enabled=true;Currency.currency_selected=currency;Currency.manageCurrency(false);}
else
{Currency.enabled=false;Currency.currency_selected=currency;Currency.manageCurrency(true);}}
catch(currencyChangeException)
{}},isCurrencyEnabled:function(){return Currency.enabled;}};