function popUpCenter(html, name) {
	var w = screen.availWidth;
	var h = screen.availHeight;
	
	var popW = 640, popH = 480;
	
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	
	var features = "location=no, menubar=no, toolbar=no, status=no, scrollbars=yes, resizable=no";

	newWin = window.open(html, name, 'width=' + popW + ',height='+popH+',top='+topPos+',left='+leftPos+','+features);

	newWin.focus();
}


function openWin(html,name,features) {
	document.location.href='end.html';
	newWin = window.open(html,name,features)
	newWin.moveTo(0,0);
	newWin.resizeTo(screen.availWidth,screen.availHeight);
	newWin.focus()
}

function openBase() {
	if (screen.width <= 1024) {	
		html="normal.html";
	} else {
		html="big.html";
	}
	openWin(html,'','fullscreen=yes, location=no, menubar=no, toolbar=no, status=no, scrollbars=auto, resizable=yes');
}

function moveToCenter() {
	var x = (screen.availWidth / 2) - (document.body.clientWidth / 2);
	var y = ((screen.availHeight - 60) / 2) - (document.body.clientHeight / 2);
	x = (x > 0) ? x : 0;
	y = (y > 0) ? y : 0;
	window.moveTo(x, y);
}