function getZoomLebelFromWidth(width)
{
	if (width <= 0.004827976226806641) {
		return 16;
	} else if (0.004827976226806641 < width && width <= 0.009655952453613281) {
		return 16;
	} else if (0.009655952453613281 < width && width <=0.019311904907226562) {
		return 15;
	} else if (0.019311904907226562 < width && width <=0.038623809814453125) {
		return 14;
	} else if (0.038623809814453125 < width && width <=0.07724761962890625) {
		return 13;
	} else if (0.07724761962890625 < width && width <=0.1544952392578125) {
		return 12;
	} else if (0.1544952392578125 < width && width <=0.308990478515625) {
		return 11;
	} else if (0.308990478515625 < width && width <=0.61798095703125) {
		return 10;
	} else if (0.61798095703125 < width && width <=1.2359619140625) {
		return 9;
	} else if (1.2359619140625 < width && width <=2.471923828125) {
		return 8;
	} else if (2.471923828125 < width && width <=4.94384765625) {
		return 7;
	} else if (4.94384765625 < width && width <=9.8876953125) {
		return 6;
	} else if (9.8876953125 < width && width <=19.775390625) {
		return 5;
	} else if (19.775390625 < width && width <=39.55078125) {
		return 4;
	} else if (39.55078125 < width && width <=79.1015625) {
		return 3;
	} else if (79.1015625 < width && width <=158.203125) {
		return 2;
	} else if (158.203125 < width && width <=316.40625) {
		return 1;
	} else if (316.40625 < width) {
		return 0;
	}
}

function zoomMap(x, y, width)
{
	var newCenter = new GLatLng(y, x);
	var newZoomLebel = getZoomLebelFromWidth(width);
	map.setCenter(newCenter, newZoomLebel);
   	window.scrollTo(0,0);
}

