defaultStatus = "MARGINELLA.COM, THE FIRST SHELLS EXCHANGE WEBSITE OF THE WORLD";

function imgswap(dove,cosa) { eval("document.images['"+dove+"'].src='images/"+cosa+"'");}

function getParams()
{
  coppieNomeValore = new Object();
  separatore = ',';
  query = '' + this.location;
  re=/%26/gi;
  query = query.replace(re,"&");
  re=/%3f/gi;
  query = query.replace(re,"?");
  query = query.substring((query.indexOf('?')) + 1);
  if (query.length < 1) { return false; }
  coppie = new Object();
  numCoppie = 1;
  while (query.indexOf('&') > -1) {
    coppie[numCoppie] = query.substring(0,query.indexOf('&'));
    query = query.substring((query.indexOf('&')) + 1);
    numCoppie++;
  }
  coppie[numCoppie] = query;
  for (i in coppie)
  {
    nomeCampo = coppie[i].substring(0,coppie[i].indexOf('='));
    valoreCampo = coppie[i].substring((coppie[i].indexOf('=')) + 1);
    while (valoreCampo.indexOf('+') > -1)
      valoreCampo = valoreCampo.substring(0,valoreCampo.indexOf('+')) + ' ' + valoreCampo.substring(valoreCampo.indexOf('+') + 1);
    valoreCampo = unescape(valoreCampo);
    if (coppieNomeValore[nomeCampo])
    {
      coppieNomeValore[nomeCampo] = coppieNomeValore[nomeCampo] + separatore + valoreCampo;
    } else {
      coppieNomeValore[nomeCampo] = valoreCampo;
    }
  }
  return coppieNomeValore;
}

function SelectEqual(campo, valore, dbMatrix)
{
  var ResultMatrix = new Array();
  var count = 0;
  for (i=0; i<dbMatrix.length; i++)
  {
    valoreCampo = '' + dbMatrix[i][campo]; 
    if (valoreCampo.toUpperCase() == valore.toUpperCase())
    {
      ResultMatrix[count] = new Array();
      ResultMatrix[count] = dbMatrix[i];
      count++;
    }
  }
  return ResultMatrix;
}