




//----------------------------------------------------------------------------------------------------
function setup()
{
    if(document.getElementById("quotationloop"))
    window.setTimeout("quotation_LOOP()", document.getElementById("quotationsintervall").value);

    if(document.getElementById("foundersloop"))
    window.setTimeout("founders_LOOP()", document.getElementById("foundersintervall").value);

    if(document.getElementById("forthinkingloop"))
    window.setTimeout("forthinking_LOOP()", document.getElementById("forthinkingintervall").value);
}


//----------------------------------------------------------------------------------------------------
function getxmlhttp()
{
  var result = false;
  if( typeof XMLHttpRequest != "undefined" ) {
      result = new XMLHttpRequest();
  } else {
      try {
          result = new ActiveXObject("Msxml2.XMLHTTP");
          isIE = true;
      } catch (e) {
          try {
              result = new ActiveXObject("Microsoft.XMLHTTP");
              isIE = true;
          } catch (ie) {}
      }
  }
  return result;
}


//----------------------------------------------------------------------------------------------------
function quotation_LOOP()
{
    var jetzt = new Date();
    var zeit = jetzt.getTime();

    var pstr = '?zeit='+zeit+'&quotation_LOOP=OK';
    pstr += '&quotID='+document.getElementById("quotID").value;

    var xmlHttp = getxmlhttp();
    if (xmlHttp) {
        xmlHttp.open('GET', 'ajax/start.ajax.php' + pstr, true);
        xmlHttp.onreadystatechange = function () {
            if (xmlHttp.readyState == 4) {
                var text = xmlHttp.responseText;
                if(document.getElementById("quotationloop"))
                document.getElementById("quotationloop").innerHTML = text;

           }
        }
        xmlHttp.send(null);
    }
    if(document.getElementById("quotationloop"))
    window.setTimeout("quotation_LOOP()", document.getElementById("quotationsintervall").value);
}


//----------------------------------------------------------------------------------------------------
function falsities_LOOP()
{
    var jetzt = new Date();
    var zeit = jetzt.getTime();

    var pstr = '?zeit='+zeit+'&falsities_LOOP=OK';
    pstr += '&falsID='+document.getElementById("falsID").value;

    var xmlHttp = getxmlhttp();
    if (xmlHttp) {
        xmlHttp.open('GET', 'ajax/start.ajax.php' + pstr, true);
        xmlHttp.onreadystatechange = function () {
            if (xmlHttp.readyState == 4) {
                var text = xmlHttp.responseText;

                if(document.getElementById("falsitiesloop"))
                document.getElementById("falsitiesloop").innerHTML = text;

           }
        }
        xmlHttp.send(null);
    }
}

//----------------------------------------------------------------------------------------------------
function founders_LOOP()
{

    var jetzt = new Date();
    var zeit = jetzt.getTime();

    var pstr = '?zeit='+zeit+'&founders_LOOP=OK';
    pstr += '&founID='+document.getElementById("founID").value;

    var xmlHttp = getxmlhttp();
    if (xmlHttp) {
        xmlHttp.open('GET', 'ajax/start.ajax.php' + pstr, true);
        xmlHttp.onreadystatechange = function () {
            if (xmlHttp.readyState == 4) {
                var text = xmlHttp.responseText;

                if(document.getElementById("foundersloop"))
                document.getElementById("foundersloop").innerHTML = text;

           }
        }
        xmlHttp.send(null);
    }
    if(document.getElementById("foundersloop"))
    window.setTimeout("founders_LOOP()", document.getElementById("foundersintervall").value);
}

//----------------------------------------------------------------------------------------------------
function forthinking_LOOP()
{

    var jetzt = new Date();
    var zeit = jetzt.getTime();

    var pstr = '?zeit='+zeit+'&forthinking_LOOP=OK';
    pstr += '&forthID='+document.getElementById("forthID").value;

    var xmlHttp = getxmlhttp();
    if (xmlHttp) {
        xmlHttp.open('GET', 'ajax/start.ajax.php' + pstr, true);
        xmlHttp.onreadystatechange = function () {
            if (xmlHttp.readyState == 4) {
                var text = xmlHttp.responseText;

                if(document.getElementById("forthinkingloop"))
                document.getElementById("forthinkingloop").innerHTML = text;

           }
        }
        xmlHttp.send(null);
    }
    if(document.getElementById("forthinkingloop"))
    window.setTimeout("forthinking_LOOP()", document.getElementById("forthinkingintervall").value);
}