// 处理页面大小的脚本
var vh=0;
function upsize(nmax)
{
        var vobj=document.getElementById('vcont');
        if(vobj==null) return;
        var oobj=document.getElementById('oh');
        if(oobj==null) return;

	if(vh==0) vh=oobj.value;	// 元素的设计高度
	var d=vobj.offsetHeight-vh;	// 实际高度与设计高度的差额

	if(d<=0) return;

	var ftag=null,fobj=null;

	// 调整所有顶部对齐的图层
	for(i=0; i<nmax; i++) {
		ftag='top_'+i;
		try {
			fobj=document.getElementById(ftag);
			fobj.style.top=parseInt(fobj.style.top)+d;
		} catch(e) {};
	};

	// 调整所有高度对齐的图层
	for(i=0; i<nmax; i++) {
		ftag='height_'+i;
		try {
			fobj=document.getElementById(ftag);
			fobj.style.height=parseInt(fobj.style.height)+d;
		} catch(e) {};
	};

	if(vh<vobj.offsetHeight) {
		vh=vobj.offsetHeight;
	};
}

// 处理显示字体的脚本
var ofontsize=0;
var vcObj;
function toBig() {
	if(ofontsize==0) ofontsize=document.getElementById('vfontsize').value;
	vcObj=document.getElementById('vcontent');
	var height=vcObj.offsetHeight;
	vcObj.style.overflowY="scroll";
	vcObj.style.fontSize=(parseInt(ofontsize)+2)+"px";
	vcObj.style.height=height;
	upsize();
}
function toNormal() {
	if(ofontsize==0) return;
	vcObj=document.getElementById('vcontent');
	vcObj.style.fontSize=ofontsize+"px";
	vcObj.style.scrollHeight=0;
	vcObj.style.scrollTop=0;
	vcObj.style.overflowY="hidden";
}
function toSmall() {
	if(ofontsize==0) ofontsize=document.getElementById('vfontsize').value;
	vcObj=document.getElementById('vcontent');
	vcObj.style.scrollTop=0;
	vcObj.style.overflowY="hidden";
	vcObj.style.fontSize=(parseInt(ofontsize)-2)+"px";
}
