document.domain = "xihalife.com"; // Set domain var CXIHAPopups = { popups : [ ], _Get : function( name ) { for ( var i = 0; i < this.popups.length; i++ ) { if ( typeof( this.popups[i] ) == "object" && this.popups[i].name == name ) { return this.popups[i]; } } return null; }, _Set : function( item ) { this.popups[ this.popups.length ] = item; }, Open : function( url, name, options ) { if ( typeof( url ) == "undefined" || url == '' ) { url = 'about:blank'; } if ( typeof( name ) == "undefined" || name == '' ) { name = 'unknown'; } if ( typeof( options ) == "undefined" || options == '' ) { options = 'menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes'; } var new_win = window.open( url, name, options ); this._Set( new_win ); if ( new_win == null ) { throw "Popup could not be opened! Most likely a popup blocker prevented action."; } return new_win; }, Get : function( name ) { return this._Get( name ); } };