//<![CDATA[
var FSC = function( argId ) {
	if ( window == this || !this.initialize ) {
		return new FSC( argId );
	}
	return this.initialize( argId );
};
FSC.c = {
	TARGETNAME		: ''				,
	STYLENAME		: 'font-size'		,
	FONTINDEX		: 0					,
	FONTSIZE		: new Array(
					'small'		,
					'medium'	,
					'large'		)		,
	DUMMY_END		: 0					
};
FSC.p = {
	gWindow			: null				,	//別ウィンドウ
	DUMMY_END		: 0					
};
FSC.prototype.initialize = function( argId ) {
	FSC.c.TARGETNAME	= argId;
	this.gElement		= document.getElementById( argId );
	return this;
};
FSC.prototype.clickFontSizeS = function() {
	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 ] );
	}
};
FSC.prototype.clickFontSizeL = function() {
	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 ] );
	}
};
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.start = function() {
	var fontIndex = FSC.c.FONTINDEX;
	if( $.cookie( FSC.c.STYLENAME ) == null ) {
		$.cookie( FSC.c.STYLENAME , fontIndex , { expires: 90 } );
	} else {
	}
	fontIndex = parseInt( $.cookie( FSC.c.STYLENAME ) );
	$( FSC.c.TARGETNAME ).css( FSC.c.STYLENAME , FSC.c.FONTSIZE[ fontIndex ] );
};
//]]>
