function goTo(pageno) {
	currentPosition = pageno - 1;
	// alert(currentPosition);
	document.getElementById("gotoFlip").value = (currentPosition + 1);
	$('#slideInner').animate( {
		'marginLeft' : slideWidth * (-currentPosition)
	});
	//showHideHotSpots();
}

function goprev() {
	if (currentPosition > 0) {
		currentPosition--;
		// alert(currentPosition);
		document.getElementById("gotoFlip").value = (currentPosition + 1);

		$('#slideInner').animate( {
			'marginLeft' : slideWidth * (-currentPosition)
		});
	}
	showHideHotSpots();
}

function gonext(pgno) {
	/* currentPosition = pgno -1; */
	if (currentPosition < (pgno - 1)) {
		currentPosition++;
		// alert(currentPosition);
		document.getElementById("gotoFlip").value = (currentPosition + 1);

		$('#slideInner').animate( {
			'marginLeft' : slideWidth * (-currentPosition)
		});
	}
	//showHideHotSpots();
}

function gonexts(pgno) {
	currentPosition = pgno;
	slideWidth = 863;
	/* # */
	var slides = $('.slide');
	var numberOfSlides = slides.length;
	$('#slidesContainer').css('overflow', 'hidden');
	slides.wrapAll('<div id="slideInner"></div>').css( {
		'float' : 'left',
		'width' : slideWidth
	});
	$('#slideInner').css('width', slideWidth * numberOfSlides);

	$('#slideshow')
			.prepend(
					'<span class="control" id="leftControl">Clicking moves left</span>')
			.append(
					'<span class="control" id="rightControl">Clicking moves right</span>');

	// manageControls(currentPosition);

	var pageno = 32;

	if (currentPosition < (pageno - 1)) {
		currentPosition = ($(this).attr('id') == 'rightControl') ? currentPosition + 1
				: currentPosition - 1;
		document.getElementById("gotoFlip").value = (currentPosition + 1);
		manageControls(currentPosition);
		$('#slideInner').animate( {
			'marginLeft' : slideWidth * (-currentPosition)
		});
	}

	/* # */
	if (currentPosition < (pgno - 1)) {
		currentPosition++;
		// alert(currentPosition);
		document.getElementById("gotoFlip").value = (currentPosition + 1);

		$('#slideInner').animate( {
			'marginLeft' : slideWidth * (-currentPosition)
		});
	}
	showHideHotSpots();
}

function gotoFlip(e) {
	if (e.which == '13') {
		var gotoFlip = document.getElementById("gotoFlip");
		var FlipValue = (gotoFlip.value) - 1;
		currentPosition = FlipValue;

		$('#slideInner').animate( {
			'marginLeft' : slideWidth * (-currentPosition)
		});
		showHideHotSpots();
		return true;
	}
}