var totalComps = 4;var pagination = new Array(totalComps);pagination['20052579_20080231'] =  1;pagination['20052579_20080164'] =  2;pagination['20052579_20080162'] =  3;pagination['20052579_20080232'] =  4;var paginationValue = new Array(totalComps);paginationValue['1'] = '20052579_20080231';paginationValue['2'] = '20052579_20080164';paginationValue['3'] = '20052579_20080162';paginationValue['4'] = '20052579_20080232';function getIndex (articleID) {
	return pagination[articleID];
}

function paginationText (articleID) {
	document.write(getIndex(articleID) + ' of ' + totalComps);
} 

function currentPaginationNumber (articleID) {
	document.write(getIndex(articleID));
} 

function totalPaginationNumber (articleID) {
	document.write(totalComps);
} 

function getValue (index) {
	return paginationValue[index];
}

function paginationIndex (index) {
	document.write(getValue(index));
} 
function jumpto(articleID, galleryPhotosPath) {
	var incrJumps = 6;
	var currentPosition = getIndex(articleID);
	//alert(currentPosition);
	
	var html= "";
	currentStartIndex = parseInt((currentPosition - 1 )/incrJumps)*incrJumps+1;
	var count = 0;
	if(currentPosition != 1) {
		html = html + "<li class='first'><a title='First Slide' href="+galleryPhotosPath+"/0,," +  getValue(1) + ",00.html>First</a></li>"
	}
	var prevJumIndex = currentStartIndex - incrJumps;
	if(prevJumIndex >= 1) {
		html = html + "<li class='nextset'><a title='Previous Set' href="+galleryPhotosPath+"/0,," +  getValue(prevJumIndex) + ",00.html>&lt;&lt;</a></li>"
	}
	var prevIndex = currentPosition - 1;
	if(prevIndex >= 1) {
		html = html + "<li class='next'><a title='Previous' href="+galleryPhotosPath+"/0,," +  getValue(prevIndex) + ",00.html>&lt;</a></li>"
	}
	for ( var i = currentStartIndex; i <= totalComps;  i++ ) {
		value = getValue(i);
		if(count + currentStartIndex==currentPosition ) {
		html = html + "<li>"+i+"</li>";
		} else {
		html = html + "<li><a href="+galleryPhotosPath+"/0,," + value +",00.html>"+i+"</a></li>";
		}
		count++;
		if(count==incrJumps) {
			break;
		}
	}
	var nextJumIndex = currentStartIndex + incrJumps;
	var nextIndex = currentPosition + 1;
	if(nextIndex <= totalComps) {
		html = html + "<li class='next'><a title='Next' href="+galleryPhotosPath+"/0,," +  getValue(nextIndex) + ",00.html>&gt;</a></li>"
	}
	if(nextJumIndex < totalComps) {
		html = html + "<li class='nextset'><a title='Next Set' href="+galleryPhotosPath+"/0,," +  getValue(nextJumIndex) + ",00.html>&gt;&gt;</a></li>"
	}
	if(currentPosition != totalComps) {
		html = html + "<li class='last'><a title='Last Slide' href="+galleryPhotosPath+"/0,," +  getValue(totalComps) + ",00.html>Last</a></li>"
	}
	document.write(html);
	
}
