function FontSize(nm) {
	var id = document.getElementById('contentsBodyArea');
	var fontimg1 = document.getElementById('fontmenus1');
	var fontimg2 = document.getElementById('fontmenus2');
	var fontimg3 = document.getElementById('fontmenus3');
	if (!nm) {
		nm = document.cookie.match(/\d*%/g);
		if (nm) {
			id.style.fontSize = nm;
			if(document.getElementById('fontmenus1')){
				if( nm == '100%' ){
					id.style.lineHeight = '170%';
					fontimg1.setAttribute("src", fontimg1.getAttribute("src").replace("_natural.", "_select."));
				}else if( nm == '120%' ){
					id.style.lineHeight = '170%';
					fontimg2.setAttribute("src", fontimg2.getAttribute("src").replace("_natural.", "_select."));
				}else if( nm == '130%' ){
					id.style.lineHeight = '170%';
					fontimg3.setAttribute("src", fontimg3.getAttribute("src").replace("_natural.", "_select."));
				}
			}
		} else {
			fontimg1.setAttribute("src", fontimg1.getAttribute("src").replace("_natural.", "_select."));
			id.style.fontSize = '100%';
			id.style.lineHeight = '170%';
			setCookie("Fsize","100%");
		}
	} else {
		if( nm == '100%' ){
			id.style.lineHeight = '170%';
			fontimg1.setAttribute("src", fontimg1.getAttribute("src").replace("_natural.", "_select."));
			fontimg2.setAttribute("src", fontimg2.getAttribute("src").replace("_select.", "_natural."));
			fontimg3.setAttribute("src", fontimg3.getAttribute("src").replace("_select.", "_natural."));
			
		}else if( nm == '120%' ){
			id.style.lineHeight = '170%';
			fontimg1.setAttribute("src", fontimg1.getAttribute("src").replace("_select.", "_natural."));
			fontimg2.setAttribute("src", fontimg2.getAttribute("src").replace("_natural.", "_select."));
			fontimg3.setAttribute("src", fontimg3.getAttribute("src").replace("_select.", "_natural."));
			
		}else if( nm == '130%' ){
			id.style.lineHeight = '170%';
			fontimg1.setAttribute("src", fontimg1.getAttribute("src").replace("_select.", "_natural."));
			fontimg2.setAttribute("src", fontimg2.getAttribute("src").replace("_select.", "_natural."));
			fontimg3.setAttribute("src", fontimg3.getAttribute("src").replace("_natural.", "_select."));	
		}
		setCookie("Fsize",nm);
		id.style.fontSize = nm;
		return false;
	}
}

function setCookie(key, val) {
	tmp = key + "=" + val + "; path=/; ";
	document.cookie = tmp;
}