var index = 1;

function viewPhotoThumb (count) {
	var cbox = eval('document.photoform.caption'+count);
	var img = document.getElementById('photo'+count);
	var caption = document.getElementById('caption');
	if (img && cbox && caption) {
		var img_old = document.getElementById('photo'+index);
		if (img_old) { img_old.style.display = 'none'; }

		img.style.display = '';
		index = count;

		caption.innerHTML = cbox.value;
	}
}

function viewPhotoFull (id, count) {
	var box = eval('document.photoform.photo_id'+count);
	if (box) {
		this.location = '/images/properties/'+id+'-'+box.value+'.jpg';
	}
}

