function openWindow(link, name, p_height, p_width, showMenu, showStatus, returnRef)
{
	if (link != "")
	{
		var d = new Date();	
		if (link.indexOf("?") == -1)
		{
			link += "?"
		}
		else
		{
			link += "&amp;";
		}
		link += "t=" + d.getTime();
	}
	if (showStatus == null)
		showStatus = "yes";
	var win;
	
	var height = p_height;
	var width = p_width;
	if (name == window.name) 
		name="new_"+name;
	var top = ((screen.availHeight - height)-25)/2;
	var left = (screen.availWidth - width)/2; 
	if (showMenu == null)
		showMenu = "no";
	//win=window.open("about:blank", name,"width=" + width + ", height=" + height + ",toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes, left=" + left +", top=" + top);
	//win.close();
	win=window.open("about:blank", name,"width=" + width + ", height=" + height + ",toolbar=no,status="+showStatus+",menubar=" + showMenu + ",scrollbars=yes,resizable=yes, left=" + left +", top=" + top);
	
	if (link != "")
		win.location.replace(link);
	try	
	{ 
		win.focus(); 
	}
	catch(errorObject)
	{};
	if (returnRef != null)
		return win;
}	

