function graph_num_globals_avery2(period,search_start_date_time,search_end_date_time,filtermob)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../../scripts/images/ajax-loader.gif">';
		document.getElementById('graph_result').innerHTML = '';
	}
	OAjax.open('POST',"graph_result.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('graph_result').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('graph_result').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('period='+period+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time+'&filtermob='+filtermob);
}

function details_name_favorite_filtered(filtertype,details,mob,last_20,filterorder,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_name_last').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_name_last').innerHTML = '';
	}
	OAjax.open('POST',"details/details_name_last_filtered.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_name_last').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_name_last').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_name_last').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtertype='+filtertype+'&details='+details+'&mob='+mob+'&last_20='+last_20+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function details_name_favorite_overall(filtertype,details,favorite,filterorder,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_name_favorite_overall').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_name_favorite_overall').innerHTML = '';
	}
	OAjax.open('POST',"details/details_name_favorite_overall_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_name_favorite_overall').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_name_favorite_overall').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_name_favorite_overall').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtertype='+filtertype+'&details='+details+'&favorite='+favorite+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function details_name_favorite_last(filtertype,details,favorite,filterorder,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_name_favorite_last').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_name_favorite_last').innerHTML = '';
	}
	OAjax.open('POST',"details/details_name_favorite_last_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_name_favorite_last').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_name_favorite_last').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_name_favorite_last').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtertype='+filtertype+'&details='+details+'&favorite='+favorite+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function details_name_top(filtertype,details,last_20,filterorder,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_name_top').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_name_top').innerHTML = '';
	}
	OAjax.open('POST',"details/details_name_top_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_name_top').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_name_top').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_name_top').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtertype='+filtertype+'&details='+details+'&last_20='+last_20+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function details_name_last(filtertype,details,last_20,filterorder,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_name_last').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_name_last').innerHTML = '';
	}
	OAjax.open('POST',"details/details_name_last_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_name_last').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_name_last').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_name_last').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtertype='+filtertype+'&details='+details+'&last_20='+last_20+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function details_name_total(filtertype,details,last_20)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_name_total').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_name_total').innerHTML = '';
	}
	OAjax.open('POST',"details/details_name_total_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_name_total').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_name_total').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_name_total').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtertype='+filtertype+'&details='+details+'&last_20='+last_20);
}

function details_name_disco(details)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_name_disco').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_name_disco').innerHTML = '';
	}
	OAjax.open('POST',"details/details_name_disco_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_name_disco').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_name_disco').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_name_disco').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('&details='+details);
}

function details_target_disco(details)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_target_disco').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_target_disco').innerHTML = '';
	}
	OAjax.open('POST',"details/details_target_disco_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_target_disco').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_target_disco').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_target_disco').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('&details='+details);
}

function details_name_luck(type,details,active)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_name_luck').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_name_luck').innerHTML = '';
	}
	OAjax.open('POST',"details/details_name_luck_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_name_luck').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_name_luck').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_name_luck').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('&details='+details+'&type='+type+'&active='+active);
}

function details_target_total(target,last_20)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_target_total').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_target_total').innerHTML = '';
	}
	OAjax.open('POST',"details/details_target_total_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_target_total').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_target_total').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_target_total').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('target='+target+'&last_20='+last_20);
}

function basic_search_hunting(filtername,filterflags,filtertarget,filtervaluetype,filtervalue,filtertime,search_start_date_time,search_end_date_time,filter_show_hunting,filterorder,filterteam,filterbypage)
{
	var filtertarget_ascii="";
	for (var i=0; i<filtertarget.length; i++) {
		filtertarget_ascii=filtertarget_ascii+filtertarget.charCodeAt(i)+";";
	}
	
	filtertarget=filtertarget_ascii;
	
	var filtername_ascii="";
	for (var i=0; i<filtername.length; i++) {
		filtername_ascii=filtername_ascii+filtername.charCodeAt(i)+";";
	}
	
	filtername=filtername_ascii;
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_search_results_hunting').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_hunting').innerHTML = '';
	}
	OAjax.open('POST',"basic_search/basic_search_reload_ajax_hunting.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo_search_results_hunting').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_hunting').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_hunting').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtername='+filtername+'&filterflags='+filterflags+'&filtertarget='+filtertarget+'&filtervaluetype='+filtervaluetype+'&filtervalue='+filtervalue+'&filtertime='+filtertime+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time+'&filter_show_hunting='+filter_show_hunting+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function basic_search_mining(filtername,filterflags,filtertarget,filtervaluetype,filtervalue,filtertime,search_start_date_time,search_end_date_time,filter_show_mining,filterorder,filterbypage)
{
	var filtertarget_ascii="";
	for (var i=0; i<filtertarget.length; i++) {
		filtertarget_ascii=filtertarget_ascii+filtertarget.charCodeAt(i)+";";
	}
	
	filtertarget=filtertarget_ascii;
	
	var filtername_ascii="";
	for (var i=0; i<filtername.length; i++) {
		filtername_ascii=filtername_ascii+filtername.charCodeAt(i)+";";
	}
	
	filtername=filtername_ascii;
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_search_results_mining').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_mining').innerHTML = '';
	}
	OAjax.open('POST',"basic_search/basic_search_reload_ajax_mining.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo_search_results_mining').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_mining').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_mining').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtername='+filtername+'&filterflags='+filterflags+'&filtertarget='+filtertarget+'&filtervaluetype='+filtervaluetype+'&filtervalue='+filtervalue+'&filtertime='+filtertime+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time+'&filter_show_mining='+filter_show_mining+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function basic_search_crafting(filtername,filterflags,filtertarget,filtervaluetype,filtervalue,filtertime,search_start_date_time,search_end_date_time,filter_show_crafting,filterorder,filterbypage)
{
	var filtertarget_ascii="";
	for (var i=0; i<filtertarget.length; i++) {
		filtertarget_ascii=filtertarget_ascii+filtertarget.charCodeAt(i)+";";
	}
	
	filtertarget=filtertarget_ascii;
	
	var filtername_ascii="";
	for (var i=0; i<filtername.length; i++) {
		filtername_ascii=filtername_ascii+filtername.charCodeAt(i)+";";
	}
	
	filtername=filtername_ascii;
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_search_results_crafting').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_crafting').innerHTML = '';
	}
	OAjax.open('POST',"basic_search/basic_search_reload_ajax_crafting.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo_search_results_crafting').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_crafting').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_crafting').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtername='+filtername+'&filterflags='+filterflags+'&filtertarget='+filtertarget+'&filtervaluetype='+filtervaluetype+'&filtervalue='+filtervalue+'&filtertime='+filtertime+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time+'&filter_show_crafting='+filter_show_crafting+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function mob_search_selected_mob(filtername,filterflags,filtervaluetype,filtervalue,filtertime,search_start_date_time,search_end_date_time,filter_show_hunting,filtertarget,filterorder,filterteam,filterbypage)
{
	var filtername_ascii="";
	for (var i=0; i<filtername.length; i++) {
		filtername_ascii=filtername_ascii+filtername.charCodeAt(i)+";";
	}
	
	filtername=filtername_ascii;

	var selectione="";
	var Num=0;
	for (iii=0; iii<document.forms.f.filtertarget.options.length; iii++) {
		document.forms.f.filtertarget. options[iii].selected = true;
		if (document.forms.f.filtertarget. options[iii].selected ) {
			Num=Number(Num+1);
			selectione = selectione+document.forms.f.filtertarget.options[iii].value+";";
		}
	}
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results').innerHTML = '';
	}
	OAjax.open('POST',"mob_search/mob_search_reload_ajax_hunting.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtername='+filtername+'&filterflags='+filterflags+'&filtervaluetype='+filtervaluetype+'&filtervalue='+filtervalue+'&filtertime='+filtertime+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time+'&filter_show_hunting='+filter_show_hunting+'&filtertarget='+selectione+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function search_box_hunting(search,search_type,filter_show,filterorder,filterteam,filterbypage)
{
	var search_ascii="";
	for (var i=0; i<search.length; i++) {
		search_ascii=search_ascii+search.charCodeAt(i)+";";
	}
	
	search=search_ascii;

	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_hunting').innerHTML = '';
	}
	OAjax.open('POST',"search_box/search_box_hunting.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_hunting').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_hunting').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('search='+search+'&search_type='+search_type+'&filter_show='+filter_show+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function search_box_mining(search,search_type,filter_show,filterorder,filterbypage)
{
	var search_ascii="";
	for (var i=0; i<search.length; i++) {
		search_ascii=search_ascii+search.charCodeAt(i)+";";
	}
	
	search=search_ascii;

	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_mining').innerHTML = '';
	}
	OAjax.open('POST',"search_box/search_box_mining.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo2').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_mining').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_mining').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('search='+search+'&search_type='+search_type+'&filter_show='+filter_show+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function search_box_crafting(search,search_type,filter_show,filterorder,filterbypage)
{
	var search_ascii="";
	for (var i=0; i<search.length; i++) {
		search_ascii=search_ascii+search.charCodeAt(i)+";";
	}
	
	search=search_ascii;

	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo3').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_crafting').innerHTML = '';
	}
	OAjax.open('POST',"search_box/search_box_crafting.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo3').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_crafting').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_crafting').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('search='+search+'&search_type='+search_type+'&filter_show='+filter_show+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function search_box_avatars(search,search_type,filter_show,filterbypage)
{
	var search_ascii="";
	for (var i=0; i<search.length; i++) {
		search_ascii=search_ascii+search.charCodeAt(i)+";";
	}
	
	search=search_ascii;

	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo4').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_avatars').innerHTML = '';
	}
	OAjax.open('POST',"search_box/search_box_avatars.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo4').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_avatars').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_avatars').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('search='+search+'&search_type='+search_type+'&filter_show='+filter_show+'&filterbypage='+filterbypage);
}

function search_box_target(search,search_type,filter_show,filterbypage)
{
	var search_ascii="";
	for (var i=0; i<search.length; i++) {
		search_ascii=search_ascii+search.charCodeAt(i)+";";
	}
	
	search=search_ascii;

	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo6').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_target').innerHTML = '';
	}
	OAjax.open('POST',"search_box/search_box_target.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo6').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_target').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_target').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('search='+search+'&search_type='+search_type+'&filter_show='+filter_show+'&filterbypage='+filterbypage);
}

function search_box_teams(search,search_type,filter_show,filterbypage)
{
	var search_ascii="";
	for (var i=0; i<search.length; i++) {
		search_ascii=search_ascii+search.charCodeAt(i)+";";
	}
	
	search=search_ascii;

	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo5').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_teams').innerHTML = '';
	}
	OAjax.open('POST',"search_box/search_box_teams.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo5').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_teams').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_teams').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('search='+search+'&search_type='+search_type+'&filter_show='+filter_show+'&filterbypage='+filterbypage);
}

function details_target_top(target,last_20,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_target_top').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_target_top').innerHTML = '';
	}
	OAjax.open('POST',"details/details_target_top_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_target_top').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_target_top').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_target_top').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('target='+target+'&last_20='+last_20+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function details_target_last(target,last_20,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_target_last').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_target_last').innerHTML = '';
	}
	OAjax.open('POST',"details/details_target_last_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_target_last').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_target_last').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_target_last').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('target='+target+'&last_20='+last_20+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function details_target_favorite_overall(mob,favorite,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_target_favorite_overall').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_target_favorite_overall').innerHTML = '';
	}
	OAjax.open('POST',"details/details_target_favorite_overall_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_target_favorite_overall').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_target_favorite_overall').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_target_favorite_overall').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('mob='+mob+'&favorite='+favorite+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function details_target_favorite_filtered(details_type,filtermobs,filtername,last_20,target,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_target_last').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_target_last').innerHTML = '';
	}
	OAjax.open('POST',"details/details_target_last_filtered.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_target_last').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_target_last').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_target_last').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('details_type='+details_type+'&filtermobs='+filtermobs+'&filtername='+filtername+'&last_20='+last_20+'&target='+target+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function details_target_favorite_last(mob,favorite,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo_details_target_favorite_last').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('details_details_target_favorite_last').innerHTML = '';
	}
	OAjax.open('POST',"details/details_target_favorite_last_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo_details_target_favorite_last').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('details_details_target_favorite_last').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('details_details_target_favorite_last').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('mob='+mob+'&favorite='+favorite+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function society_search_selected_name(filtertarget,filterflags,filtervaluetype,filtervalue,filtertime,search_start_date_time,search_end_date_time,filter_show_hunting,filtername,filtertype,filterorder,filterbypage)
{
	var filtertarget_ascii="";
	for (var i=0; i<filtertarget.length; i++) {
		filtertarget_ascii=filtertarget_ascii+filtertarget.charCodeAt(i)+";";
	}
	
	filtertarget=filtertarget_ascii;
	
	var selectione="";
	var Num=0;
	for (iii=0; iii<document.forms.f.filtername.options.length; iii++) {
		document.forms.f.filtername. options[iii].selected = true;
		if (document.forms.f.filtername. options[iii].selected ) {
			Num=Number(Num+1);
			selectione = selectione+document.forms.f.filtername.options[iii].value+";";
		}
	}
	
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results').innerHTML = '';
	}
	if (filtertype == 1) {
		OAjax.open('POST',"society_search/society_search_reload_ajax_hunting.php",true);
	}
	else if (filtertype == 2){
		OAjax.open('POST',"society_search/society_search_reload_ajax_mining.php",true);
	}
	else if (filtertype == 3){
		OAjax.open('POST',"society_search/society_search_reload_ajax_crafting.php",true);
	}
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtername='+selectione+'&filterflags='+filterflags+'&filtervaluetype='+filtervaluetype+'&filtervalue='+filtervalue+'&filtertime='+filtertime+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time+'&filter_show_hunting='+filter_show_hunting+'&filtertarget='+filtertarget+'&filtertype='+filtertype+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function wof_qualifier_a(search_start_date_time,search_end_date_time,list_support_selected,list_main)
{
	var selectione="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected.options.length; iii++) {
		document.forms.f.list_support_selected. options[iii].selected = true;
		if (document.forms.f.list_support_selected. options[iii].selected ) {
			Num=Number(Num+1);
			selectione = selectione+document.forms.f.list_support_selected.options[iii].value+";";
		}
	}
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results').innerHTML = '';
	}
	OAjax.open('POST',"wof_qualifier_a_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('list_support='+selectione+'&list_main='+list_main+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time);
}

function wof_qualifier_b(search_start_date_time,search_end_date_time,list_support_selected,list_main)
{
	var selectione="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected.options.length; iii++) {
		document.forms.f.list_support_selected. options[iii].selected = true;
		if (document.forms.f.list_support_selected. options[iii].selected ) {
			Num=Number(Num+1);
			selectione = selectione+document.forms.f.list_support_selected.options[iii].value+";";
		}
	}
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results').innerHTML = '';
	}
	OAjax.open('POST',"wof_qualifier_b_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('list_support='+selectione+'&list_main='+list_main+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time);
}

function wof_group_stage_a(search_start_date_time,search_end_date_time,list_support_selected,list_main,list_support_selected2,list_main2)
{
	var selectione="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected.options.length; iii++) {
		document.forms.f.list_support_selected. options[iii].selected = true;
		if (document.forms.f.list_support_selected. options[iii].selected ) {
			Num=Number(Num+1);
			selectione = selectione+document.forms.f.list_support_selected.options[iii].value+";";
		}
	}

	var selectione2="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected2.options.length; iii++) {
		document.forms.f.list_support_selected2. options[iii].selected = true;
		if (document.forms.f.list_support_selected2. options[iii].selected ) {
			Num=Number(Num+1);
			selectione2 = selectione2+document.forms.f.list_support_selected2.options[iii].value+";";
		}
	}
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results').innerHTML = '';
	}
	OAjax.open('POST',"wof_group_stage_a_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('list_support='+selectione+'&list_main='+list_main+'list_support2='+selectione2+'&list_main2='+list_main2+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time);
}

function wof_semi_finals(search_start_date_time,search_end_date_time,list_support_selected,list_main,list_support_selected2,list_main2)
{
	var selectione="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected.options.length; iii++) {
		document.forms.f.list_support_selected. options[iii].selected = true;
		if (document.forms.f.list_support_selected. options[iii].selected ) {
			Num=Number(Num+1);
			selectione = selectione+document.forms.f.list_support_selected.options[iii].value+";";
		}
	}

	var selectione2="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected2.options.length; iii++) {
		document.forms.f.list_support_selected2. options[iii].selected = true;
		if (document.forms.f.list_support_selected2. options[iii].selected ) {
			Num=Number(Num+1);
			selectione2 = selectione2+document.forms.f.list_support_selected2.options[iii].value+";";
		}
	}
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results').innerHTML = '';
	}
	OAjax.open('POST',"wof_semi_finals_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('list_support='+selectione+'&list_main='+list_main+'list_support2='+selectione2+'&list_main2='+list_main2+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time);
}

function wof_final(search_start_date_time,search_end_date_time,list_support_selected,list_main,list_support_selected2,list_main2,list_support_selected3,list_main3)
{
	var selectione="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected.options.length; iii++) {
		document.forms.f.list_support_selected. options[iii].selected = true;
		if (document.forms.f.list_support_selected. options[iii].selected ) {
			Num=Number(Num+1);
			selectione = selectione+document.forms.f.list_support_selected.options[iii].value+";";
		}
	}

	var selectione2="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected2.options.length; iii++) {
		document.forms.f.list_support_selected2. options[iii].selected = true;
		if (document.forms.f.list_support_selected2. options[iii].selected ) {
			Num=Number(Num+1);
			selectione2 = selectione2+document.forms.f.list_support_selected2.options[iii].value+";";
		}
	}
	
	var selectione3="";
	var Num=0;
	for (iii=0; iii<document.forms.f.list_support_selected3.options.length; iii++) {
		document.forms.f.list_support_selected3. options[iii].selected = true;
		if (document.forms.f.list_support_selected3. options[iii].selected ) {
			Num=Number(Num+1);
			selectione3 = selectione3+document.forms.f.list_support_selected3.options[iii].value+";";
		}
	}
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results').innerHTML = '';
	}
	OAjax.open('POST',"wof_final_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('list_support='+selectione+'&list_main='+list_main+'list_support2='+selectione2+'&list_main2='+list_main2+'list_support3='+selectione3+'&list_main3='+list_main3+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time);
}

function society_search_selected_name_top(filtertarget,filterflags,filtervaluetype,filtervalue,filtertime,search_start_date_time,search_end_date_time,filter_show_hunting,filtername,filtertype,filterorder,filterbypage)
{
	var filtertarget_ascii="";
	for (var i=0; i<filtertarget.length; i++) {
		filtertarget_ascii=filtertarget_ascii+filtertarget.charCodeAt(i)+";";
	}
	
	filtertarget=filtertarget_ascii;
	
	var selectione="";
	var Num=0;
	for (iii=0; iii<document.forms.f.filtername.options.length; iii++) {
		document.forms.f.filtername. options[iii].selected = true;
		if (document.forms.f.filtername. options[iii].selected ) {
			Num=Number(Num+1);
			selectione = selectione+document.forms.f.filtername.options[iii].value+";";
		}
	}
	
	
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('search_results_top').innerHTML = '';
	}
	if (filtertype == 1) {
		OAjax.open('POST',"society_search/society_search_reload_ajax_hunting_top.php",true);
	}
	else if (filtertype == 2){
		OAjax.open('POST',"society_search/society_search_reload_ajax_mining_top.php",true);
	}
	else if (filtertype == 3){
		OAjax.open('POST',"society_search/society_search_reload_ajax_crafting_top.php",true);
	}
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		document.getElementById('tempo2').innerHTML = '';
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('search_results_top').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';
				}else{                             /* PAS OK */
					document.getElementById('search_results_top').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';
				}
			}
		}
	}

	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filtername='+selectione+'&filterflags='+filterflags+'&filtervaluetype='+filtervaluetype+'&filtervalue='+filtervalue+'&filtertime='+filtertime+'&search_start_date_time='+search_start_date_time+'&search_end_date_time='+search_end_date_time+'&filter_show_hunting='+filter_show_hunting+'&filtertarget='+filtertarget+'&filtertype='+filtertype+'&filterorder='+filterorder+'&filterbypage='+filterbypage);
}

function live_feed()
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('live_feed').innerHTML = '';
	}
	OAjax.open('POST',"live_feed_reload.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('live_feed').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('live_feed').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('');

}

function last_index(actual_type,filtershow,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('last_index').innerHTML = '';
	}
	OAjax.open('POST',"index/index_last.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('last_index').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('last_index').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&filtershow='+filtershow+'&filterbypage='+filterbypage);

}

function top_today(actual_type,filtershow,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('top_today').innerHTML = '';
	}
	OAjax.open('POST',"index/top_today.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo2').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_today').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_today').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&filtershow='+filtershow+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);

}

function top_last(actual_type,filtershow,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo3').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('top_last').innerHTML = '';
	}
	OAjax.open('POST',"index/top_last.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo3').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_last').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_last').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&filtershow='+filtershow+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);

}

function index_menu(actual_type,actual_day,last)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');

	OAjax.open('POST',"menu/index_menu.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('index_menu').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('index_menu').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&actual_day='+actual_day+'&last='+last);
}

function top_daily(actual_type,today_start,today_end,last,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_daily').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_daily_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_daily').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_daily').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&today_start='+today_start+'&today_end='+today_end+'&last='+last+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function top_daily_menu(actual_type,actual_day,actual_year,week_before)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_daily_menu').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_daily_ajax_menu.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo2').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_daily_menu').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_daily_menu').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&actual_day='+actual_day+'&actual_year='+actual_year+'&week_before='+week_before);
}

function top_monthly(actual_type,today_start,today_end,last,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_monthly').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_monthly_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_monthly').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_monthly').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&today_start='+today_start+'&today_end='+today_end+'&last='+last+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function top_monthly_menu(actual_type,actual_month,actual_year,month_before)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_monthly_menu').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_monthly_ajax_menu.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo2').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_monthly_menu').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_monthly_menu').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&actual_month='+actual_month+'&actual_year='+actual_year+'&month_before='+month_before);
}

function top_weekly(actual_type,today_start,today_end,last,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_weekly').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_weekly_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_weekly').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_weekly').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&today_start='+today_start+'&today_end='+today_end+'&last='+last+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function top_weekly_menu(actual_type,today_start,today_end,week_before)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_weekly_menu').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_weekly_ajax_menu.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo2').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_weekly_menu').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_weekly_menu').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&today_start='+today_start+'&today_end='+today_end+'&week_before='+week_before);
}

function top_weekly_2(actual_type,today_start,today_end,last,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_weekly').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_weekly_ajax_2.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_weekly').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_weekly').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&today_start='+today_start+'&today_end='+today_end+'&last='+last+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function top_weekly_menu_2(actual_type,today_start,today_end,week_before)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_weekly_menu').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_weekly_ajax_menu_2.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo2').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_weekly_menu').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_weekly_menu').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&today_start='+today_start+'&today_end='+today_end+'&week_before='+week_before);
}

function top_daily_2(actual_type,today_start,today_end,last,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_daily').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_daily_ajax_2.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_daily').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_daily').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&today_start='+today_start+'&today_end='+today_end+'&last='+last+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function top_daily_menu_2(actual_type,actual_day,actual_year,week_before)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_daily_menu').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_daily_ajax_menu_2.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo2').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_daily_menu').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_daily_menu').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&actual_day='+actual_day+'&actual_year='+actual_year+'&week_before='+week_before);
}

function top_monthly_2(actual_type,today_start,today_end,last,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_monthly').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_monthly_ajax_2.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_monthly').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_monthly').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&today_start='+today_start+'&today_end='+today_end+'&last='+last+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function top_monthly_menu_2(actual_type,actual_month,actual_year,month_before)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('top_monthly_menu').innerHTML = '';
	}
	OAjax.open('POST',"../top/top_menu_monthly_ajax_menu_2.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo2').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('top_monthly_menu').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('top_monthly_menu').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&actual_month='+actual_month+'&actual_year='+actual_year+'&month_before='+month_before);
}

function last_30d(actual_type,last,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('last_30d').innerHTML = '';
	}
	OAjax.open('POST',"../top/last_30d_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('last_30d').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('last_30d').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&last='+last+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function last_30d_2(actual_type,last,filterorder)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('last_30d').innerHTML = '';
	}
	OAjax.open('POST',"../top/last_30d_ajax_2.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('last_30d').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('last_30d').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&last='+last+'&filterorder='+filterorder);
}

function overall(actual_type,last,filterorder,filterteam,filterbypage)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('last_30d').innerHTML = '';
	}
	OAjax.open('POST',"../top/overall_ajax.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('last_30d').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('last_30d').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&last='+last+'&filterorder='+filterorder+'&filterteam='+filterteam+'&filterbypage='+filterbypage);
}

function overall_2(actual_type,last,filterorder)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('last_30d').innerHTML = '';
	}
	OAjax.open('POST',"../top/overall_ajax_2.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('last_30d').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('last_30d').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('actual_type='+actual_type+'&last='+last+'&filterorder='+filterorder);
}

function societies_action(type,name,society,new_society)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo1').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('societies_action').innerHTML = '';
	}
	OAjax.open('POST',"societies_action_reload.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo1').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('societies_action').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('societies_action').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('name='+name+'&society='+society+'&type='+type+'&new_society='+new_society);
}

function societies_add(new_name,society,new_society)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo2').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('societies_add').innerHTML = '';
	}
	OAjax.open('POST',"societies_add_reload.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo2').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('societies_add').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('societies_add').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('new_name='+new_name+'&society='+society+'&new_society='+new_society);
}

function societies_list2(society,sleep,action_remove,new_society)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo3').innerHTML = '<img src="scripts/images/ajax-loader.gif">';
		document.getElementById('societies_list2').innerHTML = '';
	}
	OAjax.open('POST',"societies_list2_reload.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo3').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('societies_list2').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('societies_list2').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('society='+society+'&sleep='+sleep+'&action_remove='+action_remove+'&new_society='+new_society);
}

function getXhr(){
	var xhr = null; 
	if(window.XMLHttpRequest) // Firefox et autres
	xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject){ // Internet Explorer 
		try {
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	else { // XMLHttpRequest non supporté par le navigateur 
		alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
		xhr = false; 
	} 
	return xhr;
}

/**
			* Méthode qui sera appelée sur le click du bouton
			*/
function gosoc(societies_search_name){
	var xhr = getXhr();
	// On défini ce qu'on va faire quand on aura la réponse
	xhr.onreadystatechange = function(){
		// On ne fait quelque chose que si on a tout reçu et que le serveur est ok
		if(xhr.readyState == 4 && xhr.status == 200){
			leselect = xhr.responseText;
			// On se sert de innerHTML pour rajouter les options a la liste
			document.getElementById('new_name').innerHTML = leselect;
		}
	}

	// Ici on va voir comment faire du post
	xhr.open("POST","societies_search_name.php",true);
	// ne pas oublier ça pour le post
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	// ne pas oublier de poster les arguments
	// ici, l'id de l'auteur
	xhr.send("societies_search_name="+societies_search_name);
}


function disco(filterorder)
{
	var OAjax;
	if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
	else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP');
	if(OAjax){
		document.getElementById('tempo').innerHTML = '<img src="../scripts/images/ajax-loader.gif">';
		document.getElementById('disco').innerHTML = '';
	}
	OAjax.open('POST',"disco/index.php",true);
	OAjax.onreadystatechange = function()
	{
		if (OAjax.readyState == 4 && OAjax.status==200)
		{
			document.getElementById('tempo').innerHTML = '';
			if (document.getElementById)
			{
				if (OAjax.responseText =='true') { /* OK */
					document.getElementById('disco').innerHTML=''+OAjax.responseText+'';
				}else{                             /* PAS OK */
					document.getElementById('disco').innerHTML=''+OAjax.responseText+'';
				}
			}
		}
	}
	OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	OAjax.send('filterorder='+filterorder);
}
