function hideDIV(item) 
{	
document.getElementById(item).style.display='none';		
}
function showDIV(item)
{	
document.getElementById(item).style.display='block';					      
}
function hideP(item) 
{	
document.getElementById(item).style.visibility='hidden';		
}
function showP(item)
{	
document.getElementById(item).style.visibility='visible';					      
}
	      

function openPlan(p) {
  var l=screen.width/2-400; var t=screen.height/2-300
  if (screen.width > 800) {
    eval("window.open('http://www.wm.pl/edytor/plany/plan.php?p=" + p + "','','width=800,height=600,left=" + l + ",top=" + t + "')")
    }
  else {
    eval("window.open('http://www.wm.pl/edytor/plany/plan.php?p=" + p + "','','fullscreen')");
    }  
  }

function openMap() {
  var l=screen.width/2-400; var t=screen.height/2-300
  if (screen.width > 800) {
		eval("window.open('http://www.wm.pl/edytor/mapy/mapa.php?map=tur&tryb=4&q=0','','width=800,height=600,left=" + l + ",top=" + t + "')")
  } else {
    window.open('http://www.wm.pl/edytor/mapy/mapa.php?map=tur&tryb=4&q=0','','fullscreen');
	}  
}

 function openPog() {
    var l=screen.width/2-340; var t=screen.height/2-240
     eval("window.open('http://ww3.wm.pl/modules/pogoda/pogoda.php','','width=540,height=600,left=10,top=10')");
  }
  
function kat_f_show_parent_seg(formID,fillDIV)    
    {
  	var pars;
  	pars='&'+Form.serialize(formID);
    var url = 'ajax_show_kat.php';
    target = fillDIV;
    var myAjax = new Ajax.Updater( {success: target}, url, { method: 'post', parameters: pars, onFailure: reportError }); 
    }

function kat_f_check_url(formID,fillDIV)
    {
  	var pars;
  	pars+='&'+Form.serialize(formID);
    var url = 'ajax_check_url.php';
    target = fillDIV;
    var myAjax = new Ajax.Updater( {success: target}, url, { method: 'post', parameters: pars, onFailure: reportError });
    }
    function kat_f_check_login(formID,fillDIV)
    {
  	var pars;
  	pars+='&'+Form.serialize(formID);
    var url = 'ajax_check_login.php';
    target = fillDIV;
    var myAjax = new Ajax.Updater( {success: target}, url, { method: 'post', parameters: pars, onFailure: reportError });
    }
       function kat_f_show_parent_seg2(formID,fillDIV)    
    {	
  	var pars;
  	pars+='&'+Form.serialize(formID);
    var url = 'ajax_show_kat2.php';
    target = fillDIV;
    var myAjax = new Ajax.Updater( {success: target}, url, { method: 'post', parameters: pars, onFailure: reportError }); 
    }
    
   function kat_f_show_sub_seg(fillDIV,serviceID,url) {
   	var pars = serviceID+"&url="+url;
    var url = '/ajax_show_sub_sect.php';
    target = fillDIV;

    var myAjax = new Ajax.Updater( {success: target}, url, { method: 'get', parameters: pars, onFailure: reportError });
    }
    
    function kat_f_show_newests_txt(fillDIV) {
   	var pars;
    var url = 'kat_newests_inc.php';
    target = fillDIV;
    var myAjax = new Ajax.Updater( {success: target}, url, { method: 'get', parameters: pars, onFailure: reportError });
    }
    
    
      // wyswietl komunikat błędu
  function reportError(request) { $('systemWorking').innerHTML = 'wystapił błąd'; }
  // wyświetl ikone oczekiwania
  function showWork(target) { $(target).innerHTML = '<img src="gfx/czekaj.jpg" />'; }
  
  
function bookmark(url, title){
if (window.sidebar) { // Mozilla Firefox Bookmark
window.sidebar.addPanel(title, url,"");
} else if( window.external ) { // IE Favorite
window.external.AddFavorite( url, title); }
else if(window.opera && window.print) { // Opera Hotlist
return true; }
}
