<!-- //

function BullStatistic()
{
	var colorDepth = window.screen.colorDepth;
	var res = window.screen.width + "," + window.screen.height;
	var referer = escape(document.referrer);
	document.write('<img src="/statystyka/zlicz.php?colors=' + colorDepth + '&resolution=' + res + '&referer=' + referer + '" style="width:0;height:0;" />');
}

function przedstawicieleLista(id)
{
	jQuery.get("/ajax/przedstawicieleLista.php", { woj_id: id },

		function(data)
		{
			jQuery('#mapaPrzedstawicieliLista').html(data);
			window.scroll(0,500);
  		}

	);
}

function PokazPrzedstawicieli(id)
{
	jQuery.get("/ajax/zwrocListePrzedstawicieli.php", { id: id },

		function(data)
		{
			jQuery('#map_przedstawiciele').html(data);
			window.scroll(0,500);
  		}

	);
}

function ZoomText(zoom,contener)
{
	if(zoom == "+1")
	{
		$('#'+contener).css('font-size',(parseInt($('#'+contener).css('font-size')) + 2)+'px');
		$('#'+contener).css('line-height',(parseInt($('#'+contener).css('line-height')) + 2)+'px');
	}
	else if(zoom == "-1")
	{
		$('#'+contener).css('font-size',(parseInt($('#'+contener).css('font-size')) - 2)+'px');
		$('#'+contener).css('line-height',(parseInt($('#'+contener).css('line-height')) - 2)+'px');
	}
	else
	{
		$('#'+contener).css('font-size','12px');
		$('#'+contener).css('line-height','18px');
	}
}

function SendForm(form,send)
{
	jQuery("#send").val(jQuery("#"+send).val());
	jQuery("#"+form).submit();
}

function CheckValidEmail(adres)
{
   a = adres.search(/@/i);
   a1 = adres.substring(0,a);
   a2 = a1.length;
   a = a + 1;
   b = adres.indexOf(".");
   b1 = adres.substring(a,b);
   b2 = b1.length;
   b = b + 1;
   c = adres.length;
   c1 = adres.substring(b,c);
   c2 = c1.length;
   if(adres.indexOf("@") != "-1" && adres.indexOf(".") != "-1" && a2 >= 1 && b2 >= 1 && c2 >= 1)
   {
   	return true;
   }
   else
   {
   	return false;
   }
}

function EaZyMap()
{
	this.arrMarkers = new Array();
	this.mapaSM = '';
	this.addMarker = function(lat,lon,txt) {
		var marker = new GMarker(new GLatLng(lat,lon),{title: txt});
		marker.txt = txt;
		GEvent.addListener(marker,"click",function() {
			marker.openInfoWindowHtml(marker.txt);
		});
		this.arrMarkers.push(marker);
		this.mapaSM.addOverlay(marker);
		marker.openInfoWindowHtml(marker.txt);
	}
	this.load = function (box_id,centerPointLat,centerPointLng,zoom) {
		this.mapaSM = new GMap2(document.getElementById(box_id));
		if(zoom == 0) zoom = 15;
		this.mapaSM.setCenter(new GLatLng(centerPointLat,centerPointLng),zoom);
		this.mapaSM.addControl(new GLargeMapControl());
		this.mapaSM.addControl(new GOverviewMapControl());
		this.mapaSM.addControl(new GMapTypeControl());
		if(this.arrMarkers.length>0)
		{
			for(var i = 0; i < this.arrMarkers.length; i++)
			{
				this.mapaSM.addOverlay(this.arrMarkers[i]);
			}
		}
		return this.mapaSM;
	}
}

// -->
