function ShowTalkToMe(PID)
{var http=false;if(navigator.appName=="Microsoft Internet Explorer"){http=new ActiveXObject("Microsoft.XMLHTTP");}
else{http=new XMLHttpRequest();}
if(navigator.appName=="Microsoft Internet Explorer"){http.open("GET","TalkToMe/TalkToMe.mbm?ACTION=SHOW&PID="+PID+"&IEbug="+Math.round(Math.random()*100000+1),true);}
else{http.open("GET","TalkToMe/TalkToMe.mbm?ACTION=SHOW&PID="+PID,true);}
http.onreadystatechange=function()
{if(http.readyState==4)
{document.getElementById('TALKTOME_Content').innerHTML="";TalkToMeContent=http.responseText.split("\n");var AllLines=TalkToMeContent.length-1;for(var i=0;i<AllLines;i++)
{if(TalkToMeContent[i]=='no_comments')
{document.getElementById('TALKTOME_Content').innerHTML='Dieser Beitrag wurde noch nicht kommentiert.';}
else
{var Output=TalkToMeContent[i].split("|");document.getElementById('TALKTOME_Content').innerHTML+='<p class ="TTMline"><span class="TTMUserName">'+Output[0]+' schrieb am '+Output[2]+' um '+Output[3]+' Uhr</span><br><span class="TTMUserComment">'+Output[4]+'</span></p><div class="TTMspacer"></div>';}}}}
http.send(null);}
function PostTalkToMe()
{onerror=stopError;var http=false;if(navigator.appName=="Microsoft Internet Explorer"){http=new ActiveXObject("Microsoft.XMLHTTP");}
else{http=new XMLHttpRequest();}
if(navigator.appName=="Microsoft Internet Explorer"){http.open("POST","TalkToMe/TalkToMe.mbm?IEbug="+Math.round(Math.random()*100000+1),true);}
else{http.open("POST","TalkToMe/TalkToMe.mbm",true);}
POSTING='PID='+document.getElementById("PID").value+'&UserName='+document.getElementById("UserName").value+'&UserEmail='+document.getElementById("UserEmail").value+'&UserComment='+document.getElementById("UserComment").value;http.send(POSTING);http.onreadystatechange=function()
{if(http.readyState==4)
{document.getElementById("UserComment").value="";ShowTalkToMe(document.getElementById("PID").value);}}
http.send(null);}
function FakeSubmit()
{return;}
function CountChars()
{var CountedChars=1000-document.getElementById("UserComment").value.length;if(CountedChars>=0)
{document.getElementById("UserComment").value=document.getElementById("UserComment").value.substr(0,1000);document.getElementById("CharsLeft").innerHTML=CountedChars;}
if(document.getElementById("UserComment").value.length>=1000)
{alert('Stop!\n'+'Ihre Nachricht hat 1000 Zeichen erreicht!\n'+'Wenn der Kommentar zu groß ist, wird er nicht übermittelt!');document.getElementById("CharsLeft").innerHTML=0;}}
function stopError(){return true;}
