
function startpage_init(){
  document.getElementById('start_container').style.visibility = 'hidden';
} // function

function animate_startpage_init(){
  var j = 1;
  img_array = new Array();
  for (var i = 0; i < animate_startpage_init.arguments.length; i+=4) {
    img_array[i] = new Image();
    img_array[i].src = animate_startpage_init.arguments[i+3];
  } // for

  for (var i = 0; i < animate_startpage_init.arguments.length; i+=4) {
    window.setTimeout("animate_startpage('"+animate_startpage_init.arguments[i]+"',  '"+animate_startpage_init.arguments[i+1]+"', '"+animate_startpage_init.arguments[i+2]+"', '"+animate_startpage_init.arguments[i+3]+"')", ((j-1)*4500));
    j++;
  } // for

  var args = "'";
  for(var i = 0; i < animate_startpage_init.arguments.length; i++) {
     args += animate_startpage_init.arguments[i];
     if (animate_startpage_init.arguments[i+1]) {
      args += "','";
    }
  }
  args += "'";
  //alert (args);
  window.setTimeout("animate_startpage_init("+args+")", 4500*(j-1));
} // function

function animate_startpage(){
  var i = 0;
//  document.getElementById('proj_a').href= animate_startpage.arguments[0];
  document.getElementById('proj_p').innerHTML = animate_startpage.arguments[2];
  document.getElementById('proj_img').src = animate_startpage.arguments[3];
  document.getElementById('proj_img_a').href = animate_startpage.arguments[0];
  document.getElementById('proj_img').alt = animate_startpage.arguments[1];
  document.getElementById('start_container').style.opacity = 0.1;
	document.getElementById('start_container').style.filter = "alpha(opacity=" + (0.1*100) + ")";
  document.getElementById('proj_img').style.opacity = 0.1;
	document.getElementById('proj_img').style.filter = "alpha(opacity=" + (0.1*100) + ")";
  document.getElementById('start_container').style.visibility = 'visible';
  increase = window.setTimeout("increase_op()", 23);

}


function increase_op(){
  var op = parseFloat(document.getElementById('proj_img').style.opacity);
  op += 0.02;
  if (op < 0.8){
    document.getElementById('start_container').style.opacity = op;
    document.getElementById('start_container').style.filter = "alpha(opacity=" + (op*100) + ")";
    document.getElementById('proj_img').style.opacity = op;
	  document.getElementById('proj_img').style.filter = "alpha(opacity=" + (op*100) + ")";

    document.getElementById('proj_p').style.opacity = op;
    document.getElementById('proj_p').style.filter = "alpha(opacity=" + (op*100) + ")";

    increase = window.setTimeout("increase_op()", 23);
  } else {
    window.clearTimeout(increase);
    decrease = window.setTimeout("decrease_op()", 2000);
  }
}

function decrease_op(){
  var op = parseFloat(document.getElementById('proj_img').style.opacity);
  op -= 0.02;
  if (op > 0.1){
    document.getElementById('start_container').style.opacity = op;
    document.getElementById('start_container').style.filter = "alpha(opacity=" + (op*100) + ")";
    document.getElementById('proj_img').style.opacity = op;
	  document.getElementById('proj_img').style.filter = "alpha(opacity=" + (op*100) + ")";

    document.getElementById('proj_p').style.opacity = op;
    document.getElementById('proj_p').style.filter = "alpha(opacity=" + (op*100) + ")";


	  decrease = window.setTimeout("decrease_op()", 23);
  } else {
    document.getElementById('start_container').style.visibility= 'hidden';
    window.clearTimeout(decrease);
    //increase = window.setTimeout("increase_op()", 1000);
  }
}


/*function popup_img(){
  newwindow = window.open('', 'image_zoom', 'width=740,height=560,scrollbars=yes,resizable=yes');
  newwindow.document.write("<html><head><title>bogner.cc die museumsplaner</title></head>");
  newwindow.document.write("<body><img style='cursor:pointer;' onclick='window.close()' src='"+document.getElementById('bigpic_href').href+"'/></body></html>");
  if (window.focus) {newwindow.focus()}
  return false;
}*/

function switch_img (idx) {
  if (!img_data[idx]) {
    idx = 0;
  }
  document.getElementById('bigpic').src= img_data[idx];
  document.getElementById('imgtxt').innerHTML =  img_data[idx+1];
  cur_idx = idx;
}

function showFootnote(fn_id){
   document.getElementById(fn_id).style.display='block';
}

function hideFootnote(fn_id){
   document.getElementById(fn_id).style.display='none';
}

