var map = null;
var pinid = 0;

function GetMap()
{
	map = new VEMap('myMap');
	map.LoadMap(new VELatLong(42.33138889, +13.40333333), 13 ,'r' ,false);

	var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter());
	shape.SetTitle('Totani s.r.l.');
	shape.SetDescription('Concessionaria Toyota PIANOLA');
	pinid++;
	map.AddShape(shape);

	var shape1 = new VEShape(VEShapeType.Pushpin, (42.07277778, +13.36611111));
	shape1.SetTitle('Totani Company s.r.l.');
	shape1.SetDescription('Concessionaria Mitsubishi, Suzuki, Kia PETTINO');
	pinid++;
	map.AddShape(shape1);
}

function FilterTable(s, c)
{
	var rule = (navigator.appName == "Microsoft Internet Explorer") ? "block" : "table-row";
	var table = document.getElementById("listausato");
	var rs = table.getElementsByTagName("TR");
	var n = c;
	
	for (i=1; i < rs.length; i++) {
		rs[i].firstChild.childNodes[1].style.display = "none";
		
		if (n == 16) {
			document.getElementById("ss0").selectedIndex = 0;
			rs[i].style.display = ((rs[i].childNodes[5].innerHTML == s) || (s == "*")) ? rule : "none";
		}
		else {
			document.getElementById("ss16").selectedIndex = 0;
			rs[i].style.display = ((rs[i].childNodes[0].firstChild.innerHTML == s) || (s == "*")) ? rule : "none";
		}
	}
}

function OpenDetails(obj)
{
	if (obj.nextSibling.style.display != "block")
		obj.nextSibling.style.display = "block";
	else
		obj.nextSibling.style.display = "none";
}

function PopupIQ()
{
    Shadowbox.open({
        player:     'img',
        content:    '/e107_images/content_images/popup.jpg'
    });
};

