function SetOpacity(oObject, iShowOpacity) {
	if (IE4) {
		// IE/Win
		oObject.style.filter = "alpha(opacity:"+iShowOpacity+")";			
	}else if (NS4) {
		// Older Mozilla and Firefox
		oObject.style.MozOpacity = iShowOpacity/100;						
	} else {
		// Safari 1.2, newer Firefox and Mozilla, CSS3
		oObject.style.opacity = iShowOpacity/100;			
	}		
}

var iScreenShotOpacity;
var oImageMain;
var oImageFade;
var bFirst=1;

var iCurrentImage=0;

function RotateImages() {
	
	if (bFirst==1) {
		bFirst=0;
		
		if (aImage.length>1) {
			setTimeout('RotateImages()',5000);
		}
		return;
	}
	
	iCurrentImage++;
	
	iCurrentImage=iif(iCurrentImage==aImage.length,0,iCurrentImage);
	
	ShowNextImage(aImage[iCurrentImage]);
			
	setTimeout('RotateImages()',5000);	

}

function ShowNextImage(sImageURL) {

	oImageMain=document.getElementById('imgMain');
	oImageFade=document.getElementById('imgFade');


	//swap the images over - set current to back
	oImageFade.src=oImageMain.src;
	oImageMain.src=sImageURL;
	
	//show 'em
	SetOpacity(oImageMain,0);
	SetOpacity(oImageFade,99.99);		
	
	oImageFade.style.display='';
	iScreenShotOpacity=0;
	FadeInOut();
	
}

function FadeInOut() {
	SetOpacity(oImageMain,iScreenShotOpacity);
	SetOpacity(oImageFade,100-iScreenShotOpacity);
	
	iScreenShotOpacity+=2;
	if (iScreenShotOpacity<100) {
		setTimeout('FadeInOut()',5);
	} else {
		oImageFade.style.display='none';
	}
}	


var iHighlightCount;

function PropertyBook() {
	window.location='#';
	iHighlightCount=0;
	setTimeout('PropertyBookSetHighlight()',200);
	
}


function PropertyBookSetHighlight() {
	f.GetObject('divSearch').className+=' highlight'
	setTimeout('PropertyBookHideHighlight()',500);
}

function PropertyBookHideHighlight() {
	f.GetObject('divSearch').className=f.GetObject('divSearch').className.replace(' highlight','');
	iHighlightCount++;
	if (iHighlightCount<2) {
		setTimeout('PropertyBookSetHighlight()',500);
	}
}
