//*******TESTEJA FORMULARI********
function Testeja(nomform)
{
 enviar=true
 var emailchk  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
 with (nomform)
 {
  compos=dades_testeja.value.split('#')
  for (t=0;t<compos.length;t++)
  {
   variable=eval(compos[t]+'.value')   
   if (variable=='' || !variable || (compos[t]=='email' && !emailchk.test(variable)))
   {
    enviar=false;
    alert(missatgeerrorform);
    eval(compos[t]+'.focus()');break;
    }
  }//end for
 }//end with
 return enviar

}


//*****Parametritzador*****

params=unescape(self.location.search.substring(1)).split('&')
if (params[0]!='')
{
 for (t=0;t<params.length;t++) 
 { 
  newvar=params[t].split('=') 
  eval(newvar[0]+'="'+newvar[1]+'"') 
 }
}

//*****DEARRAY*******
function Dearray(strarray,num)
{
 return strarray.indexOf('|')!=-1?strarray.split('|')[num]:strarray
}