

function OpenPicture( pic_index , wid_x , hei_y )
	{	
	NewWindow=window.open('','','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, fullscreen=no, channelmode=no, width='+wid_x+', height='+hei_y+', left=40, top=40');
	NewWindow.document.open();
	
	NewWindow.document.writeln("<head>");
	NewWindow.document.writeln("<title>Platforma Obywatelska Powiatu Rybnickiego</title>");
	
	NewWindow.document.writeln("<style type=\"text/css\">");
	NewWindow.document.writeln("body{font-family: Verdana; font-size:12;}");
	NewWindow.document.writeln("a:link{color:#0000FF;text-decoration:none;}");
	NewWindow.document.writeln("a:visited{color:#0000FF;text-decoration:none;}");
	NewWindow.document.writeln("a:hover{color:#EE0000;text-decoration:underline;}");
	NewWindow.document.writeln("</style>");
		
	NewWindow.document.writeln("</head>");	
	NewWindow.document.writeln("<body leftmargin=\"1\" topmargin=\"1\" rightmargin=\"1\">");
	NewWindow.document.writeln("<a href=\"javascript:window.close();\"><img src=\""+pic_index+"\" style=\"border: solid 0;\"></a>");
	NewWindow.document.writeln("<center>");
	NewWindow.document.writeln("<br /><a href=\"javascript:window.close();\">Zamknij</a><br />");
	NewWindow.document.writeln("</center>");
	NewWindow.document.writeln("</body>");
	NewWindow.document.close();
	NewWindow.focus();
	}


function big( lyr )
  {
  document.all[lyr].style.height='132px';
  }
  
function big2( lyr )
  {
  document.all[lyr].style.height='22px';
  }
  
  

function small( lyr )
  {
  document.all[lyr].style.height='22px';
  }

function staort()
  {
  document.all.Layer1.style.height='22px';
  document.all.Layer2.style.height='22px';
  document.all.Layer3.style.height='22px';
  //document.all.Layer4.style.height='22px';
  }


// w CMS'sie
function setsubmenu2()
  {
  document.all.div1.style.display = 'none';
  document.all.div2.style.display = 'none';
  document.all.div3.style.display = 'none';

  var id = document.nowaforma.parent_id.options[document.nowaforma.parent_id.selectedIndex].value;
  
  if(id==1)
    { document.all.div1.style.display = 'block'; }
  if(id==2)
    { document.all.div2.style.display = 'block'; }
  if(id==3)
    { document.all.div3.style.display = 'block'; }
  }
  
  
// na stronie głównej	
function setsubmenu()
  {
  document.all.back1.style.top = -600;
  document.all.back2.style.top = -600;
  document.all.back3.style.top = -600;

  var id = document.nowaforma.parent_id.options[document.nowaforma.parent_id.selectedIndex].value;

  if(id==1)
    { document.all.back1.style.top = -16; }
  if(id==2)
    { document.all.back2.style.top = -16; }
  if(id==3)
    { document.all.back3.style.top = -16; }
  }
  
  
function setrooms()
  {
  var index = document.nowaforma.lokalizacja2.options[document.nowaforma.lokalizacja2.selectedIndex].value;

  if( index >= 1 && index <= 4 )
    { document.nowaforma.rooms.value = index; }
  }
  
  
  
function showdiv(id)
  {
  if(id==1)
    document.all.button1.style.visibility='visible';
  if(id==2)
    document.all.button2.style.visibility='visible';
  }
  
function hidediv(id)
  {
  if(id==1)
    document.all.button1.style.visibility='hidden';
  if(id==2)
    document.all.button2.style.visibility='hidden';
  }
  
  
  
function pytanie( adres )
  {
  odp = window.confirm("Czy usun±ć wybran± pozycję?");

  if( odp == true )
    window.location.href = adres;
  }
  
  
  
  
  

