function PSMarkersTypes ()
{
	var me = this;
	me.small = [];
	me.normal = [];
	me.big = [];

	jQuery.ajax({
		async: false,
		url: URL_TO_AJAX,
		type: "POST",
		data: { m:'pc', a:'page_ajax_requests_public', what:'markersTypes' },
		dataType: "text",
		success: function (data) {
					var data = data.PSevalJSON();
					var path = data.iPath;
					var markerTypes = data.types;
					for ( var i = 0, n = markerTypes.length; i < n; i++ )
					{
						var type = markerTypes[i];
						
						var smallIcon = new GIcon();
						smallIcon.image = path + '/small/' + type.img.name;
						smallIcon.iconSize = new GSize(type.img.small.w, type.img.small.h);
						smallIcon.iconAnchor = new GPoint(type.img.small.w/2, type.img.small.h);
						smallIcon.infoWindowAnchor = new GPoint(type.img.small.w/2, type.img.small.h/5);

						var normalIcon = new GIcon();
						normalIcon.image = path + '/normal/' + type.img.name;
						normalIcon.iconSize = new GSize(type.img.normal.w, type.img.normal.h);
						normalIcon.iconAnchor = new GPoint(type.img.normal.w/2, type.img.normal.h);
						normalIcon.infoWindowAnchor = new GPoint(type.img.normal.w/2, type.img.normal.h/5);						

						var bigIcon = new GIcon();
						bigIcon.image = path + '/big/' + type.img.name;
						bigIcon.iconSize = new GSize(type.img.big.w, type.img.big.h);
						bigIcon.iconAnchor = new GPoint(type.img.big.w/2, type.img.big.h);
						bigIcon.infoWindowAnchor = new GPoint(type.img.big.w/2, type.img.big.h/5);						
												
						me.small.push( {id:type.id, name:type.name, icon:smallIcon} );
						me.normal.push( {id:type.id, name:type.name, icon:normalIcon} );
						me.big.push( {id:type.id, name:type.name, icon:bigIcon} );
					}				
				 },
		error: function (request, status, error) {
					var err = status || error;
					if (devel_js)
						alert('Wystąpił nieoczekiwany błąd podczas wczytywania typów markerów:\n' + error + '!');
			   }
	});
}

PSMarkersTypes.prototype.getSmall = function ( id )
{
	var type = this.small[id-1];
	if ( type.id == id )
		return type;
	else
		throw 'niespójność danych typów markerów';
}

PSMarkersTypes.prototype.getNormal = function ( id )
{
	var type = this.normal[id-1];
	if ( type.id == id )
		return type;
	else
		throw 'niespójność danych typów markerów';
}

PSMarkersTypes.prototype.getBig = function ( id )
{
	var type = this.big[id-1];
	if ( type.id == id )
		return type;
	else
		throw 'niespójność danych typów markerów';
}

PSMarkersTypes.prototype.getCount = function ()
{
	var s = this.small.length;
	var n = this.normal.length;
	var b = this.big.length;
	if ( s==n && n==b )
		return n;
	else
		throw 'niespójna liczba typów markerów';
}
