var xmlHttp;
var xmlHttp2;
var xmlHttp3;
var xmlHttp4;

function getdb(i, catid, type, show_front, now, access, nullDate, gidaccess, bs, bc, gbs)
{

document.getElementById("toprev").innerHTML='<center><img src="http://www.hardwaremx.com/loading2.gif"></center>';
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="http://www.hardwaremx.com/modules/imagen/toprevlib.php";
url=url+"?q=1";
url=url+"&i="+i;
url=url+"&catid="+catid;
url=url+"&type="+type;
url=url+"&show_front="+show_front;
url=url+"&now="+now;
url=url+"&access="+access;
url=url+"&nullDate="+nullDate;
url=url+"&gidaccess="+gidaccess;
url=url+"&bs="+bs;
url=url+"&bc="+bc;
url=url+"&gbs="+gbs;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=function() 
{

	if (xmlHttp.readyState==4) 
	{
document.getElementById("toprev").innerHTML=xmlHttp.responseText;
  }
}
xmlHttp.send(null);

}


function getdbco(i, catid, type, show_front, now, access, nullDate, gidaccess, bs, bc, gbs)
{
document.getElementById("toprev").innerHTML='<center><img src="http://www.hardwaremx.com/loading2.gif"></center>';
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="http://www.hardwaremx.com/modules/imagen/toprevlib.php";
url=url+"?q=1";
url=url+"&i="+i;
url=url+"&catid="+catid;
url=url+"&type="+type;
url=url+"&show_front="+show_front;
url=url+"&now="+now;
url=url+"&access="+access;
url=url+"&nullDate="+nullDate;
url=url+"&gidaccess="+gidaccess;
url=url+"&bs="+bs;
url=url+"&bc="+bc;
url=url+"&gbs="+gbs;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=function() 
{

	if (xmlHttp.readyState==4) 
	{
document.getElementById("toprev").innerHTML=xmlHttp.responseText;
  }
}
xmlHttp.send(null);

}

function impri(tema, id)
{

document.getElementById("enido").innerHTML="<div align=center><img src=http://www.hardwaremx.com/loading.gif></div>";
xmlHttp2=GetXmlHttpObject();
if (xmlHttp2==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="http://www.hardwaremx.com/modules/imagen/lastpost.php";
url=url+"?q=1";
url=url+"&tema="+tema;
url=url+"&tab="+id;
url=url+"&forumArray=83, 94, 81, 64, 80";
url=url+"&numberOfPost=16";
url=url+"&compactMod=0";
url=url+"&maxTitleLength=40";
url=url+"&introText=";
url=url+"&dateFormat=d/m/y";
xmlHttp2.open("GET",url,true);
xmlHttp2.onreadystatechange=function() 
{

	if (xmlHttp2.readyState==4) 
	{
document.getElementById("enido").innerHTML=xmlHttp2.responseText;
  }
}

xmlHttp2.send(null);
newset_active(id);
}





function getad(tema, count, catid, showhits, showdescr, sortreverse, sortby, linktarget, usejxdir, viewitem, preitem, postitem, columns)
{
document.getElementById("reflinks").innerHTML='<center><img src="http://www.hardwaremx.com/loading.gif"></center>';
xmlHttp3=GetXmlHttpObject();
if (xmlHttp3==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="http://www.hardwaremx.com/modules/imagen/jxshowlinks.php";
url=url+"?q=1";
url=url+"&tema="+tema;
url=url+"&count="+count;
url=url+"&catid="+catid;
url=url+"&showhits="+showhits;
url=url+"&showdescr="+showdescr;
url=url+"&sortreverse="+sortreverse;
url=url+"&sortby="+sortby;
url=url+"&linktarget="+linktarget;
url=url+"&usejxdir="+usejxdir;
url=url+"&viewitem="+viewitem;
url=url+"&preitem="+preitem;
url=url+"&postitem="+postitem;
url=url+"&columns="+columns;
xmlHttp3.open("GET",url,true);
xmlHttp3.onreadystatechange=function() 
{

	if (xmlHttp3.readyState==4) 
	{
document.getElementById("reflinks").innerHTML=xmlHttp3.responseText;
  }
}
xmlHttp3.send(null);

}




function getchat()
{

xmlHttp4=GetXmlHttpObject();
if (xmlHttp4==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="http://www.hardwaremx.com/irc/get.php";
url=url+"?q=1";
xmlHttp4.open("GET",url,true);
xmlHttp4.onreadystatechange=function() 
{

	if (xmlHttp4.readyState==4) 
	{
var str=xmlHttp4.responseText;
var str1=str.split(" ");
var str2=str.substr(str1[0].length,str.length);
if (str1[0] == 1)
{var usrs=" Usuario ";}else{var usrs=" Usuarios ";}
var str3="Hay <font color=#999999>" + str1[0] + usrs + "</font>en el chat. Topic: <font color=#999999>" + str2 + "</font>";
var str4="<a href=http://www.hardwaremx.com/index.php?option=com_wrapper&Itemid=36>" + str3 + "</a>";
document.getElementById("outchat").innerHTML=str4;
  }
}
xmlHttp4.send(null);
setTimeout("getchat()",10000);
}

































































function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}




var active="tab1";
function foc(id)
{

if (id!=active)
{document.getElementById(id).style.background="#252525";
}
}
function unfoc(id)
{
if (id!=active)
{
document.getElementById(id).style.background="transparent url(http://www.hardwaremx.com/templates/wr_elegans_mundus/images/image/tile_sub.gif)";
document.getElementById(id).style.borderBottom="1px solid #000000";
}
}
function set_active(id)
{
active=id;
document.getElementById("tab1").style.background="transparent url(http://www.hardwaremx.com/templates/wr_elegans_mundus/images/image/tile_sub.gif)";
document.getElementById("tab1").style.borderBottom="1px solid #000000";
document.getElementById("tab2").style.background="transparent url(http://www.hardwaremx.com/templates/wr_elegans_mundus/images/image/tile_sub.gif)";
document.getElementById("tab2").style.borderBottom="1px solid #000000";
document.getElementById(id).style.background="#252525";
document.getElementById(id).style.borderBottom="1px solid #252525";

}




var ishov = '';

function hov(id)
{
if (id=='me')
{
ishov.style.background='#252525';

window.document.getElementById('toprev').style.display='block';
}
else
{
id.style.background='#252525';

window.document.getElementById('toprev').style.display='block';
ishov = id;
}
}
function unhov(id)
{
if (id=='me')
{
ishov.style.background='transparent';
window.document.getElementById('toprev').style.display='none';
}
else
{
id.style.background='transparent';
window.document.getElementById('toprev').style.display='none';
}

}










































var active="tab1";
function newfoc(id)
{

if (id!=active)
{document.getElementById(id).style.background="#cccccc";
}
}
function newunfoc(id)
{
if (id!=active)
{
document.getElementById(id).style.background="#f0f0f0";
}
}
function newset_active(id)
{
active=id;
document.getElementById("tab1").style.background="#f0f0f0";
document.getElementById("tab1").style.border="none";
document.getElementById("tab1").style.borderBottom="1px solid #cccccc";
document.getElementById("tab2").style.background="#f0f0f0";
document.getElementById("tab2").style.border="none";
document.getElementById("tab2").style.borderBottom="1px solid #cccccc";
document.getElementById(id).style.background="#ffffff";
document.getElementById(id).style.border="1px solid #cccccc";
document.getElementById(id).style.borderBottom="1px solid #ffffff";

}




var ishov = '';

function newhov(id)
{
if (id=='me')
{
ishov.style.color='#ffffff';

window.document.getElementById('toprev').style.display='block';
}
else
{
id.style.color='#ffffff';

window.document.getElementById('toprev').style.display='block';
ishov = id;
}
}
function newunhov(id)
{
if (id=='me')
{
ishov.style.color='#1fb6ef';
window.document.getElementById('toprev').style.display='none';
}
else
{
id.style.color='#1fb6ef';
window.document.getElementById('toprev').style.display='none';
}

}