function popupWindow(theURL,winName,features)
{
	newWindow = window.open(theURL,winName,features);
	newWindow.focus();
}

function autoTab(element, nextElement)
{
	if (element.value.length == element.maxLength && nextElement != null)
	{
		element.form.elements[nextElement].focus();
	}
}

function textCounter(field, countfield, maxlimit)
{
	if (field.value.length > maxlimit)
	{
		field.value = field.value.substring(0, maxlimit);
	}
	else
	{
		countfield.value = maxlimit - field.value.length;
	}
}