//文字の拡大
function getCookie(){
	zoom = "";
	cName = "Ainan=";
	tmpCookie = document.cookie + ";";
	start = tmpCookie.indexOf(cName);
	if (start != -1)
	{
		end = tmpCookie.indexOf(";", start);
		zoom = tmpCookie.substring(start + cName.length, end);
		document.getElementById("contentsMain").style.fontSize = zoom;
	} else {
		document.getElementById("contentsMain").style.fontSize = "100%";
	}
}

function setDefaultFontSize(){
    document.getElementById("contentsMain").style.fontSize = "100%";
}

function textSizeUp(){
	currentSize = document.getElementById("contentsMain").style.fontSize;
	selectSize = "";
	if ( currentSize == "100%" ){
		selectSize = "115%";
	}
	// for ie6 //
	else if ( currentSize == "84%" ){
		selectSize = "115%";
	}
	else if ( currentSize == "115%" ){
		selectSize = "130%";
	}
	else if ( currentSize == "130%" ){
		selectSize = "145%";
	}
	else if ( currentSize == "145%" ){
		selectSize = "160%";
	}
	else if ( currentSize == "160%" ){
		m = escape("The size of the text cannot be enlarged any further. ");
		alert(unescape(m));
		selectSize = "160%";
	}
	else {
		selectSize = "100%";
	}
	
	document.getElementById("contentsMain").style.fontSize = selectSize;
}

function textSizeDown(){
	currentSize = document.getElementById("contentsMain").style.fontSize;
	selectSize = "";
	if ( currentSize == "100%" ){
		selectSize = "95%";
	}
	else if ( currentSize == "95%" ){
		selectSize = "90%";
	}
	else if ( currentSize == "90%" ){
		selectSize = "85%";
	}
	else if ( currentSize == "85%" ){
		selectSize = "80%";
	}
	else if ( currentSize == "80%" ){
		selectSize = "75%";
	}
	else if ( currentSize == "75%" ){
		m = escape("これ以上文字のサイズを小さくできません。");
		alert(unescape(m));
		selectSize = "75%";
	}
	else {
		selectSize = "100%";
	}
	document.getElementById("contentsMain").style.fontSize = selectSize;
}

function textSizeReset(){
	currentSize = document.getElementById("contentsMain").style.fontSize;
	m = escape("The size of the text is made standard.");
	r = confirm(unescape(m));
	if (r) {
		currentSize = "100%";
		document.getElementById("contentsMain").style.fontSize = currentSize;
	}
}
