
function changeSel(){
    var filename = location.pathname.substr(location.pathname.lastIndexOf("/")+1,location.pathname.length);/*extragem filename*/

    /*adaugam clasa selected in functie de filename*/
    switch(filename)
    {
        case filename = "index.php":
            document.getElementById("link_1").className += " meniuBlockSelected";
            break;

        case filename = "servicii.php":
            document.getElementById("link_2").className += " meniuBlockSelected";
            break;

        case filename = "legislatie.php":
            document.getElementById("link_3").className += " meniuBlockSelected";
            break;

        case filename = "portofoliu.php":
            document.getElementById("link_4").className += " meniuBlockSelected";
            break;

        case filename = "contact.php":
            document.getElementById("link_5").className += " meniuBlockSelected";
            break;
    
        default:
            filename = ""
            document.getElementById("link_1").className += " meniuBlockSelected";
    }
}

window.onload=function(){
    changeSel();
}


/*functie expand legislatie*/

//function expandLaw(d){
//    var i = d;
//    for(i=1; i<11; i++){
//        document.getElementById('block-'+i).style.display = 'none';
//    }
//    document.getElementById(d).style.display = 'block';
//}


function expandLaw(d){
    
    var i = d;
    
    
    
    if(document.getElementById(d).style.display == 'block'){
        document.getElementById(d).style.display='none';
    }else{
        for(i=1; i<11; i++){
            document.getElementById('block-'+i).style.display = 'none';
        }
        document.getElementById(d).style.display='block';
    } 
}


//function closeLaw(d){
//    document.getElementById(d).style.display = 'none';
//}




