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

 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:'Hiragino Mincho Pro',\\30D2\\30E9\\30AE\\30CE\\89D2\\30B4\\20Pro\\20W3,serif;",
		msPGothic : "font-family:'MS PGothic',\\FF2D\\FF33\\20\\FF30\\30B4\\30B7\\30C3\\30AF,sans-serif;",
		meiryo    : "font-family:'Meiryo',\\30E1\\30A4\\30EA\\30AA,'Segoe UI',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 )
	}
})()