/**
 * Displays an confirmation box before going to a URL
 * This function is called while clicking links
 * Based on the method used in phpMySql, where it is used to confirm risky database actions
 * @param   object   the link
 * @param   object   warning message to display
 * @return  boolean  whether to run the query or not
 */
function confirmLink(theLink, description)
{
	if (typeof(window.opera) != 'undefined') {
		return true;
	}
	var is_confirmed = confirm(description);
	if (!is_confirmed) {
		if (typeof(theLink.href) != 'undefined') {
			theLink.href += '&submit=cancel';
		}
		else if (typeof(theLink.form) != 'undefined') {
			theLink.form.action += '?submit=cancel';
		}
	}
	return is_confirmed;
}
