//<![CDATA[
var FSC = function( argId ) {
	if ( window == this || !this.initialize ) {
		return new FSC( argId );
	}
	return this.initialize( argId );
};
FSC.c = {
	TARGETNAME		: ''				,
	STYLENAME		: 'font-size'		,
	REPLACEID		: '#Character'	,
	FONTINDEX		: 1					,
	FONTSIZE		: new Array(
					'75%'			,
					'small'				,
					'100%'		)		,
	DUMMY_END		: 2					
};
FSC.p = {
	gWindow			: null				,
	DUMMY_END		: 2					
};
FSC.prototype.initialize = function( argId ) {
	FSC.c.TARGETNAME	= argId;
	this.gElement		= document.getElementById( argId );
	return this;
};
FSC.prototype.clickFontSizeS = function() {
	$.cookie( FSC.c.STYLENAME , FSC.c.FONTINDEX-1 , { expires: 90 , path: '/' } );
	$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ FSC.c.FONTINDEX-1 ] );
	this.renderButton();
};
FSC.prototype.clickFontSizeD = function() {
	$.cookie( FSC.c.STYLENAME , FSC.c.FONTINDEX+0 , { expires: 90 , path: '/' } );
	$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ FSC.c.FONTINDEX+0 ] );
	this.renderButton();
};
FSC.prototype.clickFontSizeL = function() {
	$.cookie( FSC.c.STYLENAME , FSC.c.FONTINDEX+1 , { expires: 90 , path: '/' } );
	$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ FSC.c.FONTINDEX+1 ] );
	this.renderButton();
};
FSC.prototype.openWindow = function( argUrl , argWidth , argHeight ) {
	if ( window.gWindow ) {
		FSC.p.gWindow.close();
	}
	FSC.p.gWindow = window.open( argUrl , 'win' , 'width=' + argWidth + ',height=' + argHeight + ',status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no' );
};
FSC.prototype.renderButton = function() {
	var html = '';
	switch ( parseInt( $.cookie( FSC.c.STYLENAME ) ) ) {
		case 0:
			html+= '<dl class="clearfix">';
			html+= '<dt><img src="/common/images/pc/size_sml.png" width="67" height="15" alt="文字サイズ" title="文字サイズ" /></dt>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeS();return false;" onkeypress="s"><img src="/common/images/pc/btn_small_ov.gif" width="17" height="17" alt="小" title="小" class="Imgover" /></a></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeD();return false;" onkeypress="d"><img src="/common/images/pc/btn_normal.gif" width="17" height="17" alt="中" title="中" class="Imgover" /></a></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeL();return false;" onkeypress="l"><img src="/common/images/pc/btn_large.gif" alt="大" title="大" width="17" height="17" /></a></dd>';
			html+= '</dl>';
			break;
		case 1:
			html+= '<dl class="clearfix">';
			html+= '<dt><img src="/common/images/pc/size_sml.png" width="67" height="15" alt="文字サイズ" title="文字サイズ" /></dt>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeS();return false;" onkeypress="s"><img src="/common/images/pc/btn_small.gif" alt="小" title="小" width="17" height="17" class="Imgover" /></a></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeD();return false;" onkeypress="d"><img src="/common/images/pc/btn_normal_ov.gif" alt="中" title="中" width="17" height="17" /></a></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeL();return false;" onkeypress="l"><img src="/common/images/pc/btn_large.gif" alt="大" title="大" width="17" height="17" class="Imgover" /></a></dd>';
			html+= '</dl>';
			break;
		case 2:
			html+= '<dl class="clearfix">';
			html+= '<dt><img src="/common/images/pc/size_sml.png" width="67" height="15" alt="文字サイズ" title="文字サイズ" /></dt>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeS();return false;" onkeypress="s"><img src="/common/images/pc/btn_small.gif" width="17" height="17" alt="小" title="小" /></a></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeD();return false;" onkeypress="d"><img src="/common/images/pc/btn_normal.gif" width="17" height="17" alt="中" title="中" class="Imgover" /></a></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeL();return false;" onkeypress="l"><img src="/common/images/pc/btn_large_ov.gif" width="17" height="17" alt="大" title="大" class="Imgover" /></a></dd>';
			html+= '</dl>';
			break;
		default:
			html+= '<dl class="clearfix">';
			html+= '<dt><img src="/common/images/pc/size_sml.png" width="67" height="15" alt="文字サイズ" title="文字サイズ" /></dt>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeS();return false;" onkeypress="s"><img src="/common/images/pc/btn_small.gif" width="17" height="17" alt="小" title="小" class="Imgover" /></a></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeD();return false;" onkeypress="d"><img src="/common/images/pc/btn_normal_ov.gif" width="17" height="17" alt="中" title="中" /></a></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeL();return false;" onkeypress="l"><img src="/common/images/pc/btn_large.gif" width="17" height="17" alt="大" title="大" class="Imgover" /></a></dd>';
			html+= '</dl>';
	}
	$( FSC.c.REPLACEID ).html( html );
//	initRollovers();
};
FSC.prototype.start = function() {
	var fontIndex = FSC.c.FONTINDEX;
	if( $.cookie( FSC.c.STYLENAME ) == null ) {
		$.cookie( FSC.c.STYLENAME , fontIndex , { expires: 90 , path: '/' } );
	} else {
	}
	fontIndex = parseInt( $.cookie( FSC.c.STYLENAME ) );
	$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ fontIndex ] );
	this.renderButton();
};
//]]>
