function restrictZoom(minzoom,maxzoom)
{
	var mapTypes = G_DEFAULT_MAP_TYPES;
	for(var i = 0;i < mapTypes.length;i++)
	{
		mapTypes[i].getMaximumResolution = function(latlng)
		{
			return maxzoom;
		};
		mapTypes[i].getMinimumResolution = function(latlng)
		{
			return minzoom;
		};
	}
}
function getWindowSize()
{
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' )
	{
		//Non-IE myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
	{
		//IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	}
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
	{
		//IE 4 compatible myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return { x : myWidth, y : myHeight	};
}

function getIcon(images)
{
	var icon = null;
	if (images)
	{
		if (icons[images[0]])
		{
			icon = icons[images[0]];
		}
		else
		{
			var imgfolder = 'img';
			icon = new GIcon();
			icon.image = imgfolder + "/" + images[0] + ".png";
			var size = iconData[images[0]];
			icon.iconSize = new GSize(size.width, size.height);
			icon.iconAnchor = new GPoint(size.width >> 1, size.height >> 1);
			icon.infoWindowAnchor = new GPoint(size.width >> 1, size.height >> 1);
			//icon.infoWindowAnchor = new GPoint(20, 5);
			icon.shadow = imgfolder + "/" + images[1] + ".png";
			size = iconData[images[1]];
			icon.shadowSize = new GSize(size.width, size.height);
			icons[images[0]] = icon;
		}
	}
	return icon;
}

function createMarker(point,name,html,icon,drag)
{
	if(drag==='undefined') drag = false;

	var marker = new GMarker(point,
	{
		icon:icon,
		draggable:drag
	}
	);
	GEvent.addListener(marker, "click", function()
	{
		marker.openInfoWindowHtml(html);
	}
	);
	return marker;
}

