function convertEntities(b){var d,a;d=function(c){if(/&[^;]+;/.test(c)){var f=document.createElement("div");f.innerHTML=c;return!f.firstChild?c:f.firstChild.nodeValue}return c};if(typeof b==="string"){return d(b)}else{if(typeof b==="object"){for(a in b){if(typeof b[a]==="string"){b[a]=d(b[a])}}}}return b};(function(A){if(typeof A!=="undefined"){A.noConflict()}})(jQuery);function createHttpRequest(){http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(http_request){return http_request;}else{alert('FATAL ERROR: Cannot create an XMLHTTP instance.');return false;}}
function makeRequest(query){ajaxQuery=createHttpRequest();ajaxQuery.onreadystatechange=showResult;try{ajaxQuery.open('POST','http://www.relativetruth.net/wp-content/plugins/ajaxified-expand-now.php',true);ajaxQuery.setRequestHeader('Content-Type','application/x-www-form-urlencoded');ajaxQuery.send(query);}catch(e){alert('I have encountered an problem while fetching data due to the cross-domain restriction of the XMLHTTPRequest object.');}}
function showResult(){if(ajaxQuery.readyState==4){if(ajaxQuery.status==200){gE('viewBox-'+postID).innerHTML=ajaxQuery.responseText;}else{alert('Error while connecting to the server. Please try again leter.');closeView(postID);}}else{gE('viewBox-'+postID).innerHTML='Fetching Data...';}}
function getData(id,type){if(type=='post'){pid=id.split('-');postID='p'+pid[0];makeRequest('a=getPost&p='+id);}else if(type=='comment'){postID='c'+id;makeRequest('a=getComment&p='+id);}else{return false;}
gE('viewBox-'+postID).style.display='block';if(type=='comment'||id==pid){gE('open-'+postID).style.display='none';gE('close-'+postID).style.display='inline';}}
function closeView(id){gE('viewBox-'+id).style.display='none';gE('open-'+id).style.display='inline';gE('close-'+id).style.display='none';}
function gE(eid){return document.getElementById(eid);}

