//<![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		: '#fontSizeChange'	,
	FONTINDEX		: 0					,
	FONTSIZE		: new Array(
	//				'x-small'			,
					'small'				,
					'large'		)		,
	DUMMY_END		: 1					
};
FSC.p = {
	gWindow			: null				,
	DUMMY_END		: 1					
};
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();
/*
	var fontIndex = FSC.c.FONTINDEX;
	if( $.cookie( FSC.c.STYLENAME ) != null ) {
		fontIndex = parseInt( $.cookie( FSC.c.STYLENAME ) ) - 1;
		if ( fontIndex >= 0 ) {
			$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ fontIndex ] );
			$.cookie( FSC.c.STYLENAME , fontIndex , { expires: 90 } );
		} else {
		}
	} else {
		var fontIndex = FSC.c.FONTINDEX;
		$.cookie( FSC.c.STYLENAME , fontIndex , { expires: 90 } );
		$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ fontIndex ] );
	}
	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();
/*
	var fontIndex = FSC.c.FONTINDEX;
	if( $.cookie( FSC.c.STYLENAME ) != null ) {
		fontIndex = parseInt( $.cookie( FSC.c.STYLENAME ) ) + 1;
		if ( fontIndex < FSC.c.FONTSIZE.length ) {
			$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ fontIndex ] );
			$.cookie( FSC.c.STYLENAME , fontIndex , { expires: 90 } );
		} else {
		}
	} else {
		var fontIndex = FSC.c.FONTINDEX;
		$.cookie( FSC.c.STYLENAME , fontIndex , { expires: 90 } );
		$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ fontIndex ] );
	}
	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+= '<dt><img src="/common/images/h_size.jpg" width="64" height="16" alt="文字の大きさ" title="文字の大きさ" /><br /></dt>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeD();return false;"><img src="/common/images/h_size_m_ov.gif" width="29" height="16" alt="標準" title="標準" /></a><br /></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeL();return false;"><img src="/common/images/h_size_l.gif" width="29" height="16" alt="大" title="大" /></a><br /></dd>';
			break;
		case 1:
			html+= '<dt><img src="/common/images/h_size.jpg" width="64" height="16" alt="文字の大きさ" title="文字の大きさ" /><br /></dt>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeD();return false;"><img src="/common/images/h_size_m.gif" width="29" height="16" alt="標準" title="標準" /></a><br /></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeL();return false;"><img src="/common/images/h_size_l_ov.gif" width="29" height="16" alt="大" title="大" /></a><br /></dd>';
			break;
		case 2:
			html+= '<dt><img src="/common/images/h_size.jpg" width="64" height="16" alt="文字の大きさ" title="文字の大きさ" /><br /></dt>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeD();return false;"><img src="/common/images/h_size_m.gif" width="29" height="16" alt="標準" title="標準" /></a><br /></dd>';
			html+= '<dd><a href="javascript:void(0)" onclick="FSC.prototype.clickFontSizeL();return false;"><img src="/common/images/h_size_l.gif" width="29" height="16" alt="大" title="大" /></a><br /></dd>';
			break;
		default:
	}
	$( 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();
};
//]]>
