//the idea is to highlight all text boxes
function highlight_inputs(){
        var ins = document.getElementsByTagName('input');
        for(var i=0; i < ins.length;i++){
                if(ins[i].type != 'text' && ins[i].type != 'password')
                        continue;
                if(window.addEventListener){
                        ins[i].addEventListener('focus', H, false);
                        ins[i].addEventListener('blur', deH, false);
                }
                else{
                        ins[i].attachEvent('onfocus', ieH, false);
                        ins[i].attachEvent('onblur', iedeH, false);
                }
        }
}

function highlight_textareas(){
        var ins = document.getElementsByTagName('textarea');
        for(var i=0; i < ins.length;i++){
                if(window.addEventListener){
                        ins[i].addEventListener('focus', H, false);
                        ins[i].addEventListener('blur', deH, false);
                }
                else{
                        ins[i].attachEvent('onfocus', ieH, false);
                        ins[i].attachEvent('onblur', iedeH, false);
                }
        }
}

function H(){
        this.style.backgroundColor='yellow';
}
function deH(){
        this.style.backgroundColor='';
}
function ieH(){
        event.srcElement.style.backgroundColor='yellow';
}
function iedeH(){
        event.srcElement.style.backgroundColor='';
}

