var confirmMsg  = 'Do you really want to ';
function delete_confirm(form, chkName, message) 
{
	dml=document.forms[form];
	len = dml.elements.length;
	var i=0;
	for( i=0 ; i<len ; i++) 
	{
		// if an item is checked the proceed with the deletion
		if ((dml.elements[i].name==chkName) && (dml.elements[i].checked==1))
		{

			var answer = confirm(message);
			// confirm if user wants to delete
			if (answer)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}
	// if none of the items are check, prompt a message
	alert("Please select at least one record to be deleted")
	return false;

}

function confirmLink(theLink, Message)
{
	// Confirmation is not required in the configuration file
  // or browser is Opera (crappy js implementation)
  if (confirmMsg == '' || typeof(window.opera) != 'undefined') 
	{
    return true;
  }

  var is_confirmed = confirm(confirmMsg + ' :\n' + Message);
  return is_confirmed;
} // end of the 'confirmLink()' function