/** 01/25/08: Doesn't work anymore to do fixup onload.  Google tweaks input boxes after our fixup.*/
//Best to call setListeners() in HTML onload("   ") line.
//if(window.attachEvent)
//    window.attachEvent("onload",setListenersGsEventAttach());

function setListeners()
{	var methodId="setListeners()";
try 
{	//alert(methodId);
	if(window.attachEvent)
	{	// only needed for IE
    	inputList = document.getElementsByTagName("INPUT");
   		//alert("INPUT tag list length="+inputList.length);
    	if (inputList.length==0)
    	{
   			inputList = document.getElementsByTagName("input");
    		//alert("input tag list length="+inputList.length);
    	}
    	//alert("[input] fixup disabled");
    	//alert(methodId+"  [input] fixup enabled.  list length="+inputList.length);
    	for(i=0;i<inputList.length;i++)
    	{
        		inputList[i].attachEvent("onpropertychange",restoreStyles);
        		inputList[i].style.backgroundColor = "";       	
    	}
    	selectList = document.getElementsByTagName("SELECT");
    	//alert("SELECT tag list length="+selectList.length);
    	if (selectList.length==0)
    	{
   			selectList = document.getElementsByTagName("select");
    	}
    	for(i=0;i<selectList.length;i++)
    	{
        		selectList[i].attachEvent("onpropertychange",restoreStyles);
        		selectList[i].style.backgroundColor = "";  	
    	}
    }
} 
catch (e) {localExceptionHandler(e);}
}


function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "")
        event.srcElement.style.backgroundColor = "";
}




function localExceptionHandler(e)
{	// create generic exception handler
	alert(moduleId+"."+methodId+" The following error occurred: " + e.name + " - "
	+ e.message);
}

