// function CenterPopup(mypage, myname, w, h, scroll, resize, status, menubar, toolbar, resizable, address) {
function CenterPopup(myname, mypage, h, w) {
	scrollbarval = 'yes';
	resize = 'yes';
	statusval = 'yes';
	menubar = 'no';
	toolbar = 'no';
	resizable = 'yes';
	address = 'no';
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	// var winl = (screen.width - w) / 2;
	// var wint = (screen.height - h) / 2;
	winops = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrollbarval+',resize='+resize+',status='+statusval+',toolbar='+toolbar+',resizable='+resizable+',location='+address+''
	win = window.open(mypage, myname, winops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	
	return false;
}


function CenterAd(mypage, myname, w, h) {
	scrollbarval = 'no';
	resize = 'no';
	statusval = 'yes';
	menubar = 'no';
	toolbar = 'no';
	resizable = 'yes';
	address = 'no';
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	// var winl = (screen.width - w) / 2;
	// var wint = (screen.height - h) / 2;
	winops = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrollbarval+',resize='+resize+',status='+statusval+',toolbar='+toolbar+',resizable='+resizable+',location='+address+''
	win = window.open(mypage, myname, winops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function CenterWindow(mypage, myname, w, h) {
	scrollbarval = 'yes';
	resize = 'yes';
	statusval = 'yes';
	menubar = 'yes';
	toolbar = 'yes';
	resizable = 'yes';
	address = 'yes';
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	// var winl = (screen.width - w) / 2;
	// var wint = (screen.height - h) / 2;
	winops = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrollbarval+',resize='+resize+',status='+statusval+',toolbar='+toolbar+',resizable='+resizable+',location='+address+''
	win = window.open(mypage, myname, winops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}