
try {
	var topVal = 50, leftVal = 50;
	topVal  = (screen.availHeight / 2);
	leftVal = (screen.availWidth / 2);
	window.status = ".. Hereford Green Links ..";

}catch(e) {
	
}

function ShowPrivacy(pathToCommon) {
	try {
		var a = window.open(pathToCommon+'docs/privacy.php', 'PrivacyPopUp', 'width=500,height=500,top='+(topVal-280)+',left='+(leftVal-250)+',resizable,scrollbars,toolbar');
	}catch(e) {
		return;
	}
	a.focus();
}


function ShowW3CValid(pathToCommon) {
	try {
		var a = window.open(pathToCommon+'docs/sitevalidity.php', 'W3CPopUp', 'width=700,height=550,top='+(topVal-305)+',left='+(leftVal-350)+',resizable,scrollbars,toolbar');
	}catch(e) {
		return;
	}
	a.focus();
}


function textCounter(field, countfield, maxlimit)
{
	if (field.value.length > maxlimit) // if too long...trim it!
		field.value=field.value.substring(0, maxlimit);
	else  // otherwise, update counter
		countfield.value=field.value.length;
}


function disableSubmit(statusinfoid,articles){
  
document.getElementById("submitBtn").setAttribute("class", "disableThisButton");
document.getElementById(statusinfoid).setAttribute("class", "waitButton waitButtonActive");

  if(articles != 'yes') {
    document.getElementById("skipBtn").setAttribute("class", "disableThisButton");
    document.getElementById(statusinfoid + '2').setAttribute("class", "waitButton waitButtonActive");
  }

}

function enableSubmit(statusinfoid,articles){
document.getElementById("submitBtn").setAttribute("class", "submit");
document.getElementById(statusinfoid).setAttribute("class", "waitButton");

  if(articles != 'yes') {
    document.getElementById("skipBtn").setAttribute("class", "submit");
    document.getElementById(statusinfoid + '2').setAttribute("class", "waitButton");
  }
}

