function getInfo()
{
	var s = "";
	s += " 網頁可見區域寬："+ document.body.clientWidth;
	s += " 網頁可見區域高："+ document.body.clientHeight;
	s += " 網頁可見區域寬："+ document.body.offsetWidth + " (包括邊線和捲軸的寬)";
	s += " 網頁可見區域高："+ document.body.offsetHeight + " (包括邊線的寬)";
	s += " 網頁正文全文寬："+ document.body.scrollWidth;
	s += " 網頁正文全文高："+ document.body.scrollHeight;
	s += " 網頁被卷去的高(ff)："+ document.body.scrollTop;
	s += " 網頁被卷去的高(ie)："+ document.documentElement.scrollTop;
	s += " 網頁被卷去的左："+ document.body.scrollLeft;
	s += " 網頁正文部分上："+ window.screenTop;
	s += " 網頁正文部分左："+ window.screenLeft;
	s += " 螢幕解析度的高："+ window.screen.height;
	s += " 螢幕解析度的寬："+ window.screen.width;
	s += " 螢幕可用工作區高度："+ window.screen.availHeight;
	s += " 螢幕可用工作區寬度："+ window.screen.availWidth;
	s += " 你的螢幕設置是 "+ window.screen.colorDepth +" 位彩色";
	s += " 你的螢幕設置 "+ window.screen.deviceXDPI +" 像素/英寸";
	//alert (s);
}

function setWpHeight(shPage){

var isIE = navigator.userAgent.search("MSIE") > -1;
var isIE7 = navigator.userAgent.search("MSIE 7") > -1;
var isFirefox = navigator.userAgent.search("Firefox") > -1;
var isOpera = navigator.userAgent.search("Opera") > -1;
var isSafari = navigator.userAgent.search("Safari") > -1;
var wp = document.getElementById('wyContent');
var wb = document.getElementById('wyBanner');
var wm = document.getElementById('wyMenu');
var wv = document.getElementById('wyView');
var om = document.getElementById('wyPage');
var ov = document.getElementById('oView');

var wbtm = document.getElementById('wyBottom');
var bodyHeight = document.body.clientHeight;

var wpHeight;
if (isFirefox) {
	wpHeight = wb.scrollHeight+wm.scrollHeight+ov.scrollHeight+wbtm.scrollHeight;
	mpHeight = ov.scrollHeight;
	nmpHeight = document.body.clientHeight-wb.scrollHeight-wm.scrollHeight-wbtm.scrollHeight;
	alert("wpHeight="+wpHeight+", bodyHeight"+bodyHeight+", mpHeight"+mpHeight+", nmpHeight"+nmpHeight);
} else {
	wpHeight = wb.offsetHeight+wm.offsetHeight+wv.offsetHeight+wbtm.offsetHeight;
	mpHeight = wv.offsetHeight;
	nmpHeight = document.body.offsetHeight-wb.offsetHeight-wm.offsetHeight-wbtm.offsetHeight;
}
	if (wpHeight > bodyHeight){
	wp.style.height = wpHeight+'px';
	om.style.height = mpHeight+'px';
	wbtm.style.position = '';
	}else{
	wp.style.height = bodyHeight+'px';
	om.style.height = nmpHeight+'px';
	wbtm.style.position = 'fixed';
	}
	
}

function setHeight(){
var isIE = navigator.userAgent.search("MSIE") > -1;
var isIE7 = navigator.userAgent.search("MSIE 7") > -1;
var isFirefox = navigator.userAgent.search("Firefox") > -1;
var isOpera = navigator.userAgent.search("Opera") > -1;
var isSafari = navigator.userAgent.search("Safari") > -1;
var wp = document.getElementById('wyContent');
var wb = document.getElementById('wyBanner');
var wm = document.getElementById('wyMenu');
var om = document.getElementById('wyPage');
var ov = document.getElementById('oView');
var mpHeight;
var wbtm = document.getElementById('wyBottom');
var bodyHeight = document.body.offsetHeight;

ov.style.height = '';

if (isFirefox) {
	wpHeight = wb.scrollHeight+wm.scrollHeight+wv.scrollHeight+wbtm.scrollHeight;
	mpHeight = wv.scrollHeight;
	nmpHeight = document.body.clientHeight-wb.scrollHeight-wm.scrollHeight-wbtm.scrollHeight;
} else {
	wpHeight = wb.offsetHeight+wm.offsetHeight+ov.offsetHeight+wbtm.offsetHeight;
	mpHeight = ov.offsetHeight
	nmpHeight = document.body.offsetHeight-wb.offsetHeight-wm.offsetHeight-wbtm.offsetHeight;
}
	if (wpHeight > bodyHeight){
	om.style.height = mpHeight+'px';
	//ov.style.position = '';
	wbtm.style.position = '';
	//alert("wpHeight="+wpHeight+", bodyHeight"+bodyHeight+", ovHeight="+ov.style.height);
	//alert('over');
	}else{
	//alert('omHeight='+om.style.height+', omOffsetHeight='+om.offsetHeight);
	om.style.height = nmpHeight+'px';
	//alert('omHeight='+om.style.height+', omOffsetHeight='+om.offsetHeight);
	//ovNewHeight = om.offsetHeight - 21;
	//ov.style.height = ovNewHeight+'px'
	wbtm.style.position = 'fixed';
	//alert("wpHeight="+wpHeight+", bodyHeight"+bodyHeight+", ovHeight="+ov.style.height);
	//alert('unover');
	}
}
