/*
'<!--$$Revision: 1 $-->
'<!--$$Author: david $-->
'<!--$$Date: 21/04/08 10:57a $-->
'<!--$$Logfile: /collectZing2/ajax/people.js $-->
'<!--$$NoKeywords: $-->
*/ 
	var http_request = false;
	var loadstatustext="<img src=images/loading.gif width=16 height=16>";
	var workingDiv="divWorking";
	
function dropFromFriendsList(memId) {
	if(confirm("Are you sure you want to drop this person from your Friends List?")) {
		var theString ="ajax/people.asp?action=removefromfriendslist&memId="+memId;
		var aObj=new Array(); 
		var ajaxIndex = aObj.length;
		aObj[ajaxIndex] = new sack();
		aObj[ajaxIndex].requestFile = theString;
		aObj[ajaxIndex].onCompletion = function(){
					MM_goToURL('parent',URLDomain+'member/'+memId+'/');
		};  
		aObj[ajaxIndex].runAJAX();			
	} else { 
	return; 
	} 
}
function addInvite(memId) {
	var theString ="ajax/people.asp?action=addinvite&memId="+memId+"&inviteMsg="+encodeURI(document.getElementById("inviteMsg").value);
	document.getElementById("divInvitePopMain").innerHTML="<div id=divInvitePopLoading><img src=images/bigLoading.gif width=35 height=35></div>";
	document.getElementById("divInvitePopLoading").style.visibility="visible";
	var aObj=new Array(); 
	var ajaxIndex = aObj.length;
	aObj[ajaxIndex] = new sack();
	aObj[ajaxIndex].requestFile = theString;
	aObj[ajaxIndex].onCompletion = function(){
		document.getElementById("divInvitePopMain").innerHTML=aObj[ajaxIndex].response;
		//MM_goToURL('parent',URLDomain+'member/'+memId+'/');
	};  
	aObj[ajaxIndex].runAJAX();	
}
	
function closeInvitePerson() {
	document.getElementById("divInvitePop").innerHTML="";
	document.getElementById("divInvitePop").style.visibility="hidden";
}
function drawInvitePerson(memId) {
	document.getElementById("divInvitePop").style.visibility="visible";
	var theString ="ajax/people.asp?action=drawinviteperson&memId="+memId;
	getDoc(theString,'divInvitePop','');		
}
function closeSearchBox(memId) {
	document.getElementById("divPeopleSearchBox").innerHTML="";
	document.getElementById("divPeopleSearchBox").style.height="0px";
	var theString ="ajax/people.asp?action=drawopensearchselect&memId="+memId;
	getDoc(theString,'divPeopleSearchSelect',workingDiv);			
}	
function openSearchBox(keywords1,screenName,countryCode,townCity,memId,memberType) {
	document.getElementById("divPeopleSearchBox").style.minheight="145px";
	var theString ="ajax/people.asp?action=opensearchbox&memId="+memId+"&keywords1="+keywords1+"&screenName="+screenName+"&countryCode="+countryCode+"&townCity="+townCity+"&memberType="+memberType;
	if (workingDiv!=''){document.getElementById(workingDiv).innerHTML=loadstatustext};
	var aObj=new Array(); 
	var ajaxIndex = aObj.length;
	aObj[ajaxIndex] = new sack();
	aObj[ajaxIndex].requestFile = theString;
	aObj[ajaxIndex].onCompletion = function(){
		document.getElementById("divPeopleSearchBox").innerHTML=aObj[ajaxIndex].response;
		//var theString ="ajax/people.asp?action=drawclosedsearchselect&memId="+memId;
		//getDoc(theString,'divPeopleSearchSelect','');		
		if (workingDiv!=''){document.getElementById(workingDiv).innerHTML=""};
	};  
	aObj[ajaxIndex].runAJAX();			
}