var screenwidth = screen.availWidth;
var screenheight = screen.availHeight;
var randomize = Math.random() + "";
var winnumber = randomize * 1000000000000000000;
function openlocation (url,wintype,winwidth,winheight,status) {
	if (wintype == "blank") {
		window.open(url,'newdocwin');
		if (status == "close") { self.close(); }
	}
	else if (wintype == "popup_01" || wintype == "popup_02" || wintype == "popup_03" || wintype == "popup_04") {
		if (wintype == "popup_01") { var winoptions = "scrollbars,resizable,toolbar,"; }
		else if (wintype == "popup_02") { var winoptions = "scrollbars,resizable,"; }
		else if (wintype == "popup_03") { var winoptions = "scrollbars,"; }
		else { var winoptions = ""; }
		window.open(
			url,
			'newdocwin' + winnumber,
			winoptions +
			'top=' + ((screenheight - winheight - 30) * .5) + ',' +
			'left=' + ((screenwidth - winwidth - 10) * .5) + ',' +
			'width=' + winwidth + ',' +
			'height=' + winheight
		);
		if (status == "close") { self.close(); }
	}
	else {
		window.opener.location.href = url;
		if (status == "close") { self.close(); }
	}
}
