// POFChat function addChatRequest(params) { var ChatApp = document.getElementById("ChatApp"); ChatApp.addChatRequest(params); } function hasConversations() { var ChatApp = document.getElementById("ChatApp"); return ChatApp.hasConversations(); } function getQueryString() { return window.location.search.substring(1); } function closeWindow() { window.close(); } function changeParent(url) { top.parent.opener.location.href = url; top.parent.opener.focus(); } childTimer = window.setInterval( function() { try { window.opener.pofChatWin = window; } catch(e){} }, 300); window.onUnload = function() { try { window.clearInterval(childTimer); window.opener.pofChatWin = null; } catch(e) {} } window.onbeforeunload = function() { if (hasConversations() == "Yes") { return ""; } }