function resetPicPosition() {
	sc = document.getElementById('imageScrollOuterContainer');
	sc.style.backgroundPosition = "-1197px -134px";
	
	sc = document.getElementById('imageScrollOuterContainer').style;
	currentpos2 = sc.backgroundPosition.split(" ");
	cpW = currentpos2[0].replace("px","");
	cpH = currentpos2[1].replace("px","");
	tB = document.getElementById("textfield");
	cpW = parseInt(cpW);
	cpH = parseInt(cpH);
	document.getElementById('textfield').value=cpW;
	document.getElementById('textfield2').value=cpH;
	
}
function resetTimer() {
	if (timer) { window.clearInterval(timer); }
}
function MovePicPosition(direction) { 

	sc = document.getElementById('imageScrollOuterContainer').style;

	switch (direction) {
		case "l":
			timer = window.setInterval("MovePic('l')",10);	
		break;
		case "r":
			timer = window.setInterval("MovePic('r')",10);
		break;
		case "t":
			timer = window.setInterval("MovePic('t')",10);
		break;
		case "b":
			timer = window.setInterval("MovePic('b')",10);
		break;
		default: break;
	}

}
function MovePic(direction) {
	sc = document.getElementById('imageScrollOuterContainer').style;
	currentpos2 = sc.backgroundPosition.split(" ");
	cpW = currentpos2[0].replace("px","");
	cpH = currentpos2[1].replace("px","");
	cpW = parseInt(cpW);
	cpH = parseInt(cpH);
	
	switch (direction) {
		case 'l':
			if (cpW<-2) { sc.backgroundPosition = (cpW+5) + "px " + cpH + "px"; }
		break;
		case 'r':
			if (cpW > (-3372+980) ) { sc.backgroundPosition = (cpW-5) + "px " + cpH + "px"; }
		break;
		case 't':
			if (cpH < (0) ) { sc.backgroundPosition = cpW + "px " + (cpH+5) + "px"; }
		break;	
		case 'b':
			if (cpH > (-150) ) { sc.backgroundPosition = cpW + "px " + (cpH-5) + "px"; }
		break;					
		default:break;
	}
}
