// Written by Dexter Zafra at www.ex-designz.net
//Handle Check Username Availability Using Ajax
var http = createRequestObject();
function createRequestObject()
{
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(f) { xmlhttp=null; }
}
if(!xmlhttp&&typeof XMLHttpRequest!="undefined")
{
xmlhttp=new XMLHttpRequest();
}
return xmlhttp;
}
function sndRating(idnum,rateval,mode,dividentifier)
{
var dvelement = document.getElementById('dv'+idnum+'_'+dividentifier);
dvelement.innerHTML = "
";
try
{
http.open('GET', 'http://www.123recht.net/geiloajax.asp?mode='+mode+'&id='+idnum+'&rateval='+rateval+'&ip=38.103.63.60÷ntifier='+dividentifier);
http.onreadystatechange = handleResponseTextRating;
http.send(null);
}
catch(e){}
finally{}
}
function doSndComment(idnum,comment,mode,dividentifier,captcha1,captcha2) {
if (document.getElementById("kommentartext").value!="") {
sndComment(idnum,comment,mode,dividentifier,captcha1,captcha2);
document.getElementById("kommentartext").value="";
$("div#kommentar").toggle("slow");
if ((captcha1 != "") && (captcha2 != "")) {
Recaptcha.reload();
}
}
}
function sndComment(idnum,comment,mode,dividentifier,captcha1,captcha2)
{
try
{
http.open('GET', 'http://www.123recht.net/geiloajax.asp?mode='+mode+'&id='+idnum+'&comment='+escape(comment)+'&ip=38.103.63.60÷ntifier='+dividentifier+'&captcha1='+captcha1+'&captcha2='+captcha2);
http.onreadystatechange = handleResponseText;
http.send(null);
}
catch(e){}
finally{}
}
function handleResponseText()
{
try
{
if((http.readyState == 4)&& (http.status == 200))
{
var response = http.responseText;
var update = new Array();
if(response.indexOf('|') != -1)
{
update = response.split('|');
var drelement = document.getElementById('dv'+update[0]+'_'+update[5]);
var starcomimg = document.getElementById('starcom'+update[0]+'_'+update[5]);
var starcomimgOld = starcomimg.innerHTML;
var ajaxerror = document.getElementById('ajaxError');
if (update[4].toString() == 'CAPTCHA') {
ajaxerror.innerHTML = '
";
try
{
http.open('GET', 'http://www.123recht.net/geiloajaxcomments.asp?id='+idnum+'÷ntifier='+dividentifier);
http.onreadystatechange = handleResponseShow;
http.send(null);
}
catch(e){}
finally{}
}
function handleResponseShow()
{
try
{
if((http.readyState == 4) && (http.status == 200))
{
var response = http.responseText;
var update = new Array();
if(response.indexOf('|') != -1)
{
update = response.split('|');
var drelement = document.getElementById('dv'+update[0]+'_'+update[1]);
var cmntslinks = document.getElementById('showcomments'+update[0]+'_'+update[1]);
var starcomimg = document.getElementById('starcom'+update[0]+'_'+update[1]);
drelement.style.display ='none';
cmntslinks.innerHTML = update[2].toString();
starcomimg.innerHTML = '';
}
}
}
catch(e){alert("an error occured");}
finally{}
}