﻿


/*vis/skjul søge kasser*/
var openClose = 0;
function searchButtonFunction(GetId) {
   
   if (openClose == GetId) {
        document.getElementById('searchButton' + GetId).className = "searchButton" + GetId + " SearchTextStyle";
        var target = $('#searchFields' + GetId);
        var h = target.height();
        var cssHeight = target.css('height');
        target.animate({ height: '1px' }, 500, function() { target.hide(); target.height(h); target.css('height', cssHeight); });

        openClose = 0;
    } else {
        openClose = GetId;
        document.getElementById('searchButton' + GetId).className = "searchButton" + GetId + "Selected SearchTextStyle";
        $('#searchFields' + GetId).slideDown('slow');
    }
}
/*****************************
Accordion menuen
******************************/
 function changeAccordionBg(GetId) {
                        if (GetId == 1) {
                            document.getElementById('AccordionBox1').className = "AccordionBox1Selectet";
                            document.getElementById('AccordionBox2').className = "AccordionBox2";
                            document.getElementById('AccordionBox3').className = "AccordionBox3";
                            document.getElementById('AccordionBox4').className = "AccordionBox4";
                        } else if (GetId == 2) {
                            document.getElementById('AccordionBox1').className = "AccordionBox1";
                            document.getElementById('AccordionBox2').className = "AccordionBox2Selectet";
                            document.getElementById('AccordionBox3').className = "AccordionBox3";
                            document.getElementById('AccordionBox4').className = "AccordionBox4";
                        } else if (GetId == 3) {
                            document.getElementById('AccordionBox1').className = "AccordionBox1";
                            document.getElementById('AccordionBox2').className = "AccordionBox2";
                            document.getElementById('AccordionBox3').className = "AccordionBox3Selectet";
                            document.getElementById('AccordionBox4').className = "AccordionBox4";
                        } else if (GetId == 4) {
                            document.getElementById('AccordionBox1').className = "AccordionBox1";
                            document.getElementById('AccordionBox2').className = "AccordionBox2";
                            document.getElementById('AccordionBox3').className = "AccordionBox3";
                            document.getElementById('AccordionBox4').className = "AccordionBox4Selectet";
                        }
                    }



/*********************************
nedre del
*********************************/
function ShowProductListHelpDiv() {
    setTimeout("HideProductListHelpDiv()", 3000);
    $("#HelpDiv").slideDown("slow");
}
function HideProductListHelpDiv() {
    var target = $('#HelpDiv');
    var h = target.height();
    var cssHeight = target.css('height');
    target.animate({ height: '1px' }, 500, function() { target.hide(); target.height(h); target.css('height', cssHeight); });
}
/*vis hjælpe kassen*/
function showHelpBox() {
var target = $('#helpBox');
    var h = target.height();
    var cssHeight = target.css('height');
    if (Id == '1') {
        target.slideDown('slow');
        Id = 2;
    } else {
        target.animate({ height: '1px' }, 500, function() { target.hide(); target.height(h); target.css('height', cssHeight); });
        Id = 1;
    }
}

/*vis søge kassen på forsiden*/
function showSearchBoxFrontPage() {
    searchButtonFunction('1');
}
/*vis skjul info kasser*/
function showInfoText() {
    document.getElementById('searchInfoBox').style.display = '';
}
function closeSearchInfoText() {
    document.getElementById('searchInfoBox').style.display = 'none';
}
