// 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.107.179.231÷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.107.179.231÷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 = '
'; } else { ajaxerror.innerHTML = ''; starcomimg.innerHTML = update[4].toString() + starcomimgOld; } } } } catch(e){alert("an error occured");} finally{} } function handleResponseTextRating() { 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 voteres = document.getElementById('vot'+update[0]+'_'+update[5]); var totalvote = document.getElementById('tv'+update[0]+'_'+update[5]); var starimg = document.getElementById('star'+update[0]+'_'+update[5]); if (update[4] == 'Sie haben schon bewertet.') { drelement.innerHTML = update[4]; } else { drelement.innerHTML = ''; starimg.innerHTML = update[4]; voteres.innerHTML = update[2]; totalvote.innerHTML = update[3]; } } } } catch(e){alert("an error occured");} finally{} } function shwComments(idnum,dividentifier) { var dvelement = document.getElementById('dv'+idnum+'_'+dividentifier); dvelement.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{} }