
function showImage(imgID){

	var directoryName;	var imageName; 	var image_Extension = ".jpg"; var total_Images;
	
	var imageBoxId  = document.getElementById('imageBox');
	var imageBoxId_Src = imageBoxId.getAttribute("src",2); //get image src
	
	var imageBoxId_imgName = imageBoxId_Src.substring(imageBoxId_Src.lastIndexOf("/")+1,imageBoxId_Src.length);
	var imageBoxId_dirName = imageBoxId_Src.split(imageBoxId_imgName); //remove image naem get directory path
	
	var imageBoxId_imgPattern = imageBoxId_imgName.split("."); //remove .jpg

var img_pattern = imageBoxId_imgPattern[0].substring(imageBoxId_imgPattern[0].lastIndexOf("_")+1,imageBoxId_imgPattern[0].length);
	img_pattern = imageBoxId_imgPattern[0].split(img_pattern); //remove last charater Eg:1
	
	directoryName = imageBoxId_dirName[0];
	imageName = img_pattern[0];
	total_Images = document.getElementById('imageBox').getAttribute('total'); ;
	
	/*START: For display image onClick*/
	if(imgID == "imageBox"){
		var changeImage = imageBoxId_imgPattern[0].substring(imageBoxId_imgPattern[0].lastIndexOf("_")+1,imageBoxId_imgPattern[0].length);
		changeImage++;
		var imgID = changeImage;
		if(changeImage > total_Images){
			imgID = 1;
		}
	}		/*END: For display image onClick*/
	
	for(i=1;i<=total_Images;i++){
		document.getElementById(i).className="pageNumberBorder";
	}
	document.getElementById(imgID).className="pageNumberBorderSelected";
	document.getElementById('imageBox').src= directoryName + imageName + imgID + image_Extension;
}

