// Sa-ss footer
var ck = document.file.information.value;
var st = document.file.sort.value;
var bg = document.file.bgcolor.value;
var nt = document.file.next.value;

// Horizontal & Table
if (ck=="link" || ck=="link2" || ck=="link3"  || ck=="conter") {
} else {
  document.write("<hr SIZE='5' WIDTH='90%' align='center'>");
}

document.write("<div align='center'>");
document.write("<table border='0' cellpadding='0' cellspacing='0' width='90%' background='logo/r.gif'>");

document.write("<tr><td width='100%' background='logo/r.gif' ");

if (bg!="") {bg="bgcolor='"+bg+"'"}
document.write(bg);

document.write("><p align='right'>");

// left space
document.write("<img src='logo/r.gif' width='10' height='25'>");

// Information
if (ck=="link" || ck=="link2") {
  document.write("<a href='00.htm' onmouseout='img005.src = src05' onmouseover='img005.src = src05b'>");
  document.write("<img name='img005' src='logo/i2.gif' width='100' height='25' border='0'></a>");
} else {
  if (ck=="info" || ck=="*index" || ck=="*") {
    document.write("<img src='logo/i2a.gif' width='100' height='25' border='0'>");
  } else {
    document.write("<a href='sc_06.html' onmouseout='img005.src = src05' onmouseover='img005.src = src05b'>");
    document.write("<img name='img005' src='logo/i2.gif' width='100' height='25' border='0'></a>");
  }
}

// Gallery
if (ck=="link" || ck=="link2") {
    document.write("<a href='01.htm' onmouseout='img006.src = src06' onmouseover='img006.src = src06b'>");
    document.write("<img name='img006' src='logo/g2.gif' width='65' height='25' border='0'></a>");
} else {
  if (ck=="gall" || ck=="*index" || ck=="*") {
    document.write("<img src='logo/g2a.gif' width='65' height='25' border='0'>");
  } else {
    if (ck!="" && ck!="info" && ck!="close" && ck!="prof"
      && ck!="free" && ck!="photo" && ck!="link" && ck!="bgm_bar" && st=="g1") {
      document.write("<a href='l_1.htm",ck,"' onmouseout='img006.src = src06' onmouseover='img006.src = src06b'>");
      document.write("<img name='img006' src='logo/g2.gif' width='65' height='25' border='0'></a>");
    } else {
      document.write("<a href='l_1.htm' onmouseout='img006.src = src06' onmouseover='img006.src = src06b'>");
      document.write("<img name='img006' src='logo/g2.gif' width='65' height='25' border='0'></a>");
    }
  }
}

// For adults only
// dead of night timer
var tm,ye,mo,da,dy,day,ho,mi;
	tm=new Date();
	ye=tm.getYear();
	mo=tm.getMonth();
	da=tm.getDate();
	dy=tm.getDay();
	ho=tm.getHours();
	mi=tm.getMinutes();
	mo=mo+1
if (ck=="test") {
  document.write("<a href='javascript:ageCheck()' onmouseout='img021.src = src21' onmouseover='img021.src = src21b'>");
  document.write("<img name='img021' src='logo/okunoin.gif' width='54' height='25' border='0'></a>");
} else {
  if (ck=="conter") {
    document.write("<a href='sc_07.html' onmouseout='img021.src = src21' onmouseover='img021.src = src21b'>");
    document.write("<img name='img021' src='logo/okunoin.gif' width='54' height='25' border='0'></a>");
  } else {
    if (9<=ho && ho<21 && ck!="oku" && st!="g2" || ck=="index" || ck=="registry" || ck=="*index" || ck=="*"){
      document.write("");
    } else {
      if (ck=="link" || ck=="link2") {
        document.write("<a href='0o.htm' onmouseout='img021.src = src21' onmouseover='img021.src = src21b'>");
        document.write("<img name='img021' src='logo/okunoin.gif' width='54' height='25' border='0'></a>");
      } else {
        if (ck=="oku") {
          document.write("<img src='logo/okunoina.gif' width='50' height='25' border='0'>");
        } else {
          if (ck!="" && ck!="info" && ck!="gall" && ck!="close" && ck!="prof"
            && ck!="free" && ck!="photo" && ck!="link" && ck!="bgm_bar" && st=="g2") {
            document.write("<a href='sc_07.html",ck,"' onmouseout='img021.src = src21' onmouseover='img021.src = src21b'>");
            document.write("<img name='img021' src='logo/okunoin.gif' width='54' height='25' border='0'></a>");
          } else {
            document.write("<a href='javascript:ageCheck()' onmouseout='img021.src = src21' onmouseover='img021.src = src21b'>");
            document.write("<img name='img021' src='logo/okunoin.gif' width='54' height='25' border='0'></a>");
          }
        }
      }
    }
  }
}

function ageCheck(){
if (confirm("For adults only / an X-rated\nあなたは １８歳以上ですか〜？"))
  location.href="sc_07.html";
}
/*
// Close-up photography
if (ck=="link" || ck=="link2") {
  document.write("<a href='0c.htm' onmouseout='img010.src = src10' onmouseover='img010.src = src10b'>");
  document.write("<img name='img010' src='logo/close-up.gif' width='80' height='25' border='0'></a>");
} else {
  if (ck=="close" || ck=="*index" || ck=="*") {
    document.write("<img src='logo/close-upa.gif' width='80' height='25' border='0'>");
  } else {
    if (ck!="" && ck!="info" && ck!="close" && ck!="prof"
      && ck!="free" && ck!="photo" && ck!="link" && ck!="bgm_bar" && st=="c") {
      document.write("<a href='photo_0.htm",ck,"' onmouseout='img010.src = src10' onmouseover='img010.src = src10b'>");
      document.write("<img name='img010' src='logo/close-up.gif' width='80' height='25' border='0'></a>");
    } else {
      document.write("<a href='photo_0.htm' onmouseout='img010.src = src10' onmouseover='img010.src = src10b'>");
      document.write("<img name='img010' src='logo/close-up.gif' width='80' height='25' border='0'></a>");
    }
  }
}
*/
// Event photographs
if (ck=="link" || ck=="link2") {
  document.write("<a href='04.htm' onmouseout='img009.src = src09' onmouseover='img009.src = src09b'>");
  document.write("<img name='img009' src='logo/p2.gif' width='100' height='25' border='0'></a>");
} else {
  if (ck=="photo" || ck=="*index" || ck=="*") {
    document.write("<img src='logo/p2a.gif' width='100' height='25' border='0'>");
  } else {
    document.write("<a href='sa-ss_04.html' onmouseout='img009.src = src09' onmouseover='img009.src = src09b'>");
    document.write("<img name='img009' src='logo/p2.gif' width='100' height='25' border='0'></a>");
  }
}

// Profile
if (ck=="link" || ck=="link2") {
  document.write("<a href='02.htm' onmouseout='img007.src = src07' onmouseover='img007.src = src07b'>");
  document.write("<img name='img007' src='logo/profile2.gif' width='60' height='25' border='0'></a>");
} else {
  if (ck=="prof" || ck=="*index" || ck=="*") {
    document.write("<img src='logo/profile2a.gif' width='60' height='25' border='0'>");
  } else {
    document.write("<a href='profile.htm' onmouseout='img007.src = src07' onmouseover='img007.src = src07b'>");
    document.write("<img name='img007' src='logo/profile2.gif' width='60' height='25' border='0'></a>");
  }
}

// Freetalk
if (ck=="link" || ck=="link2") {
  document.write("<a href='03.htm' onmouseout='img008.src = src08' onmouseover='img008.src = src08b'>");
  document.write("<img name='img008' src='logo/f2.gif' width='75' height='25' border='0'></a>");
} else {
  if (ck=="free" || ck=="*index" || ck=="*") {
    document.write("<img src='logo/f2a.gif' width='75' height='25' border='0'>");
  } else {
    document.write("<a href='n_1.htm' onmouseout='img008.src = src08' onmouseover='img008.src = src08b'>");
    document.write("<img name='img008' src='logo/f2.gif' width='75' height='25' border='0'></a>");
  }
}

// Links or Next
if (nt=="back") {
  document.write("<a href='javascript:history.back()' onmouseout='img017.src = src17' onmouseover='img017.src = src17b'>");
  document.write("<img name='img017' src='logo/back_2.gif' width='50' height='25' border='0'></a>");
} else {
  if (nt!="") {
    document.write("<a href='",nt,"' onmouseout='img015.src = src15' onmouseover='img015.src = src15b'>");
    document.write("<img name='img015' src='logo/next_2.gif' width='50' height='25' border='0'></a>");
  } else {
    if (ck=="link" || ck=="link2" || ck=="link3" || ck=="*index" || ck=="*") {
      document.write("<img src='logo/l2a.gif' width='50' height='25' border='0'>");
    } else {
      document.write("<a href='sc_link.html' target='_top' onmouseout='img012.src = src12' onmouseover='img012.src = src12b'>");
      document.write("<img name='img012' src='logo/l2.gif' width='50' height='25' border='0'></a>");
    }
  }
}

// right space
document.write("<img src='logo/r.gif' width='10' height='25'>");

// Table END
document.write("</td></tr></table></div>");
