/**
 * openHelp
 * FAQ ページを別窓で表示する
 */
function openHelp() {
  window.open(XENON_BASE_SSL_URL + 'guest/help');
}

/**
 * openContact
 * 問い合わせページを別窓で表示する
 */
function openContact() {
  window.open(XENON_BASE_SSL_URL + 'guest/help/contact');
}

/**
 * switchImage
 * 画像のロールオーバー
 */
function switchImage(element, mode) {
  element = $(element);
  element.writeAttribute('src', element.readAttribute('src').sub(/(on|off)\.gif$/, mode + '.gif'));
}

/**
 * switchImage
 * 画像のロールオーバー
 */
function switchImage2(element, mode) {
  element = $(element);
  element.writeAttribute('src', element.readAttribute('src').sub(/(on|off)\.jpg$/, mode + '.jpg'));
}

/**
 * メールアドレスを書き出す
 * @param account アカウント名
 * @param domain moshimo. 以降のドメイン(default: com)
 * @param text aタグの中のテキスト
 * @return void
 */
function createMailAddress(account, text, domain) {
  if (!domain) {
    domain = 'com';
  }
  var full_address = account + '@moshimo.' + domain;
  if (!text) {
    text = 'こちら';
  } else if (text == 'clone') {
    text = full_address;
  }
  document.write("<a href=\"mai" + "lto:" + full_address + "\">" + text + "</a>");
}

