function QuickSearchAgain(){
ShowLayer("HeaderSearchForm",true);
ShowLayer("HeaderSearchStatus",false);
}
function QuickSearchUser(_1,_2){
if(_2.trim()!=""){
$("HeaderSearchFor").innerHTML=_2;
$("HeaderSearchMessage").innerHTML=" >> working . . .";
ShowLayer("HeaderSearchForm",false);
ShowLayer("HeaderSearchStatus",true);
if(_1.toUpperCase()=="DISPLAYNAME"){
location.href="/people/?typ="+_1+"&tex="+_2;
}else{
var _3=new Array("SearchType","SearchText");
var _4=new Array(_1,_2);
var _5=XmlRequest.Create("QuickSearchUser",_3,_4);
var _6=new GrooveNetAjax();
_6.SendRequest("POST",AjaxUrl.Api,_5,QuickSearchUserReply,null);
}
}
}
function QuickSearchUserReply(_7){
var _8=_7.responseXML.documentElement;
var _9=_8.getElementsByTagName("status")[0].childNodes[0].nodeValue;
var _a=_8.getElementsByTagName("message")[0].childNodes[0].nodeValue;
if(_9=="true"){
$("HeaderSearchMessage").innerHTML=">> found, displaying . . .";
var _b=_8.getElementsByTagName("UserID")[0].childNodes[0].nodeValue;
location.href="/profile/friend/?cid="+_b;
}else{
$("HeaderSearchMessage").innerHTML=">> "+_a;
}
}
function SearchAvatar(){
$("SearchMessage").innerHTML="searching . . .";
var _c=document.SearchForm.SearchText.value;
var _d=new Array("avatarname");
var _e=new Array(_c);
var _f=XmlRequest.Create("SearchAvatar",_d,_e);
var _10=new GrooveNetAjax();
_10.SendRequest("POST",AjaxUrl.Api,_f,SearchAvatarReply,null);
}
function SearchAvatarReply(_11){
var _12=_11.responseXML.documentElement;
var _13=_12.getElementsByTagName("status")[0].childNodes[0].nodeValue;
var _14=_12.getElementsByTagName("message")[0].childNodes[0].nodeValue;
if(_13=="true"){
$("SearchMessage").innerHTML="Avatar found, re-directing . . .";
var _15=_12.getElementsByTagName("userid")[0].childNodes[0].nodeValue;
location.href="/profile/friend/?cid="+_15;
}else{
$("SearchMessage").innerHTML=_14;
}
}
function ShowAllFriends(){
var _16;
if(Friend.CustomerID){
_16=Friend.CustomerID;
}else{
_16=User.CustomerID;
}
var _17=new Array("userid");
var _18=new Array(_16);
var _19=XmlRequest.Create("ShowFriendsList",_17,_18);
var _1a=new GrooveNetAjax();
_1a.SendRequest("POST",AjaxUrl.Api,_19,ShowAllFriendsReply,null);
}
var myFriends;
function ShowAllFriendsReply(_1b){
var _1c=_1b.responseXML.documentElement;
var _1d=_1c.getElementsByTagName("status")[0].childNodes[0].nodeValue;
var _1e=_1c.getElementsByTagName("message")[0].childNodes[0].nodeValue;
var _1f=0;
if(_1c.getElementsByTagName("friend")[0].hasChildNodes()){
_1f=_1c.getElementsByTagName("friend")[0].getAttribute("count");
}
myFriends=new Array();
var _20="";
if(_1d=="true"){
for(var i=0;i<_1f;i++){
myFriends[i]=new Friends();
myFriends[i].CustomerID=_1c.getElementsByTagName("friendid")[i].childNodes[0].nodeValue;
myFriends[i].FirstName=_1c.getElementsByTagName("friendname")[i].childNodes[0].nodeValue;
if(_1c.getElementsByTagName("friendpicurl")[i].hasChildNodes()){
myFriends[i].ProfilePicUrl=_1c.getElementsByTagName("friendpicurl")[i].childNodes[0].nodeValue;
}else{
myFriends[i].ProfilePicUrl=noPhotoUrl;
}
_20+="<div class='friendlist'>";
_20+="\t<div class='friendpic text7' style='width:70px;margin-bottom:2px;'><a href='/profile/friend/?cid="+myFriends[i].CustomerID+"' target='_blank'><img src='"+myFriends[i].ProfilePicUrl+"' width='70' height='70' border='0'></a></div>";
if(Friend.CustomerID){
_20+="\t<div class='text7' style='margin-bottom:5px;'><a href='/profile/friend/?cid="+myFriends[i].CustomerID+"' target='_blank'>"+ShortString(myFriends[i].FirstName,10)+"</a></div>";
}else{
_20+="\t<div style='width:70px' class='text7' id='txtAllFriendName"+i+"'>";
_20+="\t\t<div style='float:left; width:50px; border:1px none #ff0000;' align='left'><a href='/profile/friend/?cid="+myFriends[i].CustomerID+"' target='_blank'>"+ShortString(myFriends[i].FirstName,7)+"</a></div>";
_20+="\t\t<div style='float:right; border:1px none #ff2200;'><a href='javascript:FriendRules.showConfirmDelete("+myFriends[i].CustomerID+", "+i+", 1)'><img src='/images/ui/ekis.gif' align='absmiddle' alt='delete friend' border='0' /></a></div>";
_20+="\t</div>";
}
if(User.CustomerID){
_20+="\t<div class='text7' style='float:left; width:75px; border:1px none #ff0000;'><a href='javascript:Message.Compose("+i+");' class='link2'><img src='/images/envelop.gif' width='10' height='11' border='0' align='absmiddle'/>&nbsp;send msg</a></div>";
}
_20+="</div>";
}
_20+="<div class='text2' align='center'>&nbsp;</div>";
$("FriendsBigMain").innerHTML=_20;
$("FriendsBigCount").innerHTML=_1f;
}else{
$("FriendsBigMain").innerHTML="<div align='left' class='text1' style='padding-left:5px;'>"+_1e+"</div>";
}
$("FriendsBigTitle").innerHTML=User.DisplayName!=""?(User.DisplayName+"'s"):(User.FirstName+"'s");
ShowLayer("VisualStatusContainer",false);
ShowLayer("DocPopupText",true);
ShowLayer("FriendsBigMain",true);
}
function ReviewUserInfo(){
ShowLayer("ServerReplyContainer",false);
ShowPopup(null,null,false);
ShowLayer("StatFlasher",true);
ShowLayer("EditResult",false);
ViewUserInfo(User.CustomerID,true);
}
function ReviewFriend(){
ShowLayer("StatFlasher",false);
ShowLayer("StatusLayer",false);
ShowLayer("ViewUser",true);
ViewUserInfo(Friend.CustomerID);
}


