var IMWindow = null; var offsetWindow = 0; var GroupsArray = []; function requestIM(sender_id) { NewWinder('/members/im/request_chat.aspx?member_id=' + sender_id, 'Request' + sender_id, 400, 100, 'no'); } function NewWinder(mypage, myname, w, h, scroll) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'; win = window.open(mypage, myname, winprops); if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function openIM(MemberID, RecipientID){ if(offsetWindow > 100 || offsetWindow < -100){ offsetWindow = 0; } var wHeight = 329; var wWidth = 530; var winl = (screen.width-wWidth+offsetWindow-(screen.width/2))/2; var wint = (screen.height-wHeight+offsetWindow-(screen.height/2))/2; if(eval("typeof IMWindow" + RecipientID + " != 'undefined'")){ if(eval("IMWindow" + RecipientID + ".closed == false")){ offsetWindow = offsetWindow + 50; } else { offsetWindow = offsetWindow - 50; eval("IMWindow" + RecipientID + " = window.open('/members/im/Flash/IMMessenger.aspx?RecipientID=" + RecipientID + "', 'IMMessage" + RecipientID + "', 'width=" + wWidth + ", height=" + wHeight + ", left=" + winl + ", top=" + wint + "')"); } } else { offsetWindow = offsetWindow + 50; eval("IMWindow" + RecipientID + " = window.open('/members/im/Flash/IMMessenger.aspx?&RecipientID=" + RecipientID + "', 'IMMessage" + RecipientID + "', 'width=" + wWidth + ", height=" + wHeight + ", left=" + winl + ", top=" + wint + "')"); } } function chatIM(recipient_login) { NewWinder('/members/im/request_chat.aspx?recipient_login=' + recipient_login, 'Request' + recipient_login, 400, 100, 'no'); } function updateUsers(){ document.IMPostIFrame.location.href = "IMGetBuddyList.aspx"; } function soundToggle(soundStatus){ if(soundStatus == 0){ document.getElementById("SoundOff").style.display = "inline"; document.getElementById("SoundOn").style.display = "none"; } else { document.getElementById("SoundOff").style.display = "none"; document.getElementById("SoundOn").style.display = "inline"; } document.IMPostIFrame.location.href = "IMSetSoundStatus.aspx?Status=" + soundStatus; }