
function openWin(linkHere) {
	var popupLink = (linkHere.indexOf('?') > -1)?"&":"?";	
	var popupLink = popupLink + "popupLink=true";
	win = window.open(linkHere + popupLink,'Info','resizable=yes,toolbars=no,width=600,height=450,scrollbars=yes');
	// win.focus();
}

function goURL(myURL) {
	window.location.href = myURL;
}



function noFrames() {
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
  if (location.href.indexOf('popupLink=true') > -1) {
  	window.focus();
  }
}


function hov(loc,cls) {
	if (loc.className) {
		loc.className=cls;
	}
}


function checkChars(limitField,limitNum) {
	if (limitField.value.length > limitNum) {					
		alert('You have reached the maximum number of characters for this field, which is:\n\n' + limitNum + '\n\nThe field will be automatically reduced in size to fit.');
		limitField.value = limitField.value.substring(0, limitNum);
		return false;
	}
}


function checkRightSearch() {
	if (document.forms['SearchFormRight'].SearchTerm.value == '') {
		alert('No search term entered.  Please enter a word before searching.');
		return false;
	}
	else if (document.forms['SearchFormRight'].SearchTerm.value.length < 2) {
		alert('The current search term is too short.  Please enter a longer search term.');
		return false;
	}
	else {return true;}
}

function checkSearch(x) {
	if (document.forms['SearchForm'].SearchTerm.value == '') {
		alert('No search term entered.  Please enter a word before searching.');
		return false;
	}
	else if (document.forms['SearchForm'].SearchTerm.value.length < 2) {
		alert('The current search term is too short.  Please enter a longer search term.');
		return false;
	}
	else {return true;}
}

function ws(x) {
	window.status = x;
	return true;
}