	////////////////////  Script for People From Village  //////////////////////////
	////////////////////////////////////////////////////////////////////////////////
	
	////////////////////////  Script for Image SlidShow ///////////////////////////

	var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)
	var photoBaseDir = 'PeopleFromAinDabesh/images/Thumbnails/';
	var photoSrcBaseDir = 'PeopleFromAinDabesh/images/Photos/';
	
	var firstPhoto = 10;  // variable pointing to the last image
	
	var lastPhoto = 0;  // variable pointing to the last image
	var current = 0; 	// variable pointing to the current viewed image
	
	
	function initCurrentImageIndex() {
		lastPhoto = document.slideform.lastIndex.value;
		current = lastPhoto;
	}
	function next() {
		if (current-1 >= firstPhoto) {
			newSrc = photoBaseDir + --current + '.jpg';
			document.images.show.src = newSrc;
		}else 
			 last();
	}
	function previous() {
		if (current+1 <= lastPhoto ) {
			newSrc = photoBaseDir + ++current + '.jpg';
			document.images.show.src = newSrc;
	   	}else 
			first();
	}
	function first() {
		current = lastPhoto ;
		newSrc = photoBaseDir + current + '.jpg';
		document.images.show.src = newSrc;
	}
	
	function last() {
		current = firstPhoto;
		newSrc = photoBaseDir + current + '.jpg';
		document.images.show.src = newSrc;
	}

	
	
	function openCurrentPhoto() {
		newSrc = photoSrcBaseDir + current + '.jpg';
		imagewindow = window.open(newSrc ,'a1024','width=1024,height=768,scrollbars =yes,top=0,left=0');
	}

	