function closeParent()
{
	//test for IE (a.k.a. the trickable browser)
	if ((navigator.appName == "Microsoft Internet Explorer") && (window.opener))
	{
		//set window's parent's parent so it can be tricked into closing (only works in IE)
		window.opener.opener = "";

		//close the parent
		window.opener.close();
	}
}

function resizeRedirect()
{
	//window resize/position (not needed in IE because the redirect closes)
	if (navigator.appName != "Microsoft Internet Explorer")
	{
		//resize (function in common.js)
		resizeWindow(800, 400);

		//position
		window.moveTo((screen.availWidth / 2 - window.outerWidth / 2), (screen.availHeight / 2 - window.outerHeight / 2))
	}
}

function openLink(url)
{	//open window
	var newWind;
	newWind = window.open(url, '', 'directories=0,height=765,location=no,menubar=no,resizable=yes,scrollbars=yes,status=0,titlebar=no,toolbar=no,width=1010', false);
	newWind.focus();
		//position
		newWind.moveTo((screen.availWidth / 2 - window.outerWidth / 2), (screen.availHeight / 2 - window.outerHeight / 2))
}

/*resizes the window*/
function resizeWindow(contentWidth, contentHeight)
{
	//test browser and resize
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		//IE
		window.resizeBy(contentWidth - document.getElementsByTagName("html")[0].clientWidth, contentHeight - document.getElementsByTagName("html")[0].clientHeight);
	}
	else if ((navigator.appName == "Netscape") && (navigator.userAgent.toLowerCase().indexOf('safari') == - 1))
	{
		//Netscape & Mozilla
		window.innerHeight = contentHeight;
		window.innerWidth = contentWidth;
	}
	else if ((navigator.appName == "Netscape") && (navigator.userAgent.toLowerCase().indexOf('safari') != - 1))
	{
		//Safari
		window.resizeBy(contentWidth - window.innerWidth, contentHeight - window.innerHeight);
	}
	else
	{
		//Unsupported browser
		window.resizeTo(screen.availWidth, screen.availHeight);
	}
}