// Javascript
// Date: 4/19/2006
// IAP: created for the purpose
//      of setting the button pressed
//      for textboxes and changing the
//      action attribute of the form 
//      for a specifed button     

// 
function ChangeActionAttribute(FormName, URLResource) 
{
    document.forms[FormName].action = URLResource;
}


// Set the default button for a text box
//
// code description:
//http://weblogs.asp.net/rajbk/archive/2003/12/11/43023.aspx
function clickButton(e, buttonid){ 
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ // enter key pressed
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ // enter key pressed
                        bt.click(); 
                        return false; 
                  } 
            } 
      }
} 

function clearPassword(textBoxId)
{
    document.getElementById(textBoxId).value = "";
}

