/*****************************************/
/* FONCTIONS JAVASCRIPT DU SITE NICOSITE */
/*****************************************/

function Redirect(thePage)
// Redirige vers une URL passée en paramètre
{
  parent.main_frame.location = thePage;
}

function paramValue(paramName)
// Recupère un paramètre passé par URL
{
  if (paramName=="")
    return "";
  paramList=parent.main_frame.location.search.substring(1,location.search.length);
  pDeb=paramList.indexOf(paramName);
  if (pDeb==-1)
    return "";
  else
    pDeb=pDeb+paramName.length+1;
  pFin=paramList.indexOf("&",pDeb);
  if (pFin==-1)
    pFin=paramList.length;
  return paramList.substring(pDeb,pFin);
}

function ShakeMyWindow()
// Secoue la fenêtre (utilisée par le Wizz)
{
  nbSecousses = 30; // Nombre de secousses
  xAmplitude = 15; // Amplitude en pixels
  for (iSec=0;iSec<nbSecousses;iSec++)
  {
    sens = Math.pow(-1,iSec);
    for (xStep=0;xStep<xAmplitude;xStep++)
      parent.self.moveBy(sens*1,0);
  }
}
