if(window.attachEvent)
{//Attach to onload event in IE
    window.attachEvent("onload",resetStyles);
}
else
{//Attach to load event in Other Browser
    window.addEventListener("load",resetStyles,false);
 //Attach to focus event in other browsers to disable
 //background color change in tabbed browsing  
    window.addEventListener("focus",resetStyles,false);   
}

function resetStyles()
{
    resetStyle('input');
    resetStyle('select');
}

function resetStyle(inputType)
{
    var count=document.getElementsByTagName(inputType);
    for(var i=0;i<count.length;i++)
    {
        if(window.attachEvent)
        {//Attach to onpropertychange event in IE
            count[i].attachEvent('onpropertychange',resetBC);
        }
        else
        {//Apply the style reset onload
            resetOther(count[i]);
        }
    }
}

function resetOther(El)
{
    if(El.style.backgroundColor!='transparent')
        El.style.backgroundColor='transparent';
}
function resetBC()
{
    if(event.srcElement.style.backgroundColor!='transparent')
        event.srcElement.style.backgroundColor='transparent';
}