// Global utility functions

var Util = 
{
	getCustomIcon : function()
	{
		// Set up custom icon
        var icon = new GIcon();
        icon.image = "http://hereit.is/images/arrow.png";
        icon.shadow = "http://hereit.is/images/shadow.png";
        icon.iconSize = new GSize(85, 54);
        icon.shadowSize = new GSize(85, 54);
        icon.iconAnchor = new GPoint(42, 54);
        icon.infoWindowAnchor = new GPoint(60, 25);
        return icon;
	},
	
	insertSpinner : function(place)
	{
		// place is a jQuery object
		place.html(this.getSpinnerHtml());
	},
	
	getSpinnerHtml : function()
	{
		return '<div id="spinner"><img src="images/spinner.gif" /></div>';
	},
	
	isCheckboxChecked : function(id)
	{
		return $('#' + id).is(':checked');
		//return $('#' + id + ':checked').length > 0;
	}
};
