function goHome() {
	if (window.opener && !window.opener.closed) {
		window.opener.location.href = sHomeURL;
		self.close();
	} else {
		var home = window.open(sHomeURL);
		home.focus();	
	}
}

function showWallpaper(sURL) {
	var iWidth = 800;
	var iHeight = 500;
	var sProps = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,left=" + Math.round((screen.width - iWidth) / 2) + ",top=" + Math.round((screen.height - iHeight) / 2) + ",width=" + iWidth + ",height=" + iHeight;
	var wallpaper = window.open(sURL,"wallpaper", sProps);
	wallpaper.focus();		
}

function openCC(sURL) {
	var iWidth = 960;
	var iHeight = 652;
	var sProps = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,left=" + Math.round((screen.width - iWidth) / 2) + ",top=" + Math.round((screen.height - iHeight) / 2) + ",width=" + iWidth + ",height=" + iHeight;
	var PVA = window.open(sURL,"PVA", sProps);
	PVA.focus();
}

function openWindow(sURL, iWidth, iHeight) {
	openWindowMain(sURL, iWidth, iHeight, false);
}

function openWindowScrollable(sURL, iWidth, iHeight) {
	openWindowMain(sURL, iWidth, iHeight, true);
}

function openWindowMain(sURL, iWidth, iHeight, isScrollable) {
	var scrollbars = (isScrollable ? "1" : "0");
	var sProps = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + scrollbars + ",resizable=0,left=" + Math.round((screen.width - iWidth) / 2) + ",top=" + Math.round((screen.height - iHeight) / 2) + ",width=" + iWidth + ",height=" + iHeight;
	var miscWin = window.open(sURL, "miscWin", sProps);
	miscWin.focus();
}
