if (self != top) top.location.href = window.location.href;
function js_callpage(htmlurl,mytop,myleft,mywide,myheight) {
 var mypop=window.open(htmlurl,"mynew","top="+mytop+",left="+myleft+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+mywide+",height="+myheight+"");
 mypop.focus();
 }

var newWindow = null;
function OpenWindow(htmurl)
{ 
if (! newWindow || newWindow.closed)
{
newWindow=window.open(htmurl,"newwin","toolbar=no,resizable=no,scrollbars=no,width=400,height=280");
}else
{
newWindow.focus();
}
}

function rand(number) {
	return parseInt(Math.random()*number+1);
};

var myleft = 0;     // 窗口的左边距
var mytop = 0;      // 窗口的上边距
var mywidth = 800;  // 窗口宽度
var myheight = 600; // 窗口高度

var swidth = screen.Width;        // 屏幕宽度
var sheight = screen.Height;      // 屏幕高度

//------如有必要，可以却掉
mywidth = swidth;  // 窗口宽度
myheight = sheight; // 窗口高度

var vwidth = screen.availWidth;   // 屏幕视口宽度
var vheight = screen.availHeight; // 屏幕视口高度

var w = Math.min(swidth,vwidth);
var h = Math.min(sheight,vheight);

mywidth = Math.min(mywidth,w);
myheight = Math.min(myheight,h);
if(myleft+mywidth > w)  myleft = w - mywidth;
if(mytop+myheight > h)  mytop = h - myheight;

window.moveTo(myleft,mytop);
window.resizeTo(mywidth,myheight);

function getBrowerVersion(){
	var verStart=navigator.appVersion.indexOf("MSIE")+5;
	var verEnd=navigator.appVersion.indexOf(";",verStart);
	if (navigator.appVersion.substring(verStart,verEnd)>="5.5"){
		return true;
	}else{
		return false;
	}
}

if (getBrowerVersion()){
	var z=0;
	document.onkeydown=zoomme;
}

function zoomme(){
	var IEKey=event.keyCode;
	var scrwidth=Math.min(screen.Width,screen.availWidth);
	var defaultwidth=800;
	var zoomper=scrwidth/defaultwidth;

	if (IEKey==107){
		z++;
		document.body.style.zoom=1+z/10;
	}
	if (IEKey==109){
		z--;
		document.body.style.zoom=1+z/10;
	}
	if(IEKey==106){
		document.body.style.zoom=1;
		z=1;
	}
	if(IEKey==111){
		document.body.style.zoom=zoomper;
		z=1;
	}
}