function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
    if(window.screen)if(isCenter)if(isCenter=="true"){
	var myLeft = (screen.width-myWidth)/2;
	var myTop = (screen.height-myHeight)/2;
	features+=(features!='')?',':'';
	features+=',left='+myLeft+',top='+myTop;
    }
    window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function checkEnter(e){ //e is event object passed from function invocation
    var characterCode //literal character code will be stored in this variable
//    window.alert(e);
    if(e && e.which){ //if which property of event object is supported (NN4)
        e = e;
        characterCode = e.which; //character code is contained in NN4's which property
    }else{
	e = event;
        characterCode = e.keyCode; //character code is contained in IE's keyCode property
    }

    if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
	//document.forms[0].submit() //submit the form
	document.location.href='/kereses/'+document.getElementById('keres').value+'.html';
        return false;
    }else{
        return true;
    }
}

function titleWriter(txt,txtSize,txtColor,txtBold){
/*
if (txt!=null){
txt=txt.replace(/ /g,"%20");
txt=txt.replace(/á/g,"%c3%a1");
txt=txt.replace(/Á/g,"%c3%81");
txt=txt.replace(/é/g,"%c3%a9");
txt=txt.replace(/É/g,"%c3%89");
txt=txt.replace(/í/g,"%c3%ad");
txt=txt.replace(/Í/g,"%c3%8d");
txt=txt.replace(/ó/g,"%c3%b3");
txt=txt.replace(/Ó/g,"%c3%93");
txt=txt.replace(/ö/g,"%c3%b6");
txt=txt.replace(/Ö/g,"%c3%96");
txt=txt.replace(/õ/g,"%c3%b5");
txt=txt.replace(/Õ/g,"%c3%95");
txt=txt.replace(/ô/g,"%c3%b5");
txt=txt.replace(/Ô/g,"%c3%95");
txt=txt.replace(/ú/g,"%c3%ba");
txt=txt.replace(/Ú/g,"%c3%9a");
txt=txt.replace(/ü/g,"%c3%bc");
txt=txt.replace(/Ü/g,"%c3%9c");
txt=txt.replace(/û/g,"%c3%bb");
txt=txt.replace(/Û/g,"%c3%9b");
//txt=txt.replace(/</g,"%3c"); 
//txt=txt.replace(/>/g,"%3e"); 
txt=txt.replace(/\+/g,"%2b");  
txt=txt.replace(/uuu/g,"%c3%bb");
txt=txt.replace(/UUU/g,"%c3%9b");
//txt=txt.replace(/u/g,"%c3%bb");
//txt=txt.replace(/U/g,"%c3%9b");
}
if (txt==null)txt="SkiNet";
if (txtSize==null)txtSize="20";
//if (txtColor==null)txtColor="0x333333";
if (txtColor==null)txtColor="0x222222";
if (txtBold==null)txtBold="true";
*/
//document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="550" height="36">');
//document.write('<param name="movie" value="/swf/headertext.swf?txt='+txt+'&size='+txtSize+'&bold='+txtBold+'&color='+txtColor+'" />');
//document.write('<param name="quality" value="high" />');
//document.write('<param name="wmode" value="transparent" />');
//document.write('<embed src="/swf/headertext.swf?txt='+txt+'&size='+txtSize+'&bold='+txtBold+'&color='+txtColor+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="36"></embed>');
//document.write('</object>');


//document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="460" height="36">')
//document.write('<param name="movie" value="/swf/headertext.swf?txt='+txt+'&size='+txtSize+'&bold='+txtBold+'&color='+txtColor+'" />');
//document.write('<param name="quality" value="high" />');
//document.write('<param name="wmode" value="transparent" />');
//document.write('<embed src="/swf/headertext.swf?txt='+txt+'&size='+txtSize+'&bold='+txtBold+'&color='+txtColor+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="460" height="36"></embed>');
//document.write('<embed src="/swf/headertext.swf?txt='+txt+'&size='+txtSize+'&bold='+txtBold+'&color='+txtColor+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="460" height="36"></embed>');
//

document.write('<h1 style="width:550px;">'+txt+'</h1>');


}

function num(sz){
            v='';
            for (i=0;i<sz.length;i++) {
                c=sz.substr(i,1);
                if (!isNaN(parseInt(c))) v=v+c;
            }
            return v;
}

/************************************************************************************************************
(C) www.dhtmlgoodies.com, November 2005

This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	

Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.

Thank you!

www.dhtmlgoodies.com
Alf Magne Kalleland

************************************************************************************************************/

var slide_slideSpeed = 10;	// Higher value = faster
var slide_timer = 10;	// Lower value = faster

var objectIdToSlideDown = false;
var slide_activeId = false;
var slide_slideInProgress = false;
function showHideContent(e,inputId)
{
    if(slide_slideInProgress)return;
    slide_slideInProgress = true;
    if(!inputId)inputId = this.id;
    inputId = inputId + '';
    var numericId = inputId.replace(/[^0-9]/g,'');
    var answerDiv = document.getElementById('slide_a' + numericId);

    objectIdToSlideDown = false;
    
    if(!answerDiv.style.display || answerDiv.style.display=='none'){		
	if(slide_activeId &&  slide_activeId!=numericId){			
	    objectIdToSlideDown = numericId;
	    slideContent(slide_activeId,(slide_slideSpeed*-1));
	}else{
	    
	    answerDiv.style.display='block';
	    answerDiv.style.visibility = 'visible';
	    
	    slideContent(numericId,slide_slideSpeed);
	}
    }else{
	slideContent(numericId,(slide_slideSpeed*-1));
	slide_activeId = false;
    }	
}

function slideContent(inputId,direction)
{
    
    var obj =document.getElementById('slide_a' + inputId);
    var contentObj = document.getElementById('slide_ac' + inputId);
    height = obj.clientHeight;
    if(height==0)height = obj.offsetHeight;
    height = height + direction;
    rerunFunction = true;
    if(height>contentObj.offsetHeight){
	height = contentObj.offsetHeight;
	rerunFunction = false;
    }
    if(height<=1){
	height = 1;
	rerunFunction = false;
    }

    obj.style.height = height + 'px';
    var topPos = height - contentObj.offsetHeight;
    if(topPos>0)topPos=0;
    contentObj.style.top = topPos + 'px';
    if(rerunFunction){
	setTimeout('slideContent(' + inputId + ',' + direction + ')',slide_timer);
    }else{
	if(height<=1){
	    obj.style.display='none'; 
	    if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
		document.getElementById('slide_a' + objectIdToSlideDown).style.display='block';
		document.getElementById('slide_a' + objectIdToSlideDown).style.visibility='visible';
		slideContent(objectIdToSlideDown,slide_slideSpeed);				
	    }else{
		slide_slideInProgress = false;
	    }
	}else{
	    slide_activeId = inputId;
	    slide_slideInProgress = false;
	}
    }
}

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
 if(window.screen)if(isCenter)if(isCenter=="true"){
   var myLeft = (screen.width-myWidth)/2;
   var myTop = (screen.height-myHeight)/2;
   features+=(features!='')?',':'';
   features+=',left='+myLeft+',top='+myTop;
 }

window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function initShowHideDivs()
{
    var divs = document.getElementsByTagName('DIV');
    var divCounter = 1;
    for(var no=0;no<divs.length;no++){
	if(divs[no].className=='slide_question'){
	    divs[no].onclick = showHideContent;
	    divs[no].id = 'slide_q'+divCounter;
	    var answer = divs[no].nextSibling;
	    while(answer && answer.tagName!='DIV'){
		answer = answer.nextSibling;
	    }
	    answer.id = 'slide_a'+divCounter;	
	    contentDiv = answer.getElementsByTagName('DIV')[0];
	    contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px'; 	
	    contentDiv.className='slide_answer_content';
	    contentDiv.id = 'slide_ac' + divCounter;
	    answer.style.display='none';
	    answer.style.height='1px';
	    divCounter++;
	}		
    }	
}
window.onload = initShowHideDivs;                                                      
