
	function Picture(thumbnail, main, photographer) {
		this.thumbnail = thumbnail;
		this.main = main;
		this.photographer = "" + photographer;
	}

	function nextInactive() {
		$("nextBtn").className = "inactive";
		$("prevBtn").className = "active";
	}
	function prevInactive() {
		$("nextBtn").className = "active";
		$("prevBtn").className = "inactive";
	}
	function nextActive() {
		$("nextBtn").className = "active";
	}
	function prevActive() {
		$("prevBtn").className = "active";
	}

	function movePrev() {
		if (curr_display != 0)	{
			this.className = "active";
			curr_display --;
			$("displayed").src = imgArr[curr_display].main;
			$("photocaption").innerHTML = imgArr[curr_display].photographer;
			if (curr_display == 0) {
				prevInactive();
			}
		} else {
			this.className = "inactive";
			// curr_display = imgArr.length -1;
		}
		// alert(this.className);
		return false;
	}
	function jumpPic(pic) {
		
		var index = pic.id.replace("pic_", "");
		// alert(index);
		if (imgArr[index]) {		
			$("displayed").src = imgArr[index].main;
			$("photocaption").innerHTML = imgArr[index].photographer;
			curr_display = index;
			if (curr_display == (imgArr.length -1)) {
				nextInactive();
			}
			if (curr_display == 0) {
				prevInactive();
			}
			if ((curr_display != (imgArr.length -1)) && (curr_display != 0)) {
				nextActive();
				prevActive();
			}
		} else {
			
		}
		return false;
	}
	function moveNext() {
		if (curr_display != imgArr.length-1){
			// alert(curr_display);
			curr_display++;
			$("displayed").src = imgArr[curr_display].main;
			$("photocaption").innerHTML = imgArr[curr_display].photographer;
			if (curr_display == (imgArr.length -1)) {
				nextInactive();
			}
			if (curr_display != 0) {
				prevActive();
			}
		} else {
			
		}
		return false;
	}
