var winWidth = 0;
var winHeight = 0;
window_height = 0;
window_width = 0;
function findDimensions() //函数:获取尺寸
{
//获取窗口宽度
if (window.innerWidth)
winWidth = window.innerWidth;
else if ((document.body) && (document.body.clientWidth))
winWidth = document.body.clientWidth;
//获取窗口高度
if (window.innerHeight)
winHeight = window.innerHeight;
else if ((document.body) && (document.body.clientHeight))
winHeight = document.body.clientHeight;
//通过深入Document内部对body进行检测,获取窗口大小
if (document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth){
winHeight = document.documentElement.clientHeight;
winWidth = document.documentElement.clientWidth;
}
winHeight_2 = document.documentElement.scrollHeight;
//刷新背景
document.getElementById("background").style.top = 0 +"px";
document.getElementById("background").style.left = 0 +"px";
document.getElementById("background").style.width = winWidth +"px";
document.getElementById("background").style.height = winHeight_2 +"px";
//刷新窗口位置
document.getElementById("window").style.height = window_height +"px";
document.getElementById("window").style.width = window_width +"px";
document.getElementById("window").style.top = (winHeight - window_height)/2 +"px";
document.getElementById("window").style.left = (winWidth - window_width)/2 +"px";
}
//调用函数,获取数值
function closewindow(){
window.onresize="";
document.getElementById("engine").src= "about:blank";
document.getElementById("background").style.display = "none";
document.getElementById("window").style.display = "none";
}
function jumpwindow(strTemp){
scroll(0,0);
window.onresize=findDimensions;
document.getElementById("background").style.display = "";
document.getElementById("window").style.display = "";
document.getElementById("engine").src = strTemp;
//findDimensions();
}
function changewindowsize(w,h){
window_height = h;
window_width = w;
document.getElementById("engine").width=w-12;
document.getElementById("engine").height=h-25;
findDimensions();
}
function jumpwithoutwindow(strTemp){
document.getElementById("engine").src = strTemp;
}
//document.getElementById("links2").innerHTML=" 立即获取VIP资格,无限制使用所有功能(现仅12元) | 登录 注册";