	function closeZone(zone){
		var div = document.getElementById(zone);
		div.innerHTML = '';
		div.style.display = 'none';
	}
	
	//bookmark methods
	function addBookmark(uid){
		sendXmlHttp('GET', '/bookmark.do?Go=addBookmark&refId='+uid, null, true, 'actionZone', true);
	}
	
	//friend methods
	function addFriend(uid){	
		sendXmlHttp('GET', '/profile.do?Go=requestFriend&uid='+uid, null, true, 'actionZone', true);
	}
	function addFriendSent(uid, validationCode, message){
		if(message.length==0){
			alert('Enter a message with your request.'); 
			return false;
		}
		if(validationCode.length==0){
			alert('Please enter the validation code.'); 
			return false;
		}
		
		sendXmlHttp('POST', '/profile.do?Go=requestFriendSend&uid='+uid, 'validationCode='+validationCode+'&message='+message, true, 'actionZone', true);
	}
	
	function friend(friendType, uid, page){	
		activteObj = document.getElementById('friendLabel'+friendType);
		if(activteObj){
			activteObj.style.textDecoration = 'underline';
			activteObj.style.color = '#3366cc';
			for(var i=0; i < 5; i++){
				obj = document.getElementById('friendLabel'+i);				
				if(i != friendType && obj){
					obj.style.textDecoration = 'none';
					obj.style.color = '#333333';
				}
			}
		}
	
		sendXmlHttp('GET', '/profile.do?Go=friend&uid='+uid+'&friendType='+friendType+'&page='+page, null, true, 'friendZone', false);
	}
	
	//message methods
	function addMessage(uid){
		sendXmlHttp('GET', '/message.do?Go=createMessage&uid='+uid, null, true, 'actionZone', true);
	}
	
	function sendMessage(uid, oTitle, oMessage, oCode){	
		if(oTitle.value.length==0){
			alert('Please enter the message subject.'); 
			oTitle.focus();
			return false;
		}
		if(oMessage.value.length==0){
			alert('Please write your message.'); 
			oMessage.focus();
			return false;
		}
		if(oCode.value.length==0){
			alert('Please enter the validation code.'); 
			oCode.focus();
			return false;
		}
		sendXmlHttp('POST', '/message.do?Go=createMessageSend&uid='+uid, 'title='+oTitle.value+'&message='+oMessage.value+'&validationCode='+oCode.value, true, 'actionZone', true);
	}
		
	//user comment methods	
	function comment(uid, page){	
		sendXmlHttp('GET', '/profile.do?Go=comment&uid='+uid+'&allComment='+page, null, true, 'commentZone', true);
	}
	
	function addComment(uid){
		sendXmlHttp('GET', '/profile.do?Go=addComment&uid='+uid, null, true, 'actionZone', true);
	}
	
	function submitComment(uid, message, validationCode){	
		if(message.length==0){
			alert('Please enter your comment.'); 
			return false;
		}
		if(validationCode.length==0){
			alert('Please enter the validation code.'); 
			return false;
		}
		sendXmlHttp('POST', '/profile.do?Go=submitComment&uid='+uid, 'message='+message+'&validationCode='+validationCode, true, 'actionZone', true);
	}
	
	function deleteComment(cid){
		sendXmlHttp('GET', '/profile.do?Go=deleteComment&cid='+cid, null, true, 'profileZone', true);
	}
	
	//photo methods
	function albums(uid){	
		sendXmlHttp('GET', '/profilePhoto.do?Go=albums&uid='+uid, null, true, 'profileZone', false);		
	}
	
	function album(albumId){	
		sendXmlHttp('GET', '/profilePhoto.do?Go=album&albumId='+albumId, null, true, 'profileZone', false);
	}
		
	function photo(uid, page){	
		sendXmlHttp('GET', '/profilePhoto.do?uid='+uid+'&page='+page, null, true, 'photoZone', false);
	}
	
	function photoViewer(albumId,pid,allComment,index,ccid){
		sendXmlHttp('GET', '/profilePhoto.do?Go=viewer&albumId='+albumId+'&pid='+pid+'&allComment='+allComment+'&index='+index+'&ccid='+ccid, null, true, 'profileZone', false);
		//defaultZone(0);
	}
	
	function addPhotoComment(pid){
		sendXmlHttp('GET', '/profilePhoto.do?Go=addComment&pid='+pid, null, true, 'addPhotoComment', true);
	}
	
	function submitPhotoComment(pid, message, validationCode){	
		if(message.length==0){
			alert('Please enter your comment.'); 
			return false;
		}
		if(validationCode.length==0){
			alert('Please enter the validation code.'); 
			return false;
		}
		
		sendXmlHttp('POST', '/profilePhoto.do?Go=submitComment&pid='+pid, 'message='+message+'&validationCode='+validationCode, true, 'addPhotoComment', true);
	}
	
	function deletePhotoComment(pid,allComment,cid){
		sendXmlHttp('GET', '/profilePhoto.do?Go=deleteComment&pid='+pid+'&allComment='+allComment+'&cid='+cid, null, true, 'profileZone', true);
	}
