var initPage =  function()
{
    var page = document.getElementById('bg-bot');
    var cont = document.getElementById('cont');
    if (page){
            cont.style.height = cont.offsetHeight - 21 + 4 - (page.offsetHeight % 4) +'px';
    }
    var inputsHolder = document.getElementById('inputs');
    if (inputsHolder){
        var inputs = inputsHolder.getElementsByTagName('input');
        for (var i=0; i<inputs.length;i++){
            if (inputs[i].className.indexOf('text')!=-1){
                inputs[i].onclick = function(){
                    if (this.className.indexOf('active')==-1){
                        this.className +=' active';
                        if (this.className.indexOf('search')!=-1){
                            var subm = document.getElementById('submit');
                            subm.className +=' active';
                        }
                    }
                }
                inputs[i].onblur = function(){
                    this.className = this.className.replace('active','');
                    if (this.className.indexOf('search')!=-1){
                        var subm = document.getElementById('submit');
                        subm.className = subm.className.replace('active','');
                    }
                }
            }
        }
    }
}

if (window.attachEvent){
    window.attachEvent('onload',initPage);
}
else{
    window.addEventListener('load',initPage,false);
}