// Sa-ss header
var ck = document.file.information.value;
var st = document.file.sort.value;
var bg = document.file.bgcolor.value;
var nt = document.file.next.value;

// open window
function openn() {
        str="content_01.html";
        menuWin = window.open(str,'newwin_F','width=280,height=400,resizable=no,scrollbars=yes');
        menuWin.opener = self;
}
function opens() {
	str="content_02.html";
	menuWin = window.open(str,'newwin_F','width=280,height=400,resizable=no,scrollbars=yes');
	menuWin.opener = self;
}
function opene() {
        str="enter1.htm";
        menuWin = window.open(str,'enter1','width=300,height=300,resizable=no,scrollbars=no');
        menuWin.opener = self;
}



//Table
document.write("<div align='center'>");

if (ck=="link" || ck=="link2" || ck=="link3"  || ck=="bgm_bar") {
	document.write("<table border='0' cellpadding='0' cellspacing='0' width='100%' background='logo/r.gif'>");
	document.write("<tr><td width='100%' background='logo/r.gif'><p align='left'>");
} else {
	document.write("<table border='0' cellpadding='0' cellspacing='0' width='90%' background='logo/r.gif'>");
	if (bg!="") {bg="bgcolor='"+bg+"'"}
	document.write("<tr><td width='100%' background='logo/r.gif'" ,bg, "><p align='left'>");
}


// left space
if (ck=="index" || ck=="*index" || ck=="*") {
  document.write("<a href='999.htm'><img src='logo/r.gif' width='10' height='25' border='0'></a>");
} else {
  if (ck=="info") {
    document.write("<a href='../counter.html'><img src='logo/r.gif' width='10' height='25' border='0'></a>");
  } else {
    document.write("<img src='logo/r.gif' width='10' height='25'>");
  }
}

// Information
if (ck=="index" || ck=="link" || ck=="link3" || ck=="test") {
  document.write("<a href='00.htm' onmouseout='img05.src = src05' onmouseover='img05.src = src05b'>");
  document.write("<img name='img05' 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='img05.src = src05' onmouseover='img05.src = src05b'>");
    document.write("<img name='img05' src='logo/i2.gif' width='100' height='25' border='0'></a>");
  }
}

// Gallery
if (ck=="index" || ck=="link" || ck=="link3" || ck=="test") {
    document.write("<a href='01.htm' onmouseout='img06.src = src06' onmouseover='img06.src = src06b'>");
    document.write("<img name='img06' 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!="oku" && ck!="close" && ck!="prof"
      && ck!="free" && ck!="photo" && ck!="link" && ck!="bgm_bar" && st=="g1") {
      document.write("<a href='l_1.htm",ck,"' onmouseout='img06.src = src06' onmouseover='img06.src = src06b'>");
      document.write("<img name='img06' src='logo/g2.gif' width='65' height='25' border='0'></a>");
    } else {
      document.write("<a href='l_1.htm' onmouseout='img06.src = src06' onmouseover='img06.src = src06b'>");
      document.write("<img name='img06' 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='0o.htm' onmouseout='img21.src = src21' onmouseover='img21.src = src21b'>");
  document.write("<img name='img21' src='logo/okunoin.gif' width='54' height='25' border='0'></a>");
} else {
  if (9<=ho && ho<21 && ck!="oku" && st!="g2" || ck=="bgm_bar" || ck=="index" || ck=="registry" || ck=="*index" || ck=="*"){
    document.write("");
    } else {
      if (ck=="link" || ck=="link3") {
       document.write("<a href='0o.htm' onmouseout='img21.src = src21' onmouseover='img21.src = src21b'>");
       document.write("<img name='img21' 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='img21.src = src21' onmouseover='img21.src = src21b'>");
          document.write("<img name='img21' src='logo/okunoin.gif' width='54' height='25' border='0'></a>");
        } else {
          document.write("<a href='javascript:ageCheck()' onmouseout='img21.src = src21' onmouseover='img21.src = src21b'>");
          document.write("<img name='img21' 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";
}

// || ck=="link"
/*
// Close-up photography
if (ck=="index" || ck=="link" || ck=="link3" || ck=="test") {
  document.write("<a href='0c.htm' onmouseout='img10.src = src10' onmouseover='img10.src = src10b'>");
  document.write("<img name='img10' src='logo/close-up.gif' width='80' height='25' border='0'></a>");
} else {
    if (ck!="" && ck!="info" && ck!="oku" && ck!="close" && ck!="prof"
      && ck!="free" && ck!="photo" && ck!="link" && ck!="bgm_bar" && st=="c") {
      document.write("<a href='photo_0.htm",ck,"' onmouseout='img10.src = src10' onmouseover='img10.src = src10b'>");
      document.write("<img name='img10' 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 {
      document.write("<a href='photo_0.htm' onmouseout='img10.src = src10' onmouseover='img10.src = src10b'>");
      document.write("<img name='img10' src='logo/close-up.gif' width='80' height='25' border='0'></a>");
    }
  }
}
*/
// Event photographs
if (ck=="index" || ck=="link" || ck=="link3" || ck=="test") {
  document.write("<a href='04.htm' onmouseout='img09.src = src09' onmouseover='img09.src = src09b'>");
  document.write("<img name='img09' 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='img09.src = src09' onmouseover='img09.src = src09b'>");
    document.write("<img name='img09' src='logo/p2.gif' width='100' height='25' border='0'></a>");
  }
}

// Profile
if (ck=="index" || ck=="link" || ck=="link3" || ck=="test") {
  document.write("<a href='02.htm' onmouseout='img07.src = src07' onmouseover='img07.src = src07b'>");
  document.write("<img name='img07' 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='img07.src = src07' onmouseover='img07.src = src07b'>");
    document.write("<img name='img07' src='logo/profile2.gif' width='60' height='25' border='0'></a>");
  }
}

// Freetalk
if (ck=="index" || ck=="link" || ck=="link3" || ck=="test") {
  document.write("<a href='03.htm' onmouseout='img08.src = src08' onmouseover='img08.src = src08b'>");
  document.write("<img name='img08' 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='img08.src = src08' onmouseover='img08.src = src08b'>");
    document.write("<img name='img08' 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='img17.src = src17' onmouseover='img17.src = src17b'>");
  document.write("<img name='img17' src='logo/back_2.gif' width='50' height='25' border='0'></a>");
} else {
  if (nt!="" && nt!="back") {
    document.write("<a href='",nt,"' onmouseout='img15.src = src15' onmouseover='img15.src = src15b'>");
    document.write("<img name='img15' 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='img12.src = src12' onmouseover='img12.src = src12b'>");
      document.write("<img name='img12' src='logo/l2.gif' width='50' height='25' border='0'></a>");
    }
  }
}

// Website map
if (ck=="bgm_bar" || ck=="test") {
  document.write("<a href='javascript:opens()' onmouseout='img19.src = src19' onmouseover='img19.src = src19b'>");
  document.write("<img name='img19' src='logo/website-map2.gif' width='100' height='25' border='0'></a>");
}

// right space
if (ck=="registry") {
  document.write("<a href='999.htm'><img src='logo/r.gif' width='10' height='25' border='0'></a>");
} else {
  document.write("<img src='logo/r.gif' width='10' height='25'>");
}


// Table END
document.write("</td></tr></table></div>");
