function textCounter(field, countfield, maxlimit) {
/*
* The input parameters are: the field name;
* field that holds the number of characters remaining;
* the max. numb. of characters.
*/ 
if (field.value.length > maxlimit) // if the current length is more than allowed
{
countfield.value = maxlimit - field.value.length; // don't allow further input
//countfield.style.color = "#FF0000";
}
else
countfield.value = maxlimit - field.value.length;
//countfield.color = "#000000";
} // set the display field to remaining number

function setVisibility(id) {
  var visibility;

  if (document.getElementById(id).style.display == 'none')
    visibility = 'inline';
  else
    visibility = 'none';
  
  document.getElementById(id).style.display = visibility;
}

function confirmDialog(msg, url)
{
	if (confirm(msg) == true)
	{
		window.location=url;
	}
}
