var mNAME;

function LoadMovieSet()
{
	// Cookie読み出し
	SetNum	= 0;
	gName   = 'tdrmovieset=';
	gCookie = document.cookie+';';
	start = gCookie.indexOf( gName );
	if (start != -1)
	{
		end = gCookie.indexOf( ';', start );
		SetNum = unescape( gCookie.substring( start+gName.length,end ) );
	}
	// Cookie無し
	else
	{
		pForm = navigator.platform.indexOf('Win');
		if( pForm == -1 )
		{
			SetNum = 2;
		}
	}
	return(SetNum);
}


// 設定書き込み
function SaveMovieSet(SetNum)
{
	// Cookie書き込み
	theName  = 'tdrmovieset';
	theValue = SetNum;
	theDay   = 365*2;
	setDay = new Date();
	setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
	expDay = setDay.toGMTString();
	pName = '/';
	document.cookie = theName + '='+escape(theValue)+';expires='+expDay+';path='+pName+';';
}


function LoadMovieFile()
{
	// Cookie読み出し
	SetNum	= 0;
	gName   = 'tdrmoviefile=';
	gCookie = document.cookie+';';
	start = gCookie.indexOf( gName );
	if (start != -1)
	{
		end = gCookie.indexOf( ';', start );
		SetNum = unescape( gCookie.substring( start+gName.length,end ) );
	}
	return(SetNum);
}


// 設定書き込み
function SaveMovieFile(SetNum)
{
	// Cookie書き込み
	theName  = 'tdrmoviefile';
	theValue = SetNum;
	pName = '/';
	document.cookie = theName + '='+escape(theValue)+';path='+pName+';';
}


function DispForm(cWrite,cWLim,mN)
{
	dForm = '';
	for(i=cWrite;i<cWLim;i++)
	{
		dForm += '<INPUT TYPE="radio" NAME="moviefile" VALUE="'+i+'" ';
		if(mN == i)
		{
			dForm += 'checked';
		}
		dForm += '>'+mTitle[i]+'<BR>';
	}

	document.write(dForm);
}

