// JavaScript Document
/***********************************************
* Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var studio=new Array()
studio[0]=["/_images/_site_content/studio_1.jpg", "", ""]
studio[1]=["/_images/_site_content/studio_2.jpg", "", ""]
studio[2]=["/_images/_site_content/studio_3.jpg", "", ""]
studio[3]=["/_images/_site_content/studio_4.jpg", "", ""]

var temple=new Array()
temple[0]=["/_images/_site_content/temple_01.jpg", "", ""]
temple[1]=["/_images/_site_content/temple_02.jpg", "", ""]
temple[2]=["/_images/_site_content/temple_03.jpg", "", ""]

var more=new Array()
more[0]=["/_images/_site_content/more_01.jpg", "", ""]
more[1]=["/_images/_site_content/more_02.jpg", "", ""]
more[2]=["/_images/_site_content/more_03.jpg", "", ""]
more[3]=["/_images/_site_content/more_04.jpg", "", ""]
more[4]=["/_images/_site_content/more_05.jpg", "", ""]
more[5]=["/_images/_site_content/more_06.jpg", "", ""]
more[6]=["/_images/_site_content/more_07.jpg", "", ""]

var tour=new Array()
tour[0]=["/_images/_site_content/tour_01.jpg", "", ""]
tour[1]=["/_images/_site_content/tour_02.jpg", "", ""]
tour[2]=["/_images/_site_content/tour_03.jpg", "", ""]
tour[3]=["/_images/_site_content/tour_04.jpg", "", ""]
tour[4]=["/_images/_site_content/tour_07.jpg", "", ""]
tour[5]=["/_images/_site_content/tour_08.jpg", "", ""]
tour[6]=["/_images/_site_content/tour_09.jpg", "", ""]
tour[7]=["/_images/_site_content/tour_10.jpg", "", ""]
tour[8]=["/_images/_site_content/tour_11.jpg", "", ""]
tour[9]=["/_images/_site_content/tour_12.jpg", "", ""]
tour[10]=["/_images/_site_content/tour_new.jpg", "", ""]

var tourCap=new Array()
tourCap[0]=["/_images/_site_content/tourCap_01.gif", "", ""]
tourCap[1]=["/_images/_site_content/tourCap_02.gif", "", ""]
tourCap[2]=["/_images/_site_content/tourCap_03.gif", "", ""]
tourCap[3]=["/_images/_site_content/tourCap_04.gif", "", ""]
tourCap[4]=["/_images/_site_content/tourCap_07.gif", "", ""]
tourCap[5]=["/_images/_site_content/tourCap_08.gif", "", ""]
tourCap[6]=["/_images/_site_content/tourCap_09.gif", "", ""]
tourCap[7]=["/_images/_site_content/tourCap_10.gif", "", ""]
tourCap[8]=["/_images/_site_content/tourCap_11.gif", "", ""]
tourCap[9]=["/_images/_site_content/tourCap_12.gif", "", ""]
tourCap[10]=["/_images/_site_content/tourCap_new.gif", "", ""]

var bgcatch=new Array()
bgcatch[0]=["/_images/_design/bg_c1.jpg", "", ""]
bgcatch[1]=["/_images/_design/bg_c2new.jpg", "", ""]
bgcatch[2]=["/_images/_design/bg_c3.jpg", "", ""]

var contentcatch=new Array()
contentcatch[0]=["/_images/_site_content/c_c1.jpg", "", ""]
contentcatch[1]=["/_images/_site_content/c_c2new.jpg", "", ""]
contentcatch[2]=["/_images/_site_content/c_c3.jpg", "", ""]

var logocatch=new Array()
logocatch[0]=["/_images/_buttons/L_c1.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logocatch[1]=["/_images/_buttons/L_c2new.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logocatch[2]=["/_images/_buttons/L_c3.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]

var content1901=new Array()
content1901[0]=["/_images/_site_content/c_1901_1.jpg", "", ""]
content1901[1]=["/_images/_site_content/c_1901_2new.jpg", "", ""]
content1901[2]=["/_images/_site_content/c_1901_3new.jpg", "", ""]
content1901[3]=["/_images/_site_content/c_1901_4.jpg", "", ""]
content1901[4]=["/_images/_site_content/c_1901_5.jpg", "", ""]

var logo1901=new Array()
logo1901[0]=["/_images/_buttons/L_1901_1.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logo1901[1]=["/_images/_buttons/L_1901_2new.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logo1901[2]=["/_images/_buttons/L_1901_3new.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logo1901[3]=["/_images/_buttons/L_1901_4.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logo1901[4]=["/_images/_buttons/L_1901_5.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]

var bg1901=new Array()
bg1901[0]=["/_images/_design/bg_191_1.jpg", "", ""]
bg1901[1]=["/_images/_design/bg_1091_2new.jpg", "", ""]
bg1901[2]=["/_images/_design/bg_1091_3new.jpg", "", ""]
bg1901[3]=["/_images/_design/bg_191_4.jpg", "", ""]
bg1901[4]=["/_images/_design/bg_191_5.jpg", "", ""]

var btncatch=new Array()
btncatch[0]=["/_images/_buttons/b_c1.jpg", "/contact/contact.asp", ""]
btncatch[1]=["/_images/_buttons/b_c2.jpg", "/contact/contact.asp", ""]
btncatch[2]=["/_images/_buttons/b_c3.jpg", "/contact/contact.asp", ""]
btncatch[3]=["/_images/_buttons/b_c4.jpg", "/contact/contact.asp", ""]
btncatch[4]=["/_images/_buttons/b_c5.jpg", "/contact/contact.asp", ""]

var bgeast=new Array()
bgeast[0]=["/_images/_design/bg_e1.jpg", "", ""]
bgeast[1]=["/_images/_design/bg_e2.jpg", "", ""]
bgeast[2]=["/_images/_design/bg_e3new.jpg", "", ""]
bgeast[3]=["/_images/_design/bg_e4.jpg", "", ""]
bgeast[4]=["/_images/_design/bg_e5.jpg", "", ""]

var contenteastmenu=new Array()
contenteastmenu[0]=["/_images/_site_content/em_c1.jpg", "", ""]
contenteastmenu[1]=["/_images/_site_content/em_c2.jpg", "", ""]
contenteastmenu[2]=["/_images/_site_content/em_c3new.jpg", "", ""]
contenteastmenu[3]=["/_images/_site_content/em_c4.jpg", "", ""]
contenteastmenu[4]=["/_images/_site_content/em_c5.jpg", "", ""]

var contenteastrev=new Array()
contenteastrev[0]=["/_images/_site_content/er_c1.jpg", "", ""]
contenteastrev[1]=["/_images/_site_content/er_c2.jpg", "", ""]
contenteastrev[2]=["/_images/_site_content/er_c3.jpg", "", ""]
contenteastrev[3]=["/_images/_site_content/em_c4.jpg", "", ""]
contenteastrev[4]=["/_images/_site_content/er_c5.jpg", "", ""]

var logoeast=new Array()
logoeast[0]=["/_images/_buttons/L_e1.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logoeast[1]=["/_images/_buttons/L_e2.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logoeast[2]=["/_images/_buttons/L_e3new.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logoeast[3]=["/_images/_buttons/L_e4.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logoeast[4]=["/_images/_buttons/L_e5.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]

var btneast=new Array()
btneast[0]=["/_images/_buttons/b_e1.jpg", "/contact/contact.asp", ""]
btneast[1]=["/_images/_buttons/b_e2.jpg", "/contact/contact.asp", ""]
btneast[2]=["/_images/_buttons/b_e3.jpg", "/contact/contact.asp", ""]
btneast[3]=["/_images/_buttons/b_e4.jpg", "/contact/contact.asp", ""]
btneast[4]=["/_images/_buttons/b_e5.jpg", "/contact/contact.asp", ""]

var bgmiyako=new Array()
bgmiyako[0]=["/_images/_design/bg_m1.jpg", "", ""]
bgmiyako[1]=["/_images/_design/bg_m2.jpg", "", ""]
bgmiyako[2]=["/_images/_design/bg_m3new.jpg", "", ""]
bgmiyako[3]=["/_images/_design/bg_m4.jpg", "", ""]
bgmiyako[4]=["/_images/_design/bg_m5.jpg", "", ""]

var contentmiyakomenu=new Array()
contentmiyakomenu[0]=["/_images/_site_content/c_mm1.jpg", "", ""]
contentmiyakomenu[1]=["/_images/_site_content/c_mm2.jpg", "", ""]
contentmiyakomenu[2]=["/_images/_site_content/c_mm3new.jpg", "", ""]
contentmiyakomenu[3]=["/_images/_site_content/c_mm4.jpg", "", ""]
contentmiyakomenu[4]=["/_images/_site_content/c_mm5.jpg", "", ""]

var contentmiyakorev=new Array()
contentmiyakorev[0]=["/_images/_site_content/c_mm1.jpg", "", ""]
contentmiyakorev[1]=["/_images/_site_content/c_mm2.jpg", "", ""]
contentmiyakorev[2]=["/_images/_site_content/c_mm3new.jpg", "", ""]
contentmiyakorev[3]=["/_images/_site_content/c_mm4.jpg", "", ""]
contentmiyakorev[4]=["/_images/_site_content/c_mm5.jpg", "", ""]

var logomiyako=new Array()
logomiyako[0]=["/_images/_buttons/L_m1.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logomiyako[1]=["/_images/_buttons/L_m2.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logomiyako[2]=["/_images/_buttons/L_m3new.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logomiyako[3]=["/_images/_buttons/L_m4.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logomiyako[4]=["/_images/_buttons/L_m5.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]

var btnmiyako=new Array()
btnmiyako[0]=["/_images/_buttons/b_m1.jpg", "/contact/contact.asp", ""]
btnmiyako[1]=["/_images/_buttons/b_m2.jpg", "/contact/contact.asp", ""]
btnmiyako[2]=["/_images/_buttons/b_m3.jpg", "/contact/contact.asp", ""]
btnmiyako[3]=["/_images/_buttons/b_m4.jpg", "/contact/contact.asp", ""]
btnmiyako[4]=["/_images/_buttons/b_m5.jpg", "/contact/contact.asp", ""]

var bggeorge=new Array()
bggeorge[0]=["/_images/_design/bg_g1.jpg", "", ""]
bggeorge[1]=["/_images/_design/bg_g2.jpg", "", ""]
bggeorge[2]=["/_images/_design/bg_g3.jpg", "", ""]
bggeorge[3]=["/_images/_design/bg_g5.jpg", "", ""]

var contentgeorgemenu=new Array()
contentgeorgemenu[0]=["/_images/_site_content/c_gm1.jpg", "", ""]
contentgeorgemenu[1]=["/_images/_site_content/c_gm2.jpg", "", ""]
contentgeorgemenu[2]=["/_images/_site_content/c_gm3.jpg", "", ""]
contentgeorgemenu[3]=["/_images/_site_content/c_gm5.jpg", "", ""]

var contentgeorgerev=new Array()
contentgeorgerev[0]=["/_images/_site_content/c_gm1.jpg", "", ""]
contentgeorgerev[1]=["/_images/_site_content/c_gr2.jpg", "", ""]
contentgeorgerev[2]=["/_images/_site_content/c_gr3.jpg", "", ""]
contentgeorgerev[3]=["/_images/_site_content/c_gr5.jpg", "", ""]

var logogeorge=new Array()
logogeorge[0]=["/_images/_buttons/L_g1.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logogeorge[1]=["/_images/_buttons/L_g2.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logogeorge[2]=["/_images/_buttons/L_g3.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]
logogeorge[3]=["/_images/_buttons/L_g5.jpg", "http://london.liverpoolstreet.andaz.com", "_blank"]

var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages2[0]=["/fade/photo4.jpg", "", ""] //plain image syntax
fadeimages2[1]=["/fade/photo5.jpg", "http://www.cssdrive.com", ""] //image with link syntax
fadeimages2[2]=["/fade/photo6.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax
 
var fadebgcolor="#2b1f28"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
