function ChangeStyle(styleTitle)
{
	var sheets = document.styleSheets;
	var images = new Array('SS','MM','LL');
	if (sheets){
		for (var i = 0; i < sheets.length; i++){
			if (styleTitle && sheets[i].title == styleTitle){
				sheets[i].disabled = false;
			}else{
				sheets[i].disabled = true;
				document.getElementById(styleTitle).src = "./img/" + styleTitle + "2.gif";
				for (j=0; j<=2; j++){
					if(images[j] != styleTitle){
						document.getElementById(images[j]).src = "./img/" + images[j] + "1.gif";
					}
				}
			}
		}
	}
}

function FontZoom(){
	if(navigator.appName=="Microsoft Internet Explorer"){
		document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>");
		document.write("<td><IMG SRC=\"./img/fontsize.gif\" WIDTH=\"75\" HEIGHT=\"18\" ALT=\"文字サイズ\" BORDER=\"0\" ALIGN=\"absmiddle\"></td>");
		document.write("<td><a href=\"#\" onclick=\"javascript:ChangeStyle('SS');\"><img src=\"./img/SS2.gif\" name=\"SS\" id=\"SS\" border=\"0\"></a></td>");
		document.write("<td><a href=\"#\" onclick=\"javascript:ChangeStyle('MM');\"><img src=\"./img/MM1.gif\" name=\"MM\" id=\"MM\" border=\"0\"></a></td>");
		document.write("<td><a href=\"#\" onclick=\"javascript:ChangeStyle('LL');\"><img src=\"./img/LL1.gif\" name=\"LL\" id=\"LL\" border=\"0\"></a></td>");
		document.write("</tr></table>");
	}
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);


url = "./css/";
if (navigator.appName=="Microsoft Internet Explorer" && navigator.platform=="MacPPC") {
	style="macie";
}
else
{
	if (navigator.appName=="Netscape" && navigator.platform=="MacPPC") {
		if (document.layers){
			style="macns4";
		}
		else {
			style="macns";
		}
	}
	else if (navigator.appName=="Microsoft Internet Explorer" && navigator.platform=="Win32") {
		style="winie";
	}
	else if (navigator.appName=="Netscape" && navigator.platform=="Win32") {
		if (document.layers){
			style="winns4";
		}
		else {
			style="winns";
		}
	}
	else {
		style="def";
	}
}


document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="'+url+style+'.css" title="SS">');
document.write('<LINK REL="alternate stylesheet" TYPE="text/css" HREF="'+url+'MM.css" title="MM">');
document.write('<LINK REL="alternate stylesheet" TYPE="text/css" HREF="'+url+'LL.css" title="LL">');
