﻿
Type.registerNamespace("PlainJoeStudios.MediaSocial.WebServer.JavaScript");PlainJoeStudios.MediaSocial.WebServer.JavaScript.WindowManager=function()
{this._TrackedWindows=new Object();};PlainJoeStudios.MediaSocial.WebServer.JavaScript.WindowManager.prototype={_TrackedWindows:null,_HasNotifiedUserOfPopupBlock:false,RegisterWindow:function(name,win,timestamp)
{this._TrackedWindows[name]={Window:win,Timestamp:timestamp};},CheckForPopupBlock:function(win)
{if(win==null&&!this._HasNotifiedUserOfPopupBlock)
{$PJP.ShowMessage("We noticed your browser just blocked a popup. <br /><br />"
+"To ensure the best Media Social experience, please enable popups for <span style=\"font-style:italic;\">MediaSocial.tv</span> in your browser preferences. <br /><br />"
+"Thank You!");this._HasNotifiedUserOfPopupBlock=true;return true;}
return false;},GetWindowTimestamp:function(name)
{var record=this._TrackedWindows[name];if(record==null)
{return null;}
return record["Timestamp"];},SetWindowTimestamp:function(name,timestamp)
{var record=this._TrackedWindows[name];if(record==null)
{return;}
record["Timestamp"]=timestamp;},GetWindow:function(name)
{if(this._TrackedWindows[name]==null)
{return null;}
var winStored=this._TrackedWindows[name]["Window"];if(winStored!=null)
{try
{if(winStored.closed)
{this._TrackedWindows[name]["Window"]=null;return null;}}
catch(exc){}
return winStored;}
return winStored;}};var WindowManager=new PlainJoeStudios.MediaSocial.WebServer.JavaScript.WindowManager();