function hideshow(id1, id2 ,id3)
{
		document.getElementById(id1).style.display = '';
		document.getElementById('tab_'+id1).value = '1';
		document.getElementById('menu'+id1).className = 'aktywny';
		
		document.getElementById(id2).style.display = 'none';
		document.getElementById('menu'+id2).className = '';
		document.getElementById('tab_'+id2).value = '';
		document.getElementById(id3).style.display = 'none';
		document.getElementById('menu'+id3).className = '';
		document.getElementById('tab_'+id3).value = '';
				
	document.getElementById(id1).blur();
}

function hideshow_topic(id1, id2 ,id3, id4)
{
	document.getElementById(id1).style.display = '';
	document.getElementById('tab01'+id1).className = 'aktywny';
		
	document.getElementById(id2).style.display = 'none';
	document.getElementById('tab01'+id2).className = '';

	document.getElementById(id3).style.display = 'none';
	document.getElementById('tab01'+id3).className = '';

	document.getElementById(id4).style.display = 'none';
	document.getElementById('tab01'+id4).className = '';
				
	document.getElementById(id1).blur();
}

function doAction(elem, func1, func2)
{
	if (elem.checked)
	{
		ajaxEngine.sendRequest(func1);
	}
	else
	{
		ajaxEngine.sendRequest(func2);
	}
}

function addBookmark(title,url) { 
	 if (window.sidebar) { 
	  window.sidebar.addPanel(title, url,""); 
	 } else if( document.all ) { 
	  window.external.AddFavorite( url, title); 
	 } else if( window.opera && window.print ) { 
	  return true; 
	 } 
} 

function initializeMaps(adres,firma,info) {
    var geo = new GClientGeocoder();
    //adres = 'Warszawa, Tytoniowa 20';
    //firma = test;
    geo.getLatLng(adres,function(punkt)
    {
        if (!punkt)
        {
        // kod z tego miejsca zostanie wykonany, jeśli adres nie został odnaleziony
        }
        else
        {
            mapa = new GMap2(document.getElementById("map_canvas"),{mapTypes: [G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP]});
            npunkt = new GLatLng(punkt.lat()+0.001,punkt.lng());

            mapa.setCenter(npunkt, 15);
            var ikona = new GIcon();
            ikona.image='http://www.google.com/intl/en_ALL/mapfiles/marker.png';
            ikona.shadow='';
            ikona.iconSize=new GSize(20,34);
            ikona.iconAnchor=new GPoint(16,16);
            ikona.infoWindowAnchor=new GPoint(16,16);

            var marker = new GMarker(punkt,{icon: ikona, title: adres});
            marker.openInfoWindowHtml('<strong>'+firma+'</strong><br />'+adres+info);
            mapa.addOverlay(marker);
            mapa.addControl(new GMapTypeControl());
            mapa.addControl(new GSmallZoomControl3D());

        }
    });
    
}

