if (document.addEventListener) {
  document.addEventListener("DOMContentLoaded", clearLoginForm, false);
}
/*@cc_on @*/
/*@if (@_win32)
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
  if (this.readyState == "complete") {
    clearLoginForm(); // call the onload handler
  }
};
/*@end @*/
if (/WebKit/i.test(navigator.userAgent)) { // sniff
  var _timer = setInterval(function() {
    if (/loaded|complete/.test(document.readyState)) {
      clearInterval(_timer);
      clearLoginForm(); // call the onload handler
    }
  }, 10);
}


function clearbacking(obj)
{
	obj.style.backgroundPosition = "bottom left";
}

function clearLoginForm(){
	var username = document.getElementById('username');
	var password = document.getElementById('password');

	if(username && username.value.length > 0)
		clearbacking(username);
	
	if(password && password.value.length > 0)
		clearbacking(password);
}
