var lastLoadedPage = false;
var i = -55; 
function load_dates(x,y) {
document.getElementById('content').innerHTML='<center><img src="img/loading.gif"><br /><br />Lade...</center>';
var currentTime = new Date();
var c_time = currentTime.getTime();

if(window.XMLHttpRequest)
{
 ol = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
 try
 {
  ol = new ActiveXObject('Msxml2.XMLHTTP');
 }
 catch(e1)
 {
  try
  {
   ol = new ActiveXObject('Microsoft.XMLHTTP');
  }
  catch(e2)
  {
  }
 }
}
function schreibeText()
{
 if(ol.readyState == 4 && ol.status == 200)
 {
   response = ol.responseText;

     document.getElementById('content').innerHTML=response;
 }
}

if(ol != null)
{
 ol.open('GET','get_dates/'+x+'.php?t='+c_time+y,true);
 ol.onreadystatechange = schreibeText;
 ol.send(null);
}   
lastLoadedPage = x;   
}
function send_contact_form() {

  alert('a');

}  
function show_green_info_txt(txt) {


   document.getElementById('msg_box_head').innerHTML=txt;
   
   slide_box_out();
   
}
function slide_box_out() {
   
      document.getElementById('msg_box_head').style.top=i+'px';
      
      i++;
      
      if(i < 40) setTimeout("slide_box_out();",1);
      else setTimeout("slide_box_in();",2000);
   
   }
   
   function slide_box_in() {
                                                           
      document.getElementById('msg_box_head').style.top=i+'px';
      
      i--;
      
      if(i > -55) setTimeout("slide_box_in();",1);
   
}  
function checkAccPlace() {
    tlh = top.location.hash;
    
    if(tlh == '#main' && tlh != '#' + lastLoadedPage) load_dates('main', '');
    if(tlh == '#simulations' && tlh != '#' + lastLoadedPage) load_dates('simulations', '');
    if(tlh == '#concept' && tlh != '#' + lastLoadedPage) load_dates('concept', '');
    if(tlh == '#downloads' && tlh != '#' + lastLoadedPage) load_dates('downloads', '');
    if(tlh == '#contact' && tlh != '#' + lastLoadedPage) load_dates('contact', '');
    if(tlh == '#imprint' && tlh != '#' + lastLoadedPage) load_dates('imprint', '');
    
    setTimeout('checkAccPlace()',750);
}