var IMWindow = null; var offsetWindow = 0; var GroupsArray = []; function chatIM(recipient_login) { NewWinder2('/members/im/request_chat.aspx?recipient_login=' + recipient_login, 'Request' + recipient_login, 400, 100, 'no'); } function NewWinder2(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 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")){ 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('', 'IMMessage" + RecipientID + "', 'width=" + wWidth + ", height=" + wHeight + ", left=" + winl + ", top=" + wint + "')"); if(eval("IMWindow" + RecipientID + ".document.images.length == 0")){ 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; } // utility function called by getCookie() function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) { endstr = document.cookie.length; } return unescape(document.cookie.substring(offset, endstr)); } // primary function to retrieve cookie by name function getCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) { return getCookieVal(j); } i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } // store cookie value with optional details as needed function setCookie(name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } // remove the cookie by setting ancient expiration date function deleteCookie(name,path,domain) { if (getCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : ""); } } function rotateWarning() { if (document.getElementById('img_warning').src == "http://www.hivnet.com:80/templates/blue_yellow_orange/images/shield_red_16.gif") { document.getElementById('img_warning').src = "http://www.hivnet.com:80/templates/blue_yellow_orange/images/shield_blank_16.gif"; } else { document.getElementById('img_warning').src = "http://www.hivnet.com:80/templates/blue_yellow_orange/images/shield_red_16.gif"; } setTimeout("rotateWarning()", 1000); }