function isPrime(number) {
	for (i = 2; i < Math.sqrt(number); i++)
		if (number%i == 0) return false;
	return true;
}

var win = null;
function newWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var settings = 'height=' + (screen.height - 10) + ',';
	settings += 'width=' + (screen.width - 10) + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += 'scrollbars=' + scroll + ',';
	settings += 'resizable=no,';
	settings += 'dependent=yes';
	
	win = window.open(mypage, myname, settings);
	if (parseInt(navigator.appVersion) >= 4)
		win.window.focus();
}

function NewWindowPopup(mypage,myname,w,h,scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += 'scrollbars=' + scroll + ',';
	settings += 'resizable=no,';
	settings += 'dependent=yes';
	
	win = window.open(mypage, myname, settings);
	if (parseInt(navigator.appVersion) >= 4)
		win.window.focus();
}