//イメージ切り換え

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//

function logout() {
	location.href="/top10.html?type=logout";
}
function top_check_log() {
	if (document.top_form_log.id.value.length==0) {
		document.top_form_log.id.focus();
		alert("Enter Member ID.");return;
	}
	if (document.top_form_log.passwd.value.length==0) {
		document.top_form_log.passwd.focus();
		alert("Enter Password.");return;
	}
	document.top_form_log.submit();
}
function top_CheckKey_log() {
	key=event.keyCode;
	if (key==13) {
		top_check_log()
	}
}

function send() //使ってない
{
      if(document.form1.hname.value.length==0){
         alert("Enter your name.");
         document.form1.name.focus();
         return;
      }
      if (document.form1.email.value.length==0) {
         alert("Enter your e-mail address.");
         document.form1.name.focus();
         return;
      }
      document.form1.mail.value="send";
      document.form1.submit();
}

function check() {
  if (document.form1.id.value.length==0) {
     document.form1.id.focus();
     alert("Enter Member ID.");return;
  }
  if (document.form1.passwd.value.length==0) {
     document.form1.passwd.focus();
     alert("Enter Password.");return;
  }
  document.form1.submit();
}


function CheckKey() {
 key=event.keyCode;
 if (key==13)
 {
  send();
 }
}

function sendmail() {
   window.open("/html/email.html","email","height=100,width=100");
}
function estimate() {
}

function check_log() {
    if (document.search.id.value.length==0) {
       document.search.id.focus();
       alert("Enter Member ID.");return;
    }
    if (document.search.passwd.value.length==0) {
       document.search.passwd.focus();
       alert("Enter Password.");return;
    }
    document.formlogin.id.value=document.search.id.value;
    document.formlogin.passwd.value=document.search.passwd.value;
    document.formlogin.submit();
}
function CheckKey_log()
{
 key=event.keyCode;
 if (key==13)
 {
  check_log()
 }
}
function CheckKey_search()
{
 key=event.keyCode;
 if (key==13)
 {
  document.search.submit();
 }
}


//GENOTIME処理３つ

function opengt(){ //21時の
  winURL = "http://www.geno.co.jp/4D/genotime.html";
  window.open(winURL,"genotime","toolbar=yes,location=yes,directiories=yes,menubar=yes,scrollbars=yes,resizable=yes,width=400,height=480");
}
function opengtmid(){ //0時の
  winURL = "http://www.geno.co.jp/4D/genotime0.html";
  window.open(winURL,"genotime","toolbar=yes,location=yes,directiories=yes,menubar=yes,scrollbars=yes,resizable=yes,width=400,height=480");
}
function opengtnoon(){ //12時の
  winURL = "http://www.geno.co.jp/4D/genotime12.html";
  window.open(winURL,"genotime","toolbar=yes,location=yes,directiories=yes,menubar=yes,scrollbars=yes,resizable=yes,width=400,height=480");
}
strPwd = "Genoken";

//左メニュー切換処理
function showpara(num) {
   if(document.getElementById) {
      document.getElementById("cat" + num).style.display = "block";
      document.getElementById("read" + num).style.display = "none";
      document.getElementById("close" + num).style.display = "inline";
   }
   return false;
}
function hidepara(num) {
   if(document.getElementById) {
      document.getElementById("cat" + num).style.display = "none";
      document.getElementById("read" + num).style.display = "inline";
      document.getElementById("close" + num).style.display = "none";
   }
   return false;
}