//function checkContainer(){
	//var location = top.document.location.pathname+""
	//if (location.indexOf('index.html')==-1 && location!='/'){
	//	top.document.location='/index.html?'+document.location.pathname;
	//}
//}

var captions = new Array();
captions[0]='Ylda Novik, a Hungarian-American pianist, was like a second mother as well as being a wonderful teacher.'
captions[1]='Ana-Maria\'s first encounter with Leon Fleisher, who was to take her on as his pupil about two years later, after a rehearsal with the Baltimore Symphony.'
captions[2]='Four hands with Dmitri Kabalevsky at the Smithsonian.'
captions[3]='With the unforgettable Arthur Fiedler, with whom she toured all over North America.'
captions[4]='A first recording for Philips at age eleven, for which she later received a Gold Record.'
captions[5]='With President and Mrs. Jimmy Carter at the White House.'
captions[6]='White House letter.<br /><br /><a href="/images/photos/photo07_large.jpg" onclick="showPopup(\'../large_photo.html\',478,350);return false">Zoom in on letter</a>.'
captions[7]='At the Washington International School, where pupil Ana-Maria played for a visiting Lord Mountbatten.'
captions[8]='Honoured by Bolivia with a commemorative postage stamp at age sixteen.'
captions[9]='In Bolivia with the miners of Huanuni, following a tour of the tin mines.'
captions[10]='At the invitation of Riccardo Muti, Ana-Maria replaced an ailing Claudio Arrau in a memorable series of concerts with the Philadelphia Orchestra.'
captions[11]='Rehearsing with the Rotterdam Philharmonic.<br /><br />Photograph: Caspari de Geus'
captions[12]='In Paris, her home for many years, posing for a dear friend, the great Jeanloup Sieff.'
captions[13]='Her encounter with Ivry Gitlis led to a decade of close collaboration and a deepening knowledge of the chamber music reperoire.'
captions[14]='In the Bolivian salt desert of Uyuni, just one leg of a most incredible musical expedition.'
captions[15]='Co-adventurers on the same journey, beneath the fossilized dinosaur footsteps in Kalorko just outside Sucre, friends and colleagues David Stern, Chen Halevi, Itamar Golan and Zhung Pham.'
captions[16]='At one point the piano showed up in a train cemetary on the Altiplano.'
captions[17]='With Radu Lupu, a most generous and inspiring musician and friend.'
captions[18]='With Joshua Bell in Warsaw during their 2003 European tour'
captions[19]='With Steven Isserlis after a performance for Prince Charles at Highgrove.'
captions[20]='With Alfred and Adrian Brendel on a brief holiday in Provence.'
//captions[21]='Enjoying the scenery around one of her favourite places and chamber music meccas, Prussia Cove in Cornwall.'
captions[21]='John and Ana-Maria get hitched in the Californian desert.'

var images = new Array();
var cImage = 0

function showPopup(url,height,width){
	window.open(url,'popupWin','toolbar=no,directories=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,width='+width+',height='+height)
}

function rollOver(item){
	if (item.src.indexOf("_off")!=-1){
		item.src="images/"+item.id+"_over.gif";}
	else{
		item.src="images/"+item.id+"_off.gif";}
}

function initPhotos(){
	var imgNum = 0
	var imgs = document.getElementsByTagName("img")
	for (i=0; i<imgs.length; i++){
		if (imgs[i].id.indexOf('photo')!=-1){
			images[imgNum] = new Array()
			images[imgNum][0]=imgs[i].id
			images[imgNum][1]=imgs[i].title
			imgNum++
		}
	}
}

function setImage(thumbnail){
	var photoCaption = document.getElementById('photoCaption');
	var mainImage = document.getElementById('mainImage');
	if (thumbnail.id.indexOf('arrow')!=-1){
		if (thumbnail.id.indexOf('next')!=-1){
			if(cImage==images.length-1){cImage=-1;}
			cImage = cImage+1
		}else{
			if(cImage==0){cImage=images.length;}
			cImage = cImage-1
		}
		mainImage.src = "images/photos/"+images[cImage][0]+".jpg"
		mainImage.title = images[parseFloat(cImage)][1]
		photoCaption.innerHTML=captions[cImage];		
	}else{
		for (i=0; i<images.length; i++){
			if (images[i][0]==thumbnail.id){
				mainImage.src = "images/photos/"+thumbnail.id+".jpg"
				mainImage.title = images[i][1]
				photoCaption.innerHTML=captions[i];
				cImage = i
			}
		}
	}
}