function urlencode( str ) { // http://kevin.vanzonneveld.net // + original by: Philip Peterson // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // * example 1: urlencode('Kevin van Zonneveld!'); // * returns 1: 'Kevin+van+Zonneveld%21' var ret = str; ret = ret.toString(); ret = encodeURIComponent(ret); ret = ret.replace(/%20/g, '+'); return ret; } function replaceH1Tags() { var h1s = document.getElementsByTagName("h1"); if (typeof(h1s) != "undefined") { for (var i = 0; i < h1s.length; i++) { var h1 = h1s[i]; var title = h1.innerHTML.replace( ' & ', '+%26+' ); h1.style.background = 'none'; h1.innerHTML = ""+title+""; swfobject.embedSWF("flash/soho-header.swf", "h1flash"+i, "451", "48", "8.0.0","", {labeltext: title}, {menu:"false",scale:"noScale",salign:"LT",wmode:"transparent"}, {id:"flash_title_"+i,name:"flash_title_"+i}); } } } window.addEvent('domready', function(){ replaceH1Tags(); var accordion = new Accordion('span.atStart', 'ul.atStart', { opacity: true, transition: Fx.Transitions.Circ.easeOut, duration: 700, alwaysHide: true, show: 7}, $('menu')); new MultiBox('mb', {descClassName: 'multiBoxDesc', useOverlay: true}); myCal = new Calendar({ checkin: 'd/m/Y', checkout: 'd/m/Y' }, { pad: 1, direction: 1 }); myCal2 = new Calendar({ arrivaldate: 'd/m/Y', departuredate: 'd/m/Y', start: 'd/m/Y', end: 'd/m/Y' }, { pad: 1, direction: 1 }); var Tips2 = new Tips($$('.underconstruction'), { initialize:function(){ this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0); }, onShow: function(toolTip) { this.fx.start(1); }, onHide: function(toolTip) { this.fx.start(0); } }); var Tips3 = new Tips($$('.exclamation'), { initialize:function(){ this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0); }, onShow: function(toolTip) { this.fx.start(1); }, onHide: function(toolTip) { this.fx.start(0); }, className: 'custom', fixed: true, offsets: {'x': -260, 'y': -2} }); var Tips3 = new Tips($$('.questionmark'), { initialize:function(){ this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0); }, onShow: function(toolTip) { this.fx.start(1); }, onHide: function(toolTip) { this.fx.start(0); }, className: 'question', fixed: true, offsets: {'x': -260, 'y': -2} }); document.addEvent('keydown',function(event) { if ( event.keyCode == 113 ) { document.location.href = 'http://www.sohoboutiquehotel.com/admin'; } }); });