function deleteComment(date, userID, appID, wikiID, newsID)

{

var ajaxRequest;  // The variable that makes Ajax possible!



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{

		// Opera 8.0+, Firefox, Safari

		ajaxRequest = new XMLHttpRequest();

	} catch (e){

		// Internet Explorer Browsers

		try{

			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

		} catch (e) {

			try{

				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

			} catch (e){

				// Something went wrong

				alert("Unexpected Error, Try Again.!");

				return false;

			}

		}

	}

		

	var ajaxDisplay = document.getElementById(date+""+userID);



	// Create a function that will receive data sent from the server

	ajaxRequest.onreadystatechange = function(){

		if(ajaxRequest.readyState == 1) {

			document.getElementById("delete_"+date+""+userID).innerHTML = "";

		}

		

		if(ajaxRequest.readyState == 4){

			

			if(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;

	//alert(queryString);



	ajaxRequest.open('POST', "http://www.myrepospace.com/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;  // The variable that makes Ajax possible!



var answer = confirm("Are you sure you want to delete this?")



	if (answer) {

		

	try{

		// Opera 8.0+, Firefox, Safari

		ajaxRequest = new XMLHttpRequest();

	} catch (e){

		// Internet Explorer Browsers

		try{

			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

		} catch (e) {

			try{

				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

			} catch (e){

				// Something went wrong

				alert("Unexpected Error, Try Again.!");

				return false;

			}

		}

	}



	// Create a function that will receive data sent from the server

	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;

	//alert(queryString);



	ajaxRequest.open('POST', "http://www.myrepospace.com/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;  // The variable that makes Ajax possible!



var answer = confirm("Are you sure you want to delete this?")



	if (answer) {

		

	var toUserID = document.getElementById('user').value;

	

	try{

		// Opera 8.0+, Firefox, Safari

		ajaxRequest = new XMLHttpRequest();

	} catch (e){

		// Internet Explorer Browsers

		try{

			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

		} catch (e) {

			try{

				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

			} catch (e){

				// Something went wrong

				alert("Unexpected Error, Try Again.!");

				return false;

			}

		}

	}



	// Create a function that will receive data sent from the server

	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;

	//alert(queryString);



	ajaxRequest.open('POST', "http://www.myrepospace.com/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;  // The variable that makes Ajax possible!



var answer = confirm("Are you sure you want to delete this?")



	if (answer) {	

	try{

		// Opera 8.0+, Firefox, Safari

		ajaxRequest = new XMLHttpRequest();

	} catch (e){

		// Internet Explorer Browsers

		try{

			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

		} catch (e) {

			try{

				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

			} catch (e){

				// Something went wrong

				alert("Unexpected Error, Try Again.!");

				return false;

			}

		}

	}



	// Create a function that will receive data sent from the server

	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;

	//alert(queryString);



	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); 

	

	

	}



}