var articleFontSize = 14;
// var articleLineHeight = 1;
function fontResize(value) {
	if(value == 0) {
		if (articleFontSize >= 10) {
			articleFontSize = articleFontSize - 1; 
			setFaceSize(); 
		} 
	} else if(value == 1) {
		if (articleFontSize < 18) {
			articleFontSize = articleFontSize + 1; 
			setFaceSize(); 
		} 
	} else if(value == 2) {
		articleFontSize = 14;
		setFaceSize();
	}
}
function setFaceSize() {
//	articleLineHeight = articleFontSize + Math.round(1.1 * articleFontSize);
	obj = getObject("articleContent");
	obj.style.fontSize = articleFontSize + "px";
//	obj.style.lineHeight = articleLineHeight + "px"
}
function imgRsize(img, rW, rH){
	var iW = img.width;
	var iH = img.height;
	var g = new Array;
	if (iW < rW && iH < rH) {
		g[0] = iW;
		g[1] = iH;
	} else {
		if (img.width > img.height) {
			g[0] = rW;
			g[1] = Math.ceil(img.height * rW / img.width);
		} else if (img.width < img.height) {
			g[0] = Math.ceil(img.width * rH / img.height);
			g[1] = rH;
		} else {
			g[0] = rW;
			g[1] = rH;
		}
		if (g[0] > rW) {
			g[0] = rW;
			g[1] = Math.ceil(img.height * rW / img.width);
		}
		if (g[1] > rH) {
			g[0] = Math.ceil(img.width * rH / img.height);
			g[1] = rH;
		}
	}
	g[2] = img.width;
	g[3] = img.height;

	return g;
}
function imgResize(img, ww, hh){
	var tt = imgRsize(img, ww, hh);
	img.width = tt[0];
	img.height = tt[1];
}
