function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}


function allBlur() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href"))
anchor.onfocus = function(){this.blur();};
}
}



function hideShow1(){
//select the first button
var button1 = $('button1');

//select the first content element
var content1 = $('contentElement1');


//The height transition we attach to 'contentElement1'
var b1Toggle = new Fx.Style('contentElement1', 'height',{duration: 300});


//add an onclick event listener to button1
button1.addEvent('click', function(){
  //toggle height transition (hide-show)
  if(content1.getStyle('height').toInt() > 0){
    //hide
  b1Toggle.start(0);
  }else{
    //show
    b1Toggle.start(c1Height);
  }
  //toggle classname button1 <-> button1 button1_
  button1.toggleClass('button1_');
  return false;
});



//set css display:block for the contentElements
content1.setStyle('display','block');


//get the scrollSize of the contentElements
var c1Height = content1.getSize().scrollSize.y;

};




function hideShow2(){
//select the first button
var button1 = $('button2');

//select the first content element
var content1 = $('contentElement2');


//The height transition we attach to 'contentElement1'
var b1Toggle = new Fx.Style('contentElement2', 'height',{duration: 300});


//add an onclick event listener to button1
button1.addEvent('click', function(){
  //toggle height transition (hide-show)
  if(content1.getStyle('height').toInt() > 0){
    //hide
  b1Toggle.start(0);
  }else{
    //show
    b1Toggle.start(c1Height);
  }
  //toggle classname button1 <-> button1 button1_
  button1.toggleClass('button2_');
  return false;
});



//set css display:block for the contentElements
content1.setStyle('display','block');


//get the scrollSize of the contentElements
var c1Height = content1.getSize().scrollSize.y;

};







window.onload = function () {
externalLinks ();
allBlur();
if(document.getElementById('wyszukiwarka_zaawansowana_link')!=null) {
	document.getElementById('wyszukiwarka_zaawansowana_link').style.display='block';
}
hideShow1();
hideShow2();
} 


















