//
// AJAX-Production Framework 1.02
//   (c) 2006 futureminds.de
//


function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}

var http = createRequestObject();

function getPage(seite) {
    if(!seite) seite="home.htm";
    http.open('get', seite);
    http.onreadystatechange = handleResponse;
    http.send(null);
}


function handleResponse() {
       if(http.readyState == 4){
        var response = http.responseText;
        window.document.getElementById('content_text').innerHTML = response;
        }
}

function initialize() {
            dhtmlHistory.initialize();
            dhtmlHistory.addListener(handleHistoryChange);
            var initialLocation = dhtmlHistory.getCurrentLocation();
            
            if (initialLocation == null) initialLocation = "home.htm";
            updateUI(initialLocation, null);
            }
            
function handleHistoryChange(newLocation, historyData) {
                updateUI(newLocation, historyData);
        }
        
function updateUI(newLocation, historyData){
              getPage(newLocation);
        }
        
function pushContent(seite) {
/*			dhtmlHistory.add(seite,true);*/
            getPage(seite);
        }

function findeFlash (flash) {
    if (document.all) {
      if (document.all[flash]) {
        return document.all[flash];
      }
      if (window.opera) {
        var movie = eval(window.document + flash);
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if(document.layers) {
      if(document.embeds[flash]) {
        var movie = document.embeds[flash];
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if (!document.getElementById) {
      return;
    }
    var movie = document.getElementById(flash);
    if (movie.SetVariable) {
      return movie;
    }
    var movies = movie.getElementsByTagName('embed');
    if (!movies || !movies.length) {
      return;
    }
    movie = movies[0];
    if (movie.SetVariable) {
      return movie;
    }
    return;
  }
