function subWinFixed(urlname, width, height, windowname)
{
	var x = Math.round((screen.availWidth - width) / 2);
	var y = Math.round((screen.availHeight - height) / 2);
	popUp = window.open(urlname, windowname, 'left=' + x + ',' + 'top=' + y + ',' + 'width=' + width + ',height=' + height + ',status');
	popUp.focus();
}

function subWinCustom(urlname,width,height,windowname,options)
{
	var x=Math.round((screen.availWidth - width)/2),y=Math.round((screen.availHeight - height)/2);

	if (options!=null&&options!='')
		popUp=window.open(urlname,windowname,'left='+x+','+'top='+y+','+'width='+width+',height='+height+','+options);
	else // no options so don't include them
		popUp=window.open(urlname,windowname,'left='+x+','+'top='+y+','+'width='+width+',height='+height);

	popUp.focus();
}

function subWin(urlname, width, height, windowname)
{
	var x = Math.round((screen.availWidth - width) / 2);
	var y = Math.round((screen.availHeight - height) / 2);
	popUp = window.open(urlname, windowname, 'left=' + x + ',' + 'top=' + y + ',' + 'width=' + width + ',height=' + height + ',resizable,scrollbars,status');
	popUp.focus();
}

function checkEnter(e) // Obtained from the website: http://www.jennifermadden.com/162/examples/stringEnterKeyDetector.html
{
	var characterCode;

	// Obtaining key pressed
	if (e && e.which)
	{
		e = e;
		characterCode = e.which;
	}
	else
	{
		e = event;
		characterCode = e.keyCode;
	}

	// Checking if key pressed was the enter key
	if (characterCode == 13)
	{
 		return true;
	}

	return false;
}

