﻿
function winopen(url,newTarget,wWidth,wHeight) //在屏幕中间打开弹出的页面，页面高度和宽度由用户自定义
{
    	var winwidth=(window.screen.width-wWidth)/2;	
    	var winheight=(window.screen.availHeight-wHeight)/2;	
		var winFeatures = "height="+wHeight+", width="+wWidth+", top="+winheight+", left="+winwidth+", toolbar=no, menubar=no,scrollbars=yes,resizable=no,location=no, status=no";
		OpenWindow = window.open(url, newTarget, winFeatures); 
		OpenWindow.focus(); //让新弹出的页面显示在其他窗口的最前面
}



function winopen2(url, newTarget)  //全屏打开弹出的页面，用户只需要指定弹出页面的url地址和target目标
{
    var winwidth = window.screen.width - 15;  //全屏宽度-15px
    var winheight = window.screen.availHeight - 34; //全屏高度-34px
    var winFeatures = "height=" + winheight + ", width=" + winwidth + ", top='0', left='0', toolbar=no, menubar=no,scrollbars=yes,resizable=no,location=no, status=no";
    OpenWindow = window.open(url, newTarget, winFeatures);
    OpenWindow.focus();  //让新弹出的页面显示在其他窗口的最前面
}


function bbimg(o)   //鼠标放在图片上滑动滚轮缩放图片  调用示例：onmousewheel="return bbimg(this)"
{
    var zoom = parseInt(o.style.zoom, 10) || 100; zoom += event.wheelDelta / 12; if (zoom > 0) o.style.zoom = zoom + '%';
    return false;
}
