		
/* 	
	------------------------------------------------------------------------------
	/project/apps/album/app.js
	
	Search
	
   	------------------------------------------------------------------------------
    
    VERSION HISTORY:
 	20060209		1.0			MJH			Initial version
	------------------------------------------------------------------------------
*/

	var appName = "Album";
	var appType = "P";
	

	var start = 0;
	function Album_onload() {
		showPictures();	
	}
	

	function showPictures() {
		j = 0;
		for (i=start; i<start+picturesPerPage; i++) {
			img = document.getElementById("pic_" + j);

			if (pictures[i]) {
				path = pictures[i][0];
				title = pictures[i][1];
				//debug.write(i + " - " + path + " - " + title);
				if (img) {
					img.src = path;
				}
			
				
				
				
				
				img.style.display = "inline";
			}
			else {
				img.style.display = "none";
			}
			j++;

		}
	}
	
	function btnBack_onclick(ev, el) {
		if ((start-picturesPerPage) >=0) {
			start = start - picturesPerPage;
			showPictures();		
		}
	}
	
	
	function btnNext_onclick(ev, el) {
		
		if ((start + picturesPerPage) < numberOfPictures) {
			start = start + picturesPerPage;
			showPictures();		
		}
	}
	
	
  


