<!--

	var gridWidth = 1660;
	var gridHeight = 900;
	var currentRow = 1;
	var currentCol = 1;
	var startPosX = 0;
	var startPosY = 0;
	var endPosX = 0;
	var endPosY = 0;
	var cautionaryDistance = 240;
	scrollSpeed = new Array(1, 2, 4, 8, 16, 32, 48);
	scrollSpeedMinIndex = 2;
	scrollSpeedMaxIndex = 4;
	var  i = 0; //current index of scrollSpeed array

function teleport(row, col)
{
	var distanceLeft

	endPosX = (col - 1) * gridWidth
	endPosY = (row - 1) * gridHeight

	//update current position
	currentRow = row
	currentCol = col

	//animate to correct x-position
	while (startPosX != endPosX) {
		if (startPosX < endPosX) {
			startPosX += scrollSpeed[i]
			if (startPosX > endPosX) {
				startPosX = endPosX
			}
		}
		else if (startPosX > endPosX) {
			startPosX -= scrollSpeed[i]
			if (startPosX < endPosX) {
				startPosX = endPosX
			}	
		}
//		top.contentFrame.scroll(startPosX, startPosY)
		this.scrollTo(startPosX, startPosY)
		distanceLeft = Math.abs(startPosX - endPosX)
		if (distanceLeft < cautionaryDistance && i > scrollSpeedMinIndex) {
			i--
		}
		else if (i < scrollSpeedMaxIndex)	 {
			i++
		}
	}	 //end while

	i = 0
	//animate to correct y-position
	while (startPosY != endPosY) {
		if (startPosY < endPosY) {
			startPosY += scrollSpeed[i]
			if (startPosY > endPosY) {
				startPosY = endPosY
			}
		}
		else if (startPosY > endPosY) {
			startPosY -= scrollSpeed[i]
			if (startPosY < endPosY) {
				startPosY = endPosY
			}	
		}
//		top.contentFrame.scroll(startPosX, startPosY)
		this.scrollTo(startPosX, startPosY)
		distanceLeft = Math.abs(startPosY - endPosY)
		if (distanceLeft < cautionaryDistance && i > scrollSpeedMinIndex) {
			i--
		}
		else if (i < scrollSpeedMaxIndex)	 {
			i++
		}
	}	 //end while 
	startPosX = endPosX;
	startPosY = endPosY;
	i = 0

	//alert('positie: ' + endPosX + 'x' + endPosY)

} //end function teleport

-->