
/* _____________________________________________ */
function showRandomFoto() {
  fotosMax = 10;
  // fotos
  fotos = new Array();
  for (f=0; f<=fotosMax; f++) {
    if (f<10)
      img_prelude = "0";
    else
      img_prelude = "";
    fotos[f] = "'images/headers/header_" + img_prelude + f + ".jpg'";
  }
  // Get cookies
  randomFotoCookie = Get_Cookie('randomFotoz');
  // check for cookie
  if(randomFotoCookie == null) {
    // no randomFoto set yet, random begin:
    randomFotoz = Math.floor(Math.random() * fotos.length);
  } else {
    randomFotoz = randomFotoCookie*1 + 1;
    if (randomFotoz > fotosMax)
      randomFotoz = 0;
  }
  // set cookie
  var today = new Date();
  var zero_date = new Date(0,0,0);
  today.setTime(today.getTime() - zero_date.getTime());
  var cookie_expire_date = new Date(today.getTime() + (8 * 7 * 86400000));
	Set_Cookie('randomFotoz',randomFotoz,cookie_expire_date);
  // finally write img random foto
  randomFotoImg = fotos[randomFotoz];
  document.getElementById('header_photo').style.backgroundImage = "url(" + randomFotoImg + ")";
  return;
}
function writeFlashTitle(id, txt) {
	if (document.getElementById(id)) {
		var so = new SWFObject("flash/titel.swf", id+"_swf", "360", "30", "8", "#FFFFFF");
		so.addParam("wmode", "transparent");
		so.addParam("scale", "noscale");
		so.addVariable("txt", txt);
		so.addVariable("flashid", id);
		so.write(id);
	}
}
function flashTitleResize(id, h) {
	if (document.getElementById(id)) {
		var newHeight = h+"px";

		document.getElementById(id+"_swf").setAttribute("height", h);
		document.getElementById(id).style.height = newHeight;
		

	}
}
