
//-- post the status 
function postStatus(url,message){
	
	$.post(url, 												//-- TODO: replace code/page to grab image
		{														//-- TODO: parameter
		userStatus: message
		},
		function(data){
			$('#userStatusCur').text('Current Status: ' + message);
			$('#userStatus').val('');
			$('#userStatus').removeClass("inputReadyTextArea");
			limitChars("userStatus",145,"userStatusCharacterCount");
			$('#userStatus').val('What are you doing?');
			userStatusModified = false;
		});
	
	return false;
}

//-- post the location
function postLocation(url, location){
	
	if ($("#profileLocation").valid()) {
	$.post(url, 												//-- TODO: replace code/page to grab image
		{														//-- TODO: parameter
			location: location
		},
		function(data){
			$('#locationValue').text(location);
			locationGroup.clearGroup();
		});
	}
	return false;
}

//-- post the location
function postKid(location){
	
	$.post("http://localhost/asp/jquery/post/post.asp", 		//-- TODO: replace code/page to grab image
		{														//-- TODO: parameter
			location: location
		},
		function(data){
			
			alert("parameters:" + location + "; Post Status" + data);
			//_jsonThumb = $.xml2json(xml);
		});
	
	return false;
}

//-- post the location
function postProfile(location){
	
	$.post("http://localhost/asp/jquery/post/post.asp", 		//-- TODO: replace code/page to grab image
		{														//-- TODO: parameter
			location: location
		},
		function(data){
			
			alert("parameters:" + location + "; Post Status" + data);
			//_jsonThumb = $.xml2json(xml);
		});
	
	return false;
}

//-- post kids
function updateKids(jsonKids){
	
	$.post("http://localhost/asp/jquery/post/post.asp", 		//-- TODO: replace code/page to grab image
		{														//-- TODO: parameter
			location: location
		},
		function(data){
			
			alert("parameters:" + location + "; Post Status" + data);
			//_jsonThumb = $.xml2json(xml);
		});
	
	return false;
}

function profileGetEmailOption()
{
	if($('#hunuEmails').val()=='on')
		return 'hunuEmails'
	else if ($('#myEmails').val()=='on')
		return 'myEmails';
	else
		return 'friendEmails'
}

//-- post email
function postEmail(url, currentEmail, newEmail, option){
	
	if ($("#profileEmail").valid()) {
	$.post(url, 		//-- TODO: replace code/page to grab image
		{														//-- TODO: parameter
			currentEmail:currentEmail,
			newEmail:newEmail,
			option:option
		},
		function(data){
			$('#emailValue').text(newEmail);
			emailGroup.clearGroup();
		});
	}
	return false;
}

//-- post 
function postChangePassword(url, currentPassword, newPassword){
	
	if ($("#profilePassword").valid()) {
	$.post(url, 		//-- TODO: replace code/page to grab image
		{														//-- TODO: parameter
			currentPassword:currentPassword,
			newPassword:newPassword
		},
		function(data){
			passwordGroup.clearGroup();
		});
	}
	return false;
}

//-- post birth date
function postBirthdate(url, birthDate){
	if ($("#profileBirthdate").valid()) {
	$.post(url, 		//-- TODO: replace code/page to grab image
		{														//-- TODO: parameter
		birthday:birthDate
		},
		function(data){
			$('#birthdayValue').text(birthDate);
			birthdateGroup.clearGroup();
		});
	}	
	return false;
}

function editProfile(){
	$("#editProfile").css({display:"none"});
	$("#spanProfile").css({display:"none"});
	$(".editLinks").css({display:"inline"});
	$(".recordRow").addClass("recordRow editMode");
}
