﻿<!--

function openWin(fi,na,w,h) {
window.open(fi,na,"width="+w+",height="+h+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,favorites=no,resizable=yes");
}
function openWin2(fi,na,w,h) {
window.open(fi,na,"width="+w+",height="+h+",toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,favorites=no,resizable=yes");
}

function openWin4(fi,na,w,h) {
window.open(fi,na,"toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,favorites=no,resizable=yes");
}

function openWin3(fi,na,w,h) 
{
	FR = document.form1;
	var y1 = eval( FR.tYear.selectedIndex ) + eval( FR.START_YEAR.value ); 
	var m1 = eval( FR.tMonth.selectedIndex + 1 );
	var d1 = eval( FR.tDay.selectedIndex + 1 );
	fil = fi + "?tYear=" + y1 + "&tMonth=" + m1 + "&tDay=" + d1;
	window.open(fil,na,"width="+w+",height="+h+",toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,favorites=no,resizable=yes");
}

function open_win2( n, ID, selecter )
{
	FR = document.form1;
	
	if( n == 1 )
	{	//DBリンク
		FR.ID.value = ID;
		FR.action = selecter.substr( 0, 3 ) + "_bangumi_syo.cfm";
		FR.submit();
	} else {
		//静的HTMLリンク
		window.open( ID, "syousai", "width=640,height=480" );
	}
}
function go_top()
{
	if(arguments.length==0)
		location.href = "#top";
	else
		location.href = "#"+arguments[0];
}
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];}
}
/////////////////////////////////////////////////////////////
//■半角数字チェック
//半角数値もしくは半角数値に変換できる文字列であれば「true」を返す
/////////////////////////////////////////////////////////////
function hankaku_chk( s )
{
	var LA = new Array( "０","１","２","３","４","５","６","７","８","９" );
	for(i=0;i<10;i++) { s = s.replace( new RegExp( LA[ i ], "g" ), new String( i ) ); }
	return ( isNaN( s ) ) ? false : true;
}

//getFullyear未対応ブラウザー用
function Usr_getFullYear(d){
  var y=d.getFullYear?d.getFullYear():d.getYear();
  var oy=y;
  if(y<100) y+=1900;
  if(y<1980) y+=100;
  if(oy!=y) d.setYear(y);
  return y;
}
// -->