/*      You may use this code in your own projects as long as this 
	copyright is left in place. All code is provided AS-IS.
	This code is distributed in the hope that it will be useful,
 	but WITHOUT ANY WARRANTY; without even the implied warranty of
 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
	
        Derived from a Java Script (c) 2006 Ryan Smith / 345 Technical / 345 Group http://www.DynamicAJAX.com

        Modifications (c) 2007 http://www.cybercity.de
*/

function getXmlHttpRequestObject()
{
  if (window.XMLHttpRequest)
  {
    return new XMLHttpRequest();
  }
  else if(window.ActiveXObject)
  {
    return new ActiveXObject("Microsoft.XMLHTTP");
  }
  else
  {
    alert("Ihr Browser unterstützt die notwendigen Funktionen leider nicht!\nSie sollten eine neuere Version verwenden.");
  }
}

 var DocReq = getXmlHttpRequestObject();
 var DT = '';

function DocRequest(DocLink, DocTarget)
{
  DocReq = getXmlHttpRequestObject();

  DT = DocTarget;    // schwere geburt!

  if (DocReq.readyState == 4 || DocReq.readyState == 0)
  {
    DocReq.open("GET", DocLink, true);
    DocReq.onreadystatechange = handleDocRequest; 
    DocReq.send(null);
  }		
}

function handleDocRequest()
{
  if (DocReq.readyState == 4)
  {
    var ss = document.getElementById(DT);
    ss.innerHTML = DocReq.responseText;
  }
}


