var pofChatWin = null; var pofChatTop = 200; var pofChatLeft = 200; var pofChatWidth = 500; var pofChatHeight = 700; var pofChatUrl = 'http://dev.plentyoffish.com/dwg_chat/pofchat/App19.html'; function pofIsWindowOpen() { var r = 1; try { //pofChatWin= open('', 'pofChatWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+pofChatWidth+',height='+pofChatHeight+',left='+pofChatLeft+', top='+pofChatTop+',screenX='+pofChatLeft+',screenY='+pofChatTop+''); if( !pofChatWin || pofChatWin.closed || !pofChatWin.checkOpen ) { r = 0; } } catch(err) { r = 0; } return r; } function pofOpenChatWindow(params) { var fullurl = this.pofChatUrl + '?' + params; if(pofIsWindowOpen()) { pofChatWin.addChatRequest(params); pofChatWin.focus(); } else { pofChatWin= open(fullurl, 'pofChatWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+pofChatWidth+',height='+pofChatHeight+',left='+pofChatLeft+', top='+pofChatTop+',screenX='+pofChatLeft+',screenY='+pofChatTop+''); } } function pofClickRequestChat(id) { var params = pofUserParams + '&MemberUserID='+id+'&Action=SendRequest'; pofOpenChatWindow(params); } function pofResize(w,h) { if (w) { $("#pofFlashContent").css("width", w); } if (h) { $("#pofFlashContent").css("height", h); } }