function getElementsByClassName(tag, clsName) {
   var i, matches=new Array();
   var els=document.getElementsByTagName(tag);

   for(i=0; i<els.length; i++) {
      if(els.item(i).className==clsName) {
         matches.push(els.item(i));
      }
   }
   return matches;
}

function finished() {
    if ((location.href.indexOf("/admin.php") != -1) || (location.href.indexOf("/login.php") != -1)) {
        document.getElementById('subcontent').style.display = 'none';
        document.getElementById('content').style.width = '660px';
        document.getElementById('content').style.background = 'white';
        if (location.href.indexOf("/admin.php") != -1) {
            var labels = document.getElementsByTagName("label");
            for(i=0; i<labels.length; i++) {
                // Hier de Layout van de config pagina fixen!!!!
//                labels[i].style.padding="3px 3px 3px 20px";
//                labels[i].style.height="16px";
            }
        }
    }
    if (location.href.indexOf("/displayimage.php") != -1) {
        var buttons = getElementsByClassName("a", "admin_menu");
        for(i=0; i<buttons.length-1; i++) {
            buttons[i].style.borderRight = "solid black 1px;";
        } 
    }
    
    if (location.href.indexOf("/search.php") != -1) {
        var mainTable = document.getElementsByTagName("table");
        mainTable[0].style.width="100%";
    }
    
    if (location.href.indexOf("/login.php") != -1) {
        var mainTable = document.getElementsByTagName("table");
        mainTable[0].style.width="60%";
    }
}

