// JavaScript Document
function doFirstBays()
{
	topIm="mainSub2";
	bottomIm="mainSub1";
	///document.getElementById(topIm).className ="fadeClass0";
			//document.getElementById(bottomIm).className = "fadeClass1";
	theDIms= new Array();
	theDIms[0] = new Image();theDIms[0].src = "images/locations/bayswater/2.jpg";
theDIms[1] = new Image();theDIms[1].src = "images/locations/bayswater/4.jpg";	
numImages = 2;
theTotImages=2;
document.getElementById("mainSub1").src=theDIms[0].src;	
document.getElementById("mainSub2").src=theDIms[1].src;	
doFirst1();
}
	////////
	function doFirstMar()
{
	topIm="mainSub2";
	bottomIm="mainSub1";
	///document.getElementById(topIm).className ="fadeClass0";
			//document.getElementById(bottomIm).className = "fadeClass1";
theDIms= new Array();	
theDIms[0] = new Image();theDIms[0].src = "images/locations/marylebone/8.jpg";
theDIms[1] = new Image();theDIms[1].src = "images/locations/marylebone/9.jpg";
theDIms[2] = new Image();theDIms[2].src = "images/locations/marylebone/10.jpg";
theDIms[3] = new Image();theDIms[3].src = "images/locations/marylebone/11.jpg";
numImages = 4;
theTotImages=4;
document.getElementById("mainSub1").src=theDIms[0].src;	
document.getElementById("mainSub2").src=theDIms[1].src;	
doFirst1();

}
	//////
function toBaysFade()
{

doFirst1();
}
///////
function doFirst1()
{
	
	window.setTimeout('fadeIn1(0)',changeInterval)
	}
//////////////
function fadeIn1(n){
	
theActImage = document.getElementById(topIm);

theBrowserType=theActImage.filters? "ie" : typeof theActImage.style.MozOpacity=="string"? "mozilla" : navigator.userAgent.indexOf("Safari") > 0 ? "safari" : ""
if (theBrowserType=="mozilla" || theBrowserType=="safari")
	{theActImage.style.MozOpacity=startLevel;theActImage.style.opacity=startLevel;}
else if (theBrowserType=="ie")
	theActImage.filters.alpha.opacity=startLevel;
if (theBrowserType=="mozilla" || theBrowserType=="safari") {var theIntV = mozFadeInt} else {var theIntV = ieInt}
highlighting=setInterval("gradualfadeIn1(theActImage)",theIntV)
}

function gradualfadeIn1(theIm2Fade){
	
	
if (theBrowserType=="mozilla" && theIm2Fade.style.MozOpacity < 0.99)
{theIm2Fade.style.MozOpacity=Math.min(parseFloat(theIm2Fade.style.MozOpacity)+mozInc, 0.99)}
else if (theBrowserType=="safari" && theIm2Fade.style.opacity < 0.99)
{theIm2Fade.style.opacity=Math.min(parseFloat(theIm2Fade.style.opacity)+mozInc, 0.99)}
else if (theBrowserType == "ie" && theIm2Fade.filters.alpha.opacity < 100)
theIm2Fade.filters.alpha.opacity += ieInc
else if (window.highlighting)
{clearInterval(highlighting);currentImage +=1;currentImage==theTotImages?currentImage=0 : currentImage=currentImage;
 document.getElementById(bottomIm).src =theDIms[currentImage].src
 
 setfade = window.setTimeout('setUpfadeOut1(0)',changeInterval)
}
}
function setUpfadeOut1(n)
{ theActImage = document.getElementById(topIm);
 if (theBrowserType=="mozilla" || theBrowserType=="safari") {var theIntV = mozFadeInt} else {var theIntV = ieInt}

 highlighting=setInterval("gradualFadeOut1(theActImage)",theIntV)
}
function gradualFadeOut1(theIm2Fade){
if (theBrowserType=="mozilla" && theIm2Fade.style.MozOpacity > 0.01)
{theIm2Fade.style.MozOpacity=Math.max(parseFloat(theIm2Fade.style.MozOpacity)-mozInc, 0.01)}
else if (theBrowserType=="safari" && theIm2Fade.style.opacity > 0.01)
{theIm2Fade.style.opacity=Math.max(parseFloat(theIm2Fade.style.opacity)-mozInc, 0.01)}
else if (theBrowserType == "ie" && theIm2Fade.filters.alpha.opacity >0)
	theIm2Fade.filters.alpha.opacity -= ieInc
else if (window.highlighting)
{clearInterval(highlighting); currentImage +=1;currentImage==theTotImages?currentImage=0 : currentImage=currentImage;

 document.getElementById(topIm).src =theDIms[currentImage].src
 setfade = window.setTimeout('fadeIn1(0)',changeInterval)}
}
//////////////////////////