function getElementsByClass(node,searchClass,tag) {
	var classElements = new Array();
	var els = node.getElementsByTagName(tag); // use "*" for all elements
	var elsLen = els.length;
	var pattern = new RegExp("\\b"+searchClass+"\\b");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}


function nemkellSzemet() {
	var replaces = 0;
	var replaces2 = 0;
	var alltags = getElementsByClass(document,'nksz','A');
	for (i=0; i < alltags.length; i++) {
		while (alltags[i].innerHTML.indexOf('__kukac__') != -1 && replaces < 10000) {
			alltags[i].innerHTML = alltags[i].innerHTML.replace('__kukac__', String.fromCharCode(64));
			replaces++;
		}
		while (alltags[i].href.indexOf('__kukac__') != -1 && replaces2 < 10000) {
			alltags[i].href = alltags[i].href.replace('__kukac__', String.fromCharCode(64));
			replaces2++;
		}
	}
}


function send_form(formname){
   document.getElementById(formname).submit();
   return false;
}

 
function bookmark(address,sitename) {
  if (window.sidebar) {
    window.sidebar.addPanel(sitename, address,"");
  } else if( document.all ) {
    window.external.AddFavorite(address, sitename);
  } else if( window.opera && window.print ) {
    return true;
  }
}


function switchMenuContent(obj) {
	obj = (!obj) ? 'sub1' : obj;
	var contentDivs = document.getElementById('menu_container').getElementsByTagName('div');
	for (i=0; i<contentDivs.length; i++) {
		if (contentDivs[i].id && contentDivs[i].id.indexOf('sub') != -1) {
			contentDivs[i].className = 'hide';
		}
	}
	document.getElementById(obj).className = '';
	return false;
}


var DIVCHNGR_INTERVAL = 9000;var DIVCHNGR_PAGES;var divchngr_CurrentPage = 1;var divchngr_Run = true;var divchngr_Timeout;function divchngr_Page(this_site, this_html) {this.site = this_site;this.html = this_html;}function divchngr_NextPage() {return (divchngr_CurrentPage % DIVCHNGR_PAGES) + 1;}function divchngr_ButtonsUpdate() {if(divchngr_Run) classNotSelected = '';else classNotSelected = 'Dis';for(i = 1; i <= DIVCHNGR_PAGES; i++) {if(i == divchngr_CurrentPage) {classCurrButton = '_sel';} else {classCurrButton = classNotSelected;}document.getElementById('b' + i).className = 'button' + classCurrButton;}}function divchngr_ChangeDiv(page, run) {clearTimeout(divchngr_Timeout);divchngr_CurrentPage = page;divchngr_Run = run;var divchngr = document.getElementById('divchngr');var wrapper = document.getElementById('divchngr_wrapper');divchngr_ButtonsUpdate();divchngr.innerHTML = actions[divchngr_CurrentPage].html;wrapper.className = wrapper.className.replace(/article_../, 'article_' + actions[divchngr_CurrentPage].site);if(divchngr_Run) {divchngr_Timeout = setTimeout('divchngr_ChangeDiv(' + divchngr_NextPage() + ', true)', DIVCHNGR_INTERVAL);}}function divchngr_Play() {clearTimeout(divchngr_Timeout);divchngr_ChangeDiv(divchngr_NextPage(), true);}function divchngr_Pause() {clearTimeout(divchngr_Timeout);divchngr_Run = false;divchngr_ButtonsUpdate();}


function imageholderclass(){this.over=new Array();this.down=new Array();this.src=new Array();this.store=store;function store(src, down, over){var AL=this.src.length;this.src[AL]=new Image(); this.src[AL].src=src;this.over[AL]=new Image(); this.over[AL].src=over;this.down[AL]=new Image(); this.down[AL].src=down;}}var ih = new imageholderclass();var mouseisdown=0;function preloader(t){for(i=0;i<t.length;i++){if(t[i].getAttribute('srcover')||t[i].getAttribute('srcdown')){storeimages(t[i]);var checker='';checker=(t[i].getAttribute('srcover'))?checker+'A':checker+'';checker=(t[i].getAttribute('srcdown'))?checker+'B':checker+'';switch(checker){case 'A' : mouseover(t[i]);mouseout(t[i]); break;case 'B' : mousedown(t[i]); mouseup2(t[i]); break;case 'AB' : mouseover(t[i]);mouseout(t[i]); mousedown(t[i]); mouseup(t[i]); break;default : return;}if(t[i].src){t[i].setAttribute("oldsrc",t[i].src);}}}}function mouseup(t){var newmouseup;if(t.onmouseup){t.oldmouseup=t.onmouseup;newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");this.oldmouseup();}}else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");}}t.onmouseup=newmouseup;}function mouseup2(t){var newmouseup;if(t.onmouseup){t.oldmouseup=t.onmouseup;newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");this.oldmouseup();}}else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");}}t.onmouseup = newmouseup;}function mousedown(t){var newmousedown;if(t.onmousedown){t.oldmousedown=t.onmousedown;newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");this.oldmousedown();}}}else{newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");}}}t.onmousedown=newmousedown;}function mouseover(t){var newmouseover;if(t.onmouseover){t.oldmouseover=t.onmouseover;newmouseover=function(){this.src=this.getAttribute("srcover");this.oldmouseover();}}else{newmouseover=function(){this.src=this.getAttribute("srcover");}}t.onmouseover=newmouseover;}function mouseout(t){var newmouseout;if(t.onmouseout){t.oldmouseout=t.onmouseout;newmouseout=function(){this.src=this.getAttribute("oldsrc");this.oldmouseout();}}else{newmouseout=function(){this.src=this.getAttribute("oldsrc");}}t.onmouseout=newmouseout;}function storeimages(t){var s=(t.getAttribute('src'))?t.getAttribute('src'):'';var d=(t.getAttribute('srcdown'))?t.getAttribute('srcdown'):'';var o=(t.getAttribute('srcover'))?t.getAttribute('srcover'):'';ih.store(s,d,o);}function preloadimgsrc(){if(!document.getElementById) return;var it=document.getElementsByTagName('IMG');var it2=document.getElementsByTagName('INPUT');preloader(it);preloader(it2);}if(window.addEventListener){window.addEventListener("load", preloadimgsrc, false);} else{if(window.attachEvent){window.attachEvent("onload", preloadimgsrc);}else{if(document.getElementById){window.onload=preloadimgsrc;}}}