/*
	NAME			: quicksearch.js
	DESCRIPTION		: ajax interface for quicksearch.tpl
	OSDATE-VERSION	: osDate 2.1.x (LGPL)
	LICENSE			: GPL
	AUTHOR			: Ralf Strehle (ralf dot strehle at yahoo dot de) (osDate forum user name: exotic)
	COPYRIGHT		: 2009, by author
	SUPPORT			: by author
	
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.
	
	This program 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 General Public License for more details.
	
	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

function quicksearch_gender(v1)
{
	http.open('get', doc_root+'quicksearch.ajax.php?a=gender&v1='+v1, true);
	http.send(null);
}

function quicksearch_lookgender(v1)
{
	http.open('get', doc_root+'quicksearch.ajax.php?a=lookgender&v1='+v1, true);
	http.send(null);
}

function quicksearch_lookagestart(v1)
{
	http.open('get', doc_root+'quicksearch.ajax.php?a=lookagestart&v1='+v1, true);
	http.send(null);
}

function quicksearch_lookageend(v1)
{
	http.open('get', doc_root+'quicksearch.ajax.php?a=lookageend&v1='+v1, true);
	http.send(null);
}

function quicksearch_motivation(v1)
{
	http.open('get', doc_root+'quicksearch.ajax.php?a=motivation&v1='+v1, true);
	http.send(null);
}

function quicksearch_lookcountry(v1)
{
	if (document.getElementById('quicksearch_lookstate') != null)
	{
		http.open('get', doc_root+'quicksearch.ajax.php?a=lookcountry&v1='+v1, true);
		http.onreadystatechange = handleResponse;
		http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		http.send(null);
	}
}

function quicksearch_lookstate(v1)
{
	http.open('get', doc_root+'quicksearch.ajax.php?a=lookstate&v1='+v1, true);
	http.send(null);
}

function quicksearch_with_photo(v1)
{
	v1 = (v1 == true) ? 1 : 0;
	
	http.open('get', doc_root+'quicksearch.ajax.php?a=with_photo&v1='+v1, true);
	http.send(null);
}
