function deleteComment(date,userID,appID,wikiID,newsID)
{var ajaxRequest;var answer=confirm("Are you sure you want to delete this?")
var what;var whatID;if(answer){if(appID==0&&wikiID==0)
{what='newsDate';whatID=newsID;}
else if(wikiID==0&newsID==0)
{what='repoID';whatID=appID;}
else{what='wikiID';whatID=wikiID;}
try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Unexpected Error, Try Again.!");return false;}}}
var ajaxDisplay=document.getElementById(date+""+userID);ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==1){document.getElementById("delete_"+date+""+userID).innerHTML="";}
if(ajaxRequest.readyState==4){if(escape(ajaxRequest.responseText)=='good')
{opacity('all_'+date+''+userID+'',100,0,700);setTimeout("document.getElementById('all_"+date+""+userID+"').style.display = 'none'",1000);}
else
{alert(ajaxRequest.responseText);alert("Oopps. There was an error! Refresh and try again");}}}
var queryString="date="+date+"&userID="+userID+"&"+what+"="+whatID+"&what="+what;ajaxRequest.open('POST',"/include/ajax/delete.php",true);ajaxRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");ajaxRequest.setRequestHeader("Content-length",queryString.length);ajaxRequest.setRequestHeader("Connection","close");ajaxRequest.send(queryString);}}
function deletePackage(userID,pkgID)
{var ajaxRequest;var answer=confirm("Are you sure you want to delete this?")
if(answer){try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Unexpected Error, Try Again.!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==1){document.getElementById("delete_"+pkgID).innerHTML="Loading..";}
if(ajaxRequest.readyState==4){if(ajaxRequest.responseText=='good')
{opacity('all_'+pkgID,100,0,700);setTimeout("document.getElementById('all_"+pkgID+"').style.display = 'none'",1000);}
else
{alert(ajaxRequest.responseText);alert("Oopps. There was an error! Please try again");document.getElementById("delete_"+pkgID).innerHTML="Delete";}}}
var queryString="userID="+userID+"&pkgID="+pkgID;ajaxRequest.open('POST',"/include/ajax/delete.php",true);ajaxRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");ajaxRequest.setRequestHeader("Content-length",queryString.length);ajaxRequest.setRequestHeader("Connection","close");ajaxRequest.send(queryString);}}
function deletePComment(fromUserID,date)
{var ajaxRequest;var answer=confirm("Are you sure you want to delete this?")
if(answer){var toUserID=document.getElementById('user').value;try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Unexpected Error, Try Again.!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==1){document.getElementById("delete_"+date+""+fromUserID).innerHTML="";}
if(ajaxRequest.readyState==4){if(ajaxRequest.responseText=='good')
{opacity('all_'+date+''+fromUserID+'',100,0,700);setTimeout("document.getElementById('all_"+date+""+fromUserID+"').style.display = 'none'",1000);}
else
{alert(ajaxRequest.responseText);alert("Oopps. There was an error! Please try again");}}}
var queryString="toUserID="+toUserID+"&fromUserID="+fromUserID+"&date="+date;ajaxRequest.open('POST',"/include/ajax/delete.php",true);ajaxRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");ajaxRequest.setRequestHeader("Content-length",queryString.length);ajaxRequest.setRequestHeader("Connection","close");ajaxRequest.send(queryString);}}
function deleteComments(id)
{var ajaxRequest;var answer=confirm("Are you sure you want to delete this?")
if(answer){try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Unexpected Error, Try Again.!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==1){document.getElementById("delete_"+id).innerHTML="";}
if(ajaxRequest.readyState==4){if(ajaxRequest.responseText=='good')
{opacity('all_'+id,100,0,700);setTimeout("document.getElementById('all_"+id+"').style.display = 'none'",1000);}
else
{alert(ajaxRequest.responseText);alert("Oopps. There was an error! Please try again");}}}
var queryString="commentID="+id;ajaxRequest.open('POST',"../../../include/ajax/delete.php",true);ajaxRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");ajaxRequest.setRequestHeader("Content-length",queryString.length);ajaxRequest.setRequestHeader("Connection","close");ajaxRequest.send(queryString);}}

function deleteBlog(blogID)
{var answer=confirm("Are you sure you want to delete this blog?");if(answer)
{try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Unexpected Error, Try Again.!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==1){document.getElementById("delete_blog_"+blogID).innerHTML="Loading..";}
if(ajaxRequest.readyState==4){if(ajaxRequest.responseText=='good')
{opacity('blog_'+blogID,100,0,700);setTimeout("document.getElementById('blog_"+blogID+"').style.display = 'none'",1000);}
else
{alert(ajaxRequest.responseText);alert("Oopps. There was an error! Please try again");document.getElementById("delete_blog_"+blogID).innerHTML="Delete";}}}
var queryString="blogID="+blogID;ajaxRequest.open('POST',"/include/ajax/delete.php",true);ajaxRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");ajaxRequest.setRequestHeader("Content-length",queryString.length);ajaxRequest.setRequestHeader("Connection","close");ajaxRequest.send(queryString);}}
