/**
 * funcion to confirm logout
 */
function confirmLogout() {
	if(confirm('Are you sure you want to logout?'))
		window.location='index.php?plugin=login&module=logout&href=' + escape(location.href);
	else
		return false;
}//end of function confirmLogout

/**
 * funcion to make a confirmation
 * @param question - the question to ask
 * @param redirect - where to redirect to
 * @param new_window - open in a new window or now
 */
function confirmDialog(question, redirect, new_window) {
	if(confirm(question)) {
		if(new_window)
			window.open(redirect + '&href=' + escape(location.href));
		else
			window.location=redirect + '&href=' + escape(location.href);
	}//end of if statement
	else
		return false;
}//end of function confirmDialog