//AJAX MARKETING
var xmlHttp


function ajax_DF_main(ID)
{
   xmlHttp=GetXmlHttpObject()
   if (xmlHttp==null)
     {
     alert ("Ihr Browser unterstützt leider kein AJAX-Aufruf!");
     return;
     }

   var url="box1.php";
   url = url+"?ID="+ID;
   xmlHttp.onreadystatechange=function anonymous() { Change_DF_Main(ID); };
   xmlHttp.open("GET",url,true)
   xmlHttp.send(null)

}

function ajax_DF_right(ID)
{
   xmlHttp2=GetXmlHttpObject()
   if (xmlHttp2==null)
     {
     alert ("Ihr Browser unterstützt leider kein AJAX-Aufruf!");
     return;
     }
   var url="box2.php";
   url = url+"?ID="+ID;
   xmlHttp2.onreadystatechange=function anonymous() { Change_DF_Right(ID); };
   xmlHttp2.open("GET",url,true)
   xmlHttp2.send(null)
}


function Change_DF_Main(ID)
{
        if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
         {
          document.getElementById('box1').innerHTML=xmlHttp.responseText;
          //Folgeaufruf ist hier noch nicht wichtig
          ajax_DF_right(ID);
         }
        else
         {
          document.getElementById('box1').innerHTML="Lade Daten...";
         }


}

function Change_DF_Right()
{
        if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
         {
          document.getElementById('box2').innerHTML=xmlHttp2.responseText
         }
        else
         {
          document.getElementById('box2').innerHTML="Lade Daten...";
         }
}



function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}


//AJAX MARKETING ENDE





function switchImgColor(img,color,id)
{
 var OldSrc = img.src;
 if (color == true)
 {

  document.getElementById('img'+id).src = OldSrc.replace(/color=false/g, "color=true");
  //alert(OldSrc.replace(/false/g, "true"));
 }

 if (color == false)
 {

  document.getElementById('img'+id).src = OldSrc.replace(/color=true/g, "color=false");
  //alert(OldSrc.replace(/true/g, "false"));
 }

}



function printStandard(Location,Page)
{
   window.open(Location+'printpages/standard_pages.php?page='+Page, 'PopUp_PRINT', 'width=750,"+(screen.height-250)+",left=100,top=94,scrollbars=1,locationbar=1');
}
