function pageLoaded()
{
  var img = new Image();
  img.src="setLoaded?loaded=1";
}
function startFlash()
{
  var movie = document.test_pkw_start;
  if( movie )
    movie.Play();
}
function hideFlash()
{
/*
  var movie = document.getElementById("test_pkw_start");
  if( movie )
    movie.style.visibility="hidden";
*/
}

function openWin(theURL,winName,features) {
  win = window.open(theURL,winName,features);
  win.focus();
}
function showProm()
{
  var prom = document.getElementById("leftprom");
  if( !prom )
    return;
  prom.style.visibility="visible";
}

function hideAll() {
  var prom = document.getElementById("leftprom");
  if( !prom )
    return;

  prom.style.visibility="hidden";

}
function showMe(picURL,height,width){
  newWindow=window.open(picURL,'newWin','toolbar=no,width='+width+',height='+height);
  newWindow.document.write('<html><title>Fiat PKW<\/title><head><\/head><body style="margin:0px;padding:0px;background:white"><img src="'+picURL+'" alt="Image"><\/body><\/html>');
  newWindow.focus();
}

var imgMenuNorm = new Array(5);
var imgMenuOver = new Array(5);
preloadMenuImages();

function preloadMenuImages()
{
  for( var i=0; i<5; i++ )
  {
    imgMenuNorm[i] = new Image();
    imgMenuOver[i] = new Image();
  }
  
  imgMenuNorm[0].src="images/dt/modell-norm.gif";
  imgMenuNorm[1].src="images/dt/dienst-norm.gif";
  imgMenuNorm[2].src="images/dt/news-norm.gif";
  imgMenuNorm[3].src="images/dt/fiatpartner-norm.gif";
  imgMenuNorm[4].src="images/dt/angebot-norm.gif";
  //imgMenuNorm[5].src="images/dt/promotion-norm.gif";

  imgMenuOver[0].src="images/dt/modell-over.gif";
  imgMenuOver[1].src="images/dt/dienst-over.gif";
  imgMenuOver[2].src="images/dt/news-over.gif";
  imgMenuOver[3].src="images/dt/fiatpartner-over.gif";
  imgMenuOver[4].src="images/dt/angebot-over.gif";
  //imgMenuOver[5].src="images/dt/promotion-over.gif";
}
function resetMenu(index)
{
  if( index )
  {
    setNormal(index);
    return;
  }
  
  for( var i=0; i<5; i++ )
    setNormal(i);
}
function setNormal(index)
{
  var item = document.getElementById("menu"+index);
  if( !item )
    return;
  item.src = imgMenuNorm[index].src;
}
function highlightMenu(index)
{
  resetMenu();
  var item = document.getElementById("menu"+index);
  if( !item )
    return;
  item.src = imgMenuOver[index].src;
}

