/* JSSS definition for fonts */

canUseHiragino=false;
isSafari=false;
if ((navigator.userAgent.indexOf('MSIE 5.12') != -1) ||(navigator.userAgent.indexOf('MSIE 5.2') != -1) || ((navigator.userAgent.indexOf('Mozilla') != -1) && (navigator.userAgent.indexOf('Mac OS X') != -1))) {
	canUseHiragino=true;
	if (navigator.userAgent.indexOf('AppleWebKit') != -1){
		isSafari=true;
	}
}

if(navigator.userAgent.indexOf('MSIE 5.14') != -1){
	if (navigator.plugins) {
		for (i=0; i < navigator.plugins.length; i++ ) {
			if (navigator.plugins[i].name.indexOf("QuickTime") >= 0 && navigator.plugins[i].filename.indexOf('.plugin')!=-1){
				canUseHiragino=true;
			}
		}
	}
}


if(canUseHiragino){
	document.writeln('<style type="text/css">');
	document.writeln('<!--');
	if (isSafari){
	/* Standard elements */
	document.writeln('body { font-family: "Hiragino Kaku Gothic Pro"; font-weight: normal; }');
	document.writeln('table, td { font-family: "Hiragino Kaku Gothic Pro"; font-weight: normal; }');

	/* Standard fonts */
	document.writeln('.g10, .g12, .g14, .g18, .g24 { font-family: "Hiragino Kaku Gothic Pro"; font-weight: normal; }');
	document.writeln('.g10b, .g12b, .g14b, .g18b, .g24b { font-family: "Hiragino Kaku Gothic Pro"; font-weight: bold; }');
	document.writeln('.g24eb { font-family: "Hiragino Kaku Gothic Std"; font-weight: bolder; }');

	/* For Mincho style page */
	document.writeln('.m12, .m14, .m18, .m24 { font-family: "Hiragino Mincho Pro"; font-weight: normal; }');
	document.writeln('.m12b, .m14b, .m18b, .m24b { font-family: "Hiragino Mincho Pro"; font-weight: bold; }');

	/* Maru gothic styles */
	document.writeln('.mg10, .mg12, .mg14 { font-family: "Hiragino Maru Gothic Pro"; font-weight: normal; }');

	} else {
	/* Standard elements */
	document.writeln('body { font-family: "甲仿幼用剩打 Pro W3"; font-weight: normal; }');
	document.writeln('table, td { font-family: "甲仿幼用剩打 Pro W3"; font-weight: normal; }');
	/* Standard fonts */
	document.writeln('.g10, .g12, .g14, .g18, .g24 { font-family: "甲仿幼用剩打 Pro W3"; font-weight: normal; }');
	document.writeln('.g10b, .g12b, .g14b, .g18b, .g24b { font-family: "甲仿幼用剩打 Pro W6"; font-weight: normal; }');
	document.writeln('.g24eb { font-family: "甲仿幼用剩打 Std W8"; font-weight: normal; }');

	/* For Mincho style page */
	document.writeln('.m12, .m14, .m18, .m24 { font-family: "甲仿幼用抸蘋 Pro W3"; font-weight: normal; }');
	document.writeln('.m12b, .m14b, .m18b, .m24b { font-family: "甲仿幼用抸蘋 Pro W6"; font-weight: normal; }');	
	/* Maru gothic styles */
	document.writeln('.mg10, .mg12, .mg14 { font-family: "甲仿幼用殘打 Pro W4"; font-weight: normal; }');
}
	document.writeln('-->');
	document.writeln('</style>');
}