var newline = 0;

function openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function storeCaret(textEl) {
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}

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

function popunder(url) {
pu = window.open(url, "_new", 'width=840,height=900,left=100,top=100,menubar=no,status=no,scrollbars,resizable,toolbar=no,hotkeys,location=no');
pu.blur();
window.focus();
} 
