// user_set //
var siteName = "NTTMEDIAS";
var container = "wrapper";
// user_set //

//window.onload = function(e) {
//  getSize();
//}


function setSize(s){
	exp = new Date();
	exp.setTime(exp.getTime() + 31536000000);
	document.cookie = siteName + "=" + s + "; path=/" + "; expires=" + exp.toGMTString();
}

function getSize(){
	zoom = "";
	tmpCookie = document.cookie + ";";
	startPoint1 = tmpCookie.indexOf(siteName);
	startPoint2 = tmpCookie.indexOf("=",startPoint1);
	endPoint = tmpCookie.indexOf(";",startPoint1);
	if(startPoint2 < endPoint && startPoint1 > -1){
		zoom = tmpCookie.substring(startPoint2+1,endPoint);
		document.getElementById(container).style.fontSize = zoom;
	} else {
		document.getElementById(container).style.fontSize = "100%";
	}
}

function textSizeUp(){
	currentSize = document.getElementById(container).style.fontSize;
	selectSize = "";
	if ( currentSize == "80%" ){
		selectSize = "90%";
	}
	else if ( currentSize == "90%" ){
		selectSize = "100%";
	}
	else if ( currentSize == "100%" ){
		selectSize = "110%";
	}
	else if ( currentSize == "110%" ){
		selectSize = "120%";
	}
	else if ( currentSize == "120%" ){
		selectSize = "130%";
	}
	else if ( currentSize == "130%" ){
		selectSize = "140%";
	}
	else if ( currentSize == "140%" ){
		m = escape("これ以上文字のサイズを大きくできません。");
		alert(unescape(m));
		selectSize = "140%";
	}
	else {
		selectSize = "140%";
	}
	document.getElementById(container).style.fontSize = selectSize;
	setSize(selectSize);
}
function textSizeDefault(){
	currentSize = document.getElementById(container).style.fontSize;
	selectSize = "100%";
	document.getElementById(container).style.fontSize = selectSize;
	setSize(selectSize);
}
function textSizeDown(){
	currentSize = document.getElementById(container).style.fontSize;
	selectSize = "";
	if ( currentSize == "140%" ){
		selectSize = "130%";
	}
	else if ( currentSize == "130%" ){
		selectSize = "120%";
	}
	else if ( currentSize == "120%" ){
		selectSize = "110%";
	}
	else if ( currentSize == "110%" ){
		selectSize = "100%";
	}
	else if ( currentSize == "100%" ){
		selectSize = "90%";
	}
	else if ( currentSize == "90%" ){
		selectSize = "80%";
	}
	else if ( currentSize == "80%" ){
		m = escape("これ以上文字のサイズを小さくできません。");
		alert(unescape(m));
		selectSize = "80%";
	}
	else {
		selectSize = "80%";
	}
	document.getElementById(container).style.fontSize = selectSize;
	setSize(selectSize);
}







