    window.onload = initPage;  
    
    /**
     * call functions onLoad
     */
    function initPage() {
        initLinks();        // actions by class name
    }

    
    /**
     * js functions by class name
     */    
    function initLinks() {
        
        if(!document.getElementsByTagName) {
            return true;
        }
        
        var pageLinks = document.getElementsByTagName("a");
        
        for(var i = 0; i < pageLinks.length; i++) {
            
            if(((pageLinks[i].className != null) && 
                (pageLinks[i].className != "")) ||
                ((pageLinks[i].parentNode.className != null) && 
                (pageLinks[i].parentNode.className != ""))) {
                    
                    var linkClass = " " + pageLinks[i].className + " ";
                    
                    if((linkClass == "  ") && (pageLinks[i].parentNode.className != "")) {
                        
                        linkClass = " " + pageLinks[i].parentNode.className + " ";
                    }
                    
                  for(var theKey in linkConfig) {
                      
                        if (linkClass.indexOf(" " + theKey + " ") > -1) {
                            
                            // closing
                            if(theKey == 'close') {
    
                                pageLinks[i].onclick = closeWindow;
                                
                            }
                            
                            // popups
                            else {
                            
                                if((pageLinks[i].target == "") || (pageLinks[i].target == null)) {
                                    
                                    pageLinks[i].target = (linkConfig [theKey][0] != "") ? linkConfig [theKey][0] : theKey;
                                }
                                
                                pageLinks[i].settings = linkConfig [theKey][1];
                                pageLinks[i].onclick = popUp;
                            }
                        }
                    }
            }
        }
        
        return true;
      
    }
    
    /**
     * popup
     */
    function popUp() {
        
      newWin = window.open(this.href, this.target, this.settings);
      newWin.focus();
      return false;
      
    } 
    
    /**
     * close
     */
    function closeWindow() {
        
        window.close()
        return false;
        
    }

    
    var linkConfig = new Array;
    
    linkConfig["popup"] = new Array ( "", "width=630,height=650,scrollbar=1,menubar=1,location=1,resizable=1,scrollbars=1");
    linkConfig["close"] = new Array();
    
    
    
    /**
     *
     */
    function advancedSearch() {
        
        obj = document.getElementById('ascontent');
        
        if(obj.style.display == 'none') {
            obj.style.display = 'block';
            return;
        }
        else {
            obj.style.display = 'none';
            return;
        }
        
    }
    
    /**
     *
     */
    function appForm() {
        
        aform = document.getElementById('appForm');
        alabel = document.getElementById('tgg');
        
        if(aform.style.display == 'block') {
            aform.style.display = 'none';
            alabel.innerHTML = 'Jelentkezés: &gt;';
            return;
        }
        else {
            aform.style.display = 'block';
            alabel.innerHTML = 'Jelentkezés: &lt;';
            return;
        }
        
    }    

    function toggleAdv() {
        
        var frm = document.getElementById('fieldset-adventrydata');
        
        if(frm.style.display == 'none') {
            frm.style.display = 'block';
        }
        else {
            frm.style.display = 'none';
        }
        
        
    }
    
