function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function mostraClients(lid,tipus){
var nu='&lid='+lid+'&tipus='+tipus;	
var url = "show_clients.php";
var params = nu;
http=objetoAjax();
http.open("POST", url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4) {
		$('#right').html(http.responseText);
	}
}
http.send(params);

}
function mostraQS(lid,tipus){
var nu='&lid='+lid+'&tipus='+tipus;	
var url = "show_qs.php";
var params = nu;
http=objetoAjax();
http.open("POST", url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4) {
		$('#right').html(http.responseText);
		var x = $('#right'); 
		for(var i=0;i<x.length;i++)
		{
   	    	eval(x[i].text);
   		}
	}
}
http.send(params);
}
function mostraTC(tipus,frase,idioma){
if(tipus=="no"){
$('#ulno').show();	
$('#ulre').hide();
$('#ullink').hide();
}else if(tipus=="re"){
$('#ulno').hide();	
$('#ulre').show();
$('#ullink').hide();
}else if(tipus=="link"){
$('#ulno').hide();	
$('#ulre').hide();
$('#ullink').show();
}
var nu='&tipus='+tipus+'&frase='+frase+'&idioma='+idioma;	
var url = "admin/show_tc.php";
var params = nu;
http=objetoAjax();
http.open("POST", url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4) {
		$('#right').html(http.responseText);
		var x = $('#right'); 
		for(var i=0;i<x.length;i++)
		{
   	    	eval(x[i].text);
   		}
	}
}
http.send(params);
}

function mostraW(tipus,idioma){
if(tipus=="own"){
$('#ulown').show();
$('#ulred').hide();
}else if(tipus=="red"){
$('#ulown').hide();
$('#ulred').show();
}
var nu='&tipus='+tipus+'&idioma='+idioma;	
var url = "show_w.php";
var params = nu;
http=objetoAjax();
http.open("POST", url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4) {
		$('#noms').html(http.responseText);
		var x = $('#right'); 
		for(var i=0;i<x.length;i++)
		{
   	    	eval(x[i].text);
   		}
	}
}
http.send(params);
}
