function getHTML (value) {
  var param = 'action=check_list&parentId=' + value;

  new Ajax.Updater(
    { success: 'conditionList' },
    '/index.php?',
    {
      method:     'post',
      parameters: param,
      onFailure:  reportError
    }
  );
}

function reportError (request) {
  $('conditionList').innerHTML = '<font color="red">error</font>';
}

function getChildList() {
	var i = document.condition.parentId.selectedIndex;
	var parentId = document.condition.parentId.options[i].value;
	getHTML(parentId);
}

function authCheck() {
	getLoginForm();
}

function getLoginForm () {
  var param = 'action=user_authcheck';

  new Ajax.Updater(
    { success: 'userauth' },
    '/index.php?',
    {
      method:     'post',
      parameters: param
    }
  );
}

function doAuth () {
  var email = $F('loginId');
  var password = $F('password');
  var param = 'action=login&email=' + email + '&password=' + password;

  new Ajax.Updater(
    { success: 'userauth' },
    '/index.php?',
    {
      method:     'post',
      parameters: param
    }
  );	
}