/*
    NmnNewsletter is a library that provides newsletter service 
	management for websites running php and mysql.
    Copyright (C) 2006  Ivan Preziosi from netmeans.net - Rome.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    For more informations or to join the development of the library contact
    the author at: info@netmeans.net
    */


	function confirmClick(message, url){
		if (confirm(message))
		{
			location.href = url;
		}
	}


	function startSearch(){
		form = document.forms[0];
		emailValue = form.email.value;
		alsoSubscribed = form.alsoSubscribed.checked;
		alsoDel = form.alsoDeleted.checked;
		alsoUnconfirmed = form.alsoUnconfirmed.checked;
		queryString = "?search="+emailValue+"&alsoDel="+alsoDel+"&alsoUnconfirmed="+alsoUnconfirmed+"&action=search"+"&alsoSubscribed="+alsoSubscribed;
		pageName = "subscribers.php";
		location.href = pageName+queryString;
	}

	function startExport(){
		form = document.forms[0];
		alsoSubscribed = form.alsoSubscribed.checked;
		alsoDel = form.alsoDeleted.checked;
		alsoUnconfirmed = form.alsoUnconfirmed.checked;
		queryString = "?alsoDel="+alsoDel+"&alsoUnconfirmed="+alsoUnconfirmed+"&action=search"+"&alsoSubscribed="+alsoSubscribed;
		pageName = "doExportUsers.php";
		location.href = pageName+queryString;
	}
