
var displayed = false;


function showItem(pItem, pMaxFade, pFadeRate, pShowLast)
{
  setTimeout('fx_fadeObjInInit(document.getElementById(\"'+pItem+'\"),'+pMaxFade+', '+pFadeRate+', \"'+pShowLast+'\")', 700);
}

function showUrgent()
{
  //if (displayed) return;
  //displayed=true;
  setTimeout('fx_fadeObjInInit(document.getElementById(\"hint-urgent\"),.85, 60, \"true\")', 700);
  //fx_show('hint-urgent');

}


function showProducts()
{
  if (displayed) return;
  displayed=true;
  setTimeout('fx_fadeObjInInit(document.getElementById(\"hint-products-link\"),.85, 60, \"true\")', 500);
  setTimeout('fx_fadeObjInInit(document.getElementById(\"hint-oil-link\"),.85, 30, \"true\")', 1000);
  setTimeout('fx_fadeObjInInit(document.getElementById(\"hint-gas-link\"),.85, 10, \"true\")', 1400);
  setTimeout('fx_fadeObjInInit(document.getElementById(\"hint-open-link\"),.85, 10, \"true\")', 1600);
  setTimeout('fx_fadeObjInInit(document.getElementById(\"hint-risk-link\"),.85, 20, \"true\")', 1200);

}

function hideProducts()
{
  if (!displayed) return;
  displayed=false;
  setTimeout('fx_fadeObjOutInit(document.getElementById(\"hint-open-link\"),0, 10, \"true\")',1000);
  setTimeout('fx_fadeObjOutInit(document.getElementById(\"hint-gas-link\"),0, 10, \"true\")', 1200);
  setTimeout('fx_fadeObjOutInit(document.getElementById(\"hint-risk-link\"),0, 10, \"true\")', 1400);
  setTimeout('fx_fadeObjOutInit(document.getElementById(\"hint-oil-link\"),0, 10, \"true\")', 1600);
  setTimeout('fx_fadeObjOutInit(document.getElementById(\"hint-products-link\"),0, 10, \"true\")', 2000);

  slide_timeout("hint-open-link", -50,    0, 3, 20, 1000);
  slide_timeout("hint-risk-link",  50,    0, 1, 20, 1000);
  slide_timeout("hint-oil-link",    0, -130, 2, 20, 1200);
  slide_timeout("hint-gas-link",    0,  100, 2, 20, 1000);

}


function fadeout_timeout(pId)
{
  setTimeout('fx_fadeObjOutInit(document.getElementById(\"'+pId+'\"),0, 10, \"true\")',1000);
}

function slide_timeout(pId, pX, pY, pSteps, pInterval, pTimeout)
{
  setTimeout('fx_slide(document.getElementById(\"'+pId+'\"),parseInt(document.getElementById(\"'+pId+'\").style.marginLeft)+'+pX+', parseInt(document.getElementById(\"'+pId+'\").style.marginTop)+'+pY+', '+pSteps+', '+pInterval+')', pTimeout);
}

function resize_timeout(pId, pWidth, pHeight, pSteps, pInterval, pTimeout)
{

  width = parseInt(document.getElementById(pId).style.width) + pWidth;
  height = parseInt(document.getElementById(pId).style.height) + pHeight;
  tmpstr = 'fx_resize(document.getElementById(\"'+pId+'\"),'+ width +', '+height +', '+pSteps+', '+pInterval+')';
  setTimeout(tmpstr, pTimeout);
}

function toggleProducts()
{
  if (displayed)
  {
    displayed=false;
    hideProducts();
  }
  else
  {
    displayed=true;
    showProducts();
  }
}
