function changeValue( catedracheck ){
  if ( catedracheck.value == 'si' ) {
    catedracheck.value = 'no'
  } else {
    catedracheck.value = 'si'
  }
}

function confirmarCambio(){
    if (confirm("¿Está seguro de realizar este cambio?")) {
       return true;
    } else {
       return false;
    }
}

function checkList(main, field)
{
  if ( main.checked ){
    checkAll(1);
  } else {
    checkAll(0);
  }
}

function checkUncheckAll(theElement) {
     var theForm = theElement.form, z = 0;
	 for(z=0; z<theForm.length;z++){
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){
	  theForm[z].checked = theElement.checked;
	  }
     }
}

function checkAll2(field)
{
  for (i = 0; i < field.length; i++)
  	field[i].checked = true ;
}

function uncheckAll(field)
{
  for (i = 0; i < field.length; i++)
  	field[i].checked = false ;
}

function forgot(){
    document.getElementById('forgotPwd').value = true;
    document.login.submit();
}

function orderList( elem ){
  document.getElementById('orden').value = elem;
  document.usuarioList.submit();
}
