/*====================================================================================================
//////////////////////////////////////////////////////////////////////////////////////////////////////

 Author : http://www.yomotsu.net
 created: 2008/06/06
 update : 2009/06/09
 Licensed under the GNU Lesser General Public License

//////////////////////////////////////////////////////////////////////////////////////////////////////
====================================================================================================*/

(function(){
	var fontRule = {
		hiragino  : "font-family:'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro',sans-serif;",
		msPGothic : "font-family:'ＭＳ Ｐゴシック','MS PGothic',sans-serif;",
		meiryo    : "font-family:'メイリオ',Meiryo,sans-serif;"
	}
	var CSSRule = '';
	
	//Macintosh
	if(navigator.userAgent.match(/Macintosh|Mac_PowerPC/))
		CSSRule = 'html body {' + fontRule.hiragino + '}';
	//Server 2003, XP, 2000, NT 4.0, ME, 98, 95, CE
	else if(navigator.userAgent.match(/Windows NT (4|5)\.\d+|windows (98|95|CE)/))
		CSSRule = 'html body {' + fontRule.msPGothic + '}';
	//Vista and later
	else if(navigator.userAgent.match(/Windows NT (6)\.\d+/) || navigator.userAgent.match(/Windows/))
		CSSRule = 'html body {' + fontRule.meiryo + '}';
	
	if (document.createStyleSheet)
		document.createStyleSheet().cssText = CSSRule;
	else {
		var element = document.createElement('style');
		document.getElementsByTagName('head')[0].appendChild(element);
		element.sheet.insertRule(CSSRule, 0 )
	}
})()