// Load friends memories
function makeTall(){
	$(this).animate({"height":90},200).html( $(this).html());
	$(this).find("div.detail").slideDown("fast");
	$(this).find("div.detail").load("/dashboard/inc_memoriesother_more.asp?MemoryID=" + $(this).attr("name") );
	$(this).addClass("expandhover");
}
function makeTall2(){
	$(this).animate({"height":90},200).html( $(this).html());
	$(this).find("div.detail").slideDown("fast");
	$(this).find("div.detail").load("/dashboard/inc_memories_more.asp?MemoryID=" + $(this).attr("name") );
	$(this).addClass("expandhover");
}
function makeTall3(){
	$(this).animate({"height":90},200).html( $(this).html());
	$(this).find("div.detail").slideDown("fast");
	$(this).find("div.detail").load("/profile/ajax_memories.asp?MemoryID=" + $(this).attr("name") );
	$(this).addClass("expandhover");
}
function makeTall4(){
	$(this).animate({"height":90},200).html( $(this).html());
	$(this).find("div.detail").slideDown("fast");
	$(this).find("div.detail").load("/profile/ajax_albums.asp?AlbumID=" + $(this).attr("name") );
	$(this).addClass("expandhover");
}
function makeTall5(){
	$(this).animate({"height":90},200).html( $(this).html());
	$(this).find("div.detail").slideDown("fast");
	$(this).find("div.detail").load("/dashboard/inc_albums_more.asp?AlbumID=" + $(this).attr("name") );
	$(this).addClass("expandhover");
}
// Close friends memories
function makeShort(){
	$(this).animate({"height":16},200).html( $(this).html());
	$(this).find("div.detail").slideUp("fast");
	$(this).removeClass("expandhover");
}
function makeShort2(){
	$(this).animate({"height":16},200).html( $(this).html());
	$(this).find("div.detail").slideUp("fast");
	$(this).removeClass("expandhover");
}
function makeShort3(){
	$(this).animate({"height":18},200).html( $(this).html());
	$(this).find("div.detail").slideUp("fast");
	$(this).removeClass("expandhover");
}
function makeShort4(){
	$(this).animate({"height":18},200).html( $(this).html());
	$(this).find("div.detail").slideUp("fast");
	$(this).removeClass("expandhover");
}
function makeShort5(){
	$(this).animate({"height":18},200).html( $(this).html());
	$(this).find("div.detail").slideUp("fast");
	$(this).removeClass("expandhover");
}
// make something taller
function changeHeight(elementName, newHeight, heightIncrease) {
	var curHeight = $("#"+elementName).height();
	if (curHeight != newHeight) {
		$("#Resize"+elementName).text("Make larger");
		$("#"+elementName).animate({"height":newHeight},"slow");
	}
	else {
		$("#Resize"+elementName).text("Make smaller");
		$("#"+elementName).animate({"height":newHeight*heightIncrease},"slow");
	}
	return false;
}
// Show/hide upload elements
function uploadImage() {
	$("#Uploading").slideDown("slow");
	$("#UploadItems").slideUp("slow");
}
// Check username availability
function checkUsername() {
	myVar = $("#Username").val();
	if (myVar.length != 0) {
		$("#UsernameAvailable").hide();
		$("#UsernameAvailable").load("/scripts/ajax_checkusername.asp?Username="+myVar);
		$("#UsernameAvailable").fadeIn("slow");
	}
}
// Delete an image
function deleteImage(imageID) {
	var agree = confirm('Are you sure?');
	if (agree) {
		$.ajax({
			type: "GET",
			url: "/dashboard/albums/image_delete.asp?ImageID="+imageID,
			dataType: "script"
		});
		$("#thumb"+imageID).fadeOut("slow");
	}
	return false;
}
//
function deleteProfileComment(inputID) {
	var agree = confirm("Are you sure?");
	if (agree) {
		$.ajax({
			type: "GET",
			url: "/dashboard/ajax_deletecomment.asp?CommentID="+inputID,
			dataType: "script"
		});
		$("#comment"+inputID).fadeOut("slow");
	}
	return false;
}