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 clickConnect(member_id, ret) { document.location.href='/?return=' + ret; } function sendFriend(member_id, ret) { document.location.href='/?return=' + ret; } function flashRequest(MemberID, RecipientID) { NewWinder2('/members/flash_comm/Request.aspx?RecipientID=' + RecipientID, 'Request' + RecipientID, 310, 110, '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_Request(MemberID, SenderID){ window.open('/members/flash_comm/Chat_Notification.aspx?SenderID=' + SenderID, 'ChatRequest' + SenderID, 'height=120,width=350'); } function openIM(MemberID, RecipientID){ if(offsetWindow > 100 || offsetWindow < -100){ offsetWindow = 0; } var wHeight = 402; var wWidth = 551; 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/flash_comm/vChat.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/flash_comm/vChat.aspx?RecipientID=" + RecipientID + "', 'IMMessage" + RecipientID + "', 'width=" + wWidth + ", height=" + wHeight + ", left=" + winl + ", top=" + wint + "')"); } } } function openIM_Results(MemberID, RecipientID){ if(offsetWindow > 100 || offsetWindow < -100){ offsetWindow = 0; } var wHeight = 402; var wWidth = 551; 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/flash_comm/vChat.aspx?RecipientID=" + RecipientID + "&Request=False', '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/flash_comm/vChat.aspx?RecipientID=" + RecipientID + "&Request=False', 'IMMessage" + RecipientID + "', 'width=" + wWidth + ", height=" + wHeight + ", left=" + winl + ", top=" + wint + "')"); // NewWinder2('/members/flash_comm/Request.aspx?RecipientID=' + RecipientID, 'Request' + RecipientID, 310, 100, 'no'); } } } function openIM_Accept(MemberID, RecipientID){ if(offsetWindow > 100 || offsetWindow < -100){ offsetWindow = 0; } var wHeight = 402; var wWidth = 551; 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/flash_comm/vChat.aspx?Accept=True&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/flash_comm/vChat.aspx?Accept=True&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 showFrame() { document.all.events_div.style.display = 'inline'; } function closeFrame() { document.all.events_div.style.display = 'none'; document.all.events_div.innerHTML = ''; } function loadFrame(loc,wdt,hgt,scr,lft,tp){ var imgLoc = (wdt - 24); if(scr=='yes'){ imgLoc = (wdt - 41) } document.all.events_div.style.top = window.event.y + document.body.scrollTop - tp; document.all.events_div.style.left = window.event.x - lft; document.all.events_div.innerHTML = ""; } function showEvent(which) { showFrame(); loadFrame('events_view.aspx?event_id=' + which, '400', '300', 'yes', 300, 150); document.frames['events_iframe'].location.href=document.frames['events_iframe'].location.href; } function newEvent() { showFrame(); loadFrame('events_new.aspx', '500', '380', 'yes', 400, 10); document.frames['events_iframe'].location.href=document.frames['events_iframe'].location.href; } function newStory() { showFrame(); loadFrame('success_story_new.aspx', '480', '366', 'yes', 400, 10); document.frames['events_iframe'].location.href=document.frames['events_iframe'].location.href; } function viewTerms() { showFrame(); loadFrame('/singles_dating_agreement.aspx', '480', '366', 'yes', 50, 366); document.frames['events_iframe'].location.href=document.frames['events_iframe'].location.href; } function checkTerms() { if(document.getElementById("Account1__ctl0__ctl0_chk_agree").checked != true) { alert('You must agree to the User Agreement before you can create an account.'); return false; } }