example.html .:. source.js .:. api.js

                                                                               
/*****************************************************************************
                                                                               
 *                                                                           *
                                                                               
 * Spam-Juggler JavaScript API                                               *
                                                                               
 *                                                                           *
                                                                               
 * ------------------------------------------------------------------------- *
                                                                               
 *                                                                           *
                                                                               
 * Version ........... : 1.2.48                                              *
                                                                               
 * Date .............. : 2019-05-21                                          *
                                                                               
 * License ........... : GNU General Public License                          *
10 
                                                                               
 * License Version ... : Version 3, 29 June 2007                             *
11 
                                                                               
 * License URL ....... : http://www.gnu.org/licenses/gpl-3.0.en.html         *
12 
                                                                               
 * Author ............ : CI:A - Certus In Audio                              *
13 
                                                                               
 * Website ........... : http://certus.in/                                   *
14 
                                                                               
 *                                                                           *
15 
                                                                               
 * ------------------------------------------------------------------------- *
16 
                                                                               
 *                                                                           *
17 
                                                                               
 * Usage                                                                     *
18 
                                                                               
 *                                                                           *
19 
                                                                               
 *    1) Adding API to your web pages                                        *
20 
                                                                               
 *       The API is a single JavaScript file, and you reference it with      *
21 
                                                                               
 *       the HTML 'script'-tag (note: the 'script'-tag should be inside      *
22 
                                                                               
 *       the 'head'-section of your pages).                                  *
23 
                                                                               
 *       Example:                                                            *
24 
                                                                               
 *       <!DOCTYPE html>                                                     *
25 
                                                                               
 *       <html xmlns="http://www.w3.org/1999/xhtml" lang="en">               *
26 
                                                                               
 *           <head>                                                          *
27 
                                                                               
 *               <meta charset="utf-8"/>                                     *
28 
                                                                               
 *               <title>Spam-Juggler JavaScript API</title>                  *
29 
                                                                               
 *               <script type="text/javascript"                              *
30 
                                                                               
 *                       src="//hsrv.certus.in/.wW/spam-juggler/api?/api.js"> *
31 
                                                                               
 *               </script>                                                   *
32 
                                                                               
 *           </head>                                                         *
33 
                                                                               
 *           <body>                                                          *
34 
                                                                               
 *               ...                                                         *
35 
                                                                               
 *           </body>                                                         *
36 
                                                                               
 *       </html>                                                             *
37 
                                                                               
 *                                                                           *
38 
                                                                               
 *    2) Initializing API object                                             *
39 
                                                                               
 *       An instance of this API class is already initialized, while         *
40 
                                                                               
 *       loading the JavaScript file. You can use the instance object        *
41 
                                                                               
 *       called 'SpamJuggler':                                               *
42 
                                                                               
 *                                                                           *
43 
                                                                               
 *       <script type="text/javascript">                                     *
44 
                                                                               
 *       <!--//                                                              *
45 
                                                                               
 *       alert( SpamJuggler.getAPITitle() + ' v' +                           *
46 
                                                                               
 *              SpamJuggler.getAPIVersion() );                               *
47 
                                                                               
 *       //-->                                                               *
48 
                                                                               
 *       </script>                                                           *
49 
                                                                               
 *                                                                           *
50 
                                                                               
 *       Anyway, you can initialize your own instance object of this         *
51 
                                                                               
 *       API class, like:                                                    *
52 
                                                                               
 *                                                                           *
53 
                                                                               
 *       <script type="text/javascript">                                     *
54 
                                                                               
 *       <!--//                                                              *
55 
                                                                               
 *       var objMyVeryOwnObject = new SpamJugglerAPI();                      *
56 
                                                                               
 *       alert( objMyVeryOwnObject.getAPITitle() + ' v' +                    *
57 
                                                                               
 *              objMyVeryOwnObject.getAPIVersion() );                        *
58 
                                                                               
 *       //-->                                                               *
59 
                                                                               
 *       </script>                                                           *
60 
                                                                               
 *                                                                           *
61 
                                                                               
 *    3) Using methods of API object                                         *
62 
                                                                               
 *       See examples below...                                               *
63 
                                                                               
 *                                                                           *
64 
                                                                               
 *       (*) Show title of API, via method getAPITitle:                      *
65 
                                                                               
 *                                                                           *
66 
                                                                               
 *       <script type="text/javascript">                                     *
67 
                                                                               
 *       <!--//                                                              *
68 
                                                                               
 *       alert( 'You are using API:\n' + SpamJuggler.getAPITitle() );        *
69 
                                                                               
 *       //-->                                                               *
70 
                                                                               
 *       </script>                                                           *
71 
                                                                               
 *                                                                           *
72 
                                                                               
 *       (*) Show current version of API, via method getAPIVersion:          *
73 
                                                                               
 *                                                                           *
74 
                                                                               
 *       <script type="text/javascript">                                     *
75 
                                                                               
 *       <!--//                                                              *
76 
                                                                               
 *       alert( 'Current API version:\n' + SpamJuggler.getAPIVersion() );    *
77 
                                                                               
 *       //-->                                                               *
78 
                                                                               
 *       </script>                                                           *
79 
                                                                               
 *                                                                           *
80 
                                                                               
 *       (*) Check for errors and display error message, via methods         *
81 
                                                                               
 *           isOK , isError and getError:                                    *
82 
                                                                               
 *                                                                           *
83 
                                                                               
 *       <script type="text/javascript">                                     *
84 
                                                                               
 *       <!--//                                                              *
85 
                                                                               
 *       SpamJuggler.loadAlias( 'i_really_forgot_my_alias_name_try_1' ,      *
86 
                                                                               
 *                              'i_really_forgot_my_password_try_1' );       *
87 
                                                                               
 *       if( ! SpamJuggler.isOK() )                                          *
88 
                                                                               
 *       {                                                                   *
89 
                                                                               
 *           alert( SpamJuggler.getError() );                                *
90 
                                                                               
 *       }                                                                   *
91 
                                                                               
 *       SpamJuggler.loadAlias( 'i_really_forgot_my_alias_name_try_2' ,      *
92 
                                                                               
 *                              'i_really_forgot_my_password_try_2' );       *
93 
                                                                               
 *       if( SpamJuggler.isError() )                                         *
94 
                                                                               
 *       {                                                                   *
95 
                                                                               
 *           alert( SpamJuggler.getError() );                                *
96 
                                                                               
 *       }                                                                   *
97 
                                                                               
 *       //-->                                                               *
98 
                                                                               
 *       </script>                                                           *
99 
                                                                               
 *                                                                           *
100 
                                                                               
 *       (*) Show current system informations, via method getSystemInfo:     *
101 
                                                                               
 *                                                                           *
102 
                                                                               
 *       <script type="text/javascript">                                     *
103 
                                                                               
 *       <!--//                                                              *
104 
                                                                               
 *       var arrSystemInfo = SpamJuggler.getSystemInfo();                    *
105 
                                                                               
 *       var strMessage = '';                                                *
106 
                                                                               
 *       for( var strKey in arrSystemInfo )                                  *
107 
                                                                               
 *       {                                                                   *
108 
                                                                               
 *           strMessage += strKey + ': ' + arrSystemInfo[ strKey ] + '\n';   *
109 
                                                                               
 *       }                                                                   *
110 
                                                                               
 *       alert( strMessage );                                                *
111 
                                                                               
 *       //-->                                                               *
112 
                                                                               
 *       </script>                                                           *
113 
                                                                               
 *                                                                           *
114 
                                                                               
 *       (*) Show current site informations, via method getSiteInfo:         *
115 
                                                                               
 *                                                                           *
116 
                                                                               
 *       <script type="text/javascript">                                     *
117 
                                                                               
 *       <!--//                                                              *
118 
                                                                               
 *       var arrSiteInfo = SpamJuggler.getSiteInfo();                        *
119 
                                                                               
 *       var strMessage = '';                                                *
120 
                                                                               
 *       for( var strKey in arrSiteInfo )                                    *
121 
                                                                               
 *       {                                                                   *
122 
                                                                               
 *           strMessage += strKey + ': ' + arrSiteInfo[ strKey ] + '\n';     *
123 
                                                                               
 *       }                                                                   *
124 
                                                                               
 *       alert( strMessage );                                                *
125 
                                                                               
 *       //-->                                                               *
126 
                                                                               
 *       </script>                                                           *
127 
                                                                               
 *                                                                           *
128 
                                                                               
 *       (*) Show current statistics, via method getStatistics:              *
129 
                                                                               
 *                                                                           *
130 
                                                                               
 *       <script type="text/javascript">                                     *
131 
                                                                               
 *       <!--//                                                              *
132 
                                                                               
 *       var arrStatistics = SpamJuggler.getStatistics();                    *
133 
                                                                               
 *       var strMessage = '';                                                *
134 
                                                                               
 *       for( var strKey in arrStatistics )                                  *
135 
                                                                               
 *       {                                                                   *
136 
                                                                               
 *           strMessage += strKey + ': ' + arrStatistics[ strKey ] + '\n';   *
137 
                                                                               
 *       }                                                                   *
138 
                                                                               
 *       alert( strMessage );                                                *
139 
                                                                               
 *       //-->                                                               *
140 
                                                                               
 *       </script>                                                           *
141 
                                                                               
 *                                                                           *
142 
                                                                               
 *       (*) Show results of last API server query, via                      *
143 
                                                                               
 *           method getQueryResults:                                         *
144 
                                                                               
 *                                                                           *
145 
                                                                               
 *       <script type="text/javascript">                                     *
146 
                                                                               
 *       <!--//                                                              *
147 
                                                                               
 *       var arrQueryResults = SpamJuggler.getQueryResults();                *
148 
                                                                               
 *       alert( 'Result of last API server query:\n' + (                     *
149 
                                                                               
 *              ( arrQueryResults[ 'error' ] > 0 )                           *
150 
                                                                               
 *              ? arrQueryResults[ 'message' ]                               *
151 
                                                                               
 *              : 'No errors.' ) );                                          *
152 
                                                                               
 *       //-->                                                               *
153 
                                                                               
 *       </script>                                                           *
154 
                                                                               
 *                                                                           *
155 
                                                                               
 *       (*) Load and display user (alias) data, via methods                 *
156 
                                                                               
 *           loadAlias and getUserData:                                      *
157 
                                                                               
 *                                                                           *
158 
                                                                               
 *       <script type="text/javascript">                                     *
159 
                                                                               
 *       <!--//                                                              *
160 
                                                                               
 *       var strAliasName = prompt( 'Please type in your alias name' , '' ); *
161 
                                                                               
 *       var strPassWord = prompt( 'Please type in your password' , '' );    *
162 
                                                                               
 *       if( ! SpamJuggler.loadAlias( strAliasName , strPassWord ) )         *
163 
                                                                               
 *       {                                                                   *
164 
                                                                               
 *           alert( SpamJuggler.getError() );                                *
165 
                                                                               
 *       }                                                                   *
166 
                                                                               
 *       else                                                                *
167 
                                                                               
 *       {                                                                   *
168 
                                                                               
 *           var arrUserData = SpamJuggler.getUserData();                    *
169 
                                                                               
 *           var strOut = '';                                                *
170 
                                                                               
 *           for( var strKey in arrUserData )                                *
171 
                                                                               
 *           {                                                               *
172 
                                                                               
 *                strOut += strKey + ': ' + arrUserData[ strKey ] + '\n';    *
173 
                                                                               
 *           }                                                               *
174 
                                                                               
 *           alert( strOut );                                                *
175 
                                                                               
 *       }                                                                   *
176 
                                                                               
 *       //-->                                                               *
177 
                                                                               
 *       </script>                                                           *
178 
                                                                               
 *                                                                           *
179 
                                                                               
 *       (*) Adding aliases, via method addAlias:                            *
180 
                                                                               
 *                                                                           *
181 
                                                                               
 *       <script type="text/javascript">                                     *
182 
                                                                               
 *       <!--//                                                              *
183 
                                                                               
 *       var strAliasName =                                                  *
184 
                                                                               
 *           prompt( 'Please type in an alias name' , '' );                  *
185 
                                                                               
 *       var strPassWord =                                                   *
186 
                                                                               
 *           prompt( 'Please type in a password' , '' );                     *
187 
                                                                               
 *       var strForwardAddress =                                             *
188 
                                                                               
 *           prompt( 'Please type in your email address' , '' );             *
189 
                                                                               
 *       var intForwardCount =                                               *
190 
                                                                               
 *           parseInt( prompt( 'How many mails to be forwarded?' , '' ) );   *
191 
                                                                               
 *       var bNotify =                                                       *
192 
                                                                               
 *           ( confirm( 'Would you like to receive notifications?' ) )       *
193 
                                                                               
 *           ? true                                                          *
194 
                                                                               
 *           : false;                                                        *
195 
                                                                               
 *       if( ! SpamJuggler.addAlias( strAliasName ,                          *
196 
                                                                               
 *                                   strPassWord ,                           *
197 
                                                                               
 *                                   strForwardAddress ,                     *
198 
                                                                               
 *                                   intForwardCount ,                       *
199 
                                                                               
 *                                   bNotify ) )                             *
200 
                                                                               
 *       {                                                                   *
201 
                                                                               
 *           alert( SpamJuggler.getError() );                                *
202 
                                                                               
 *       }                                                                   *
203 
                                                                               
 *       else                                                                *
204 
                                                                               
 *       {                                                                   *
205 
                                                                               
 *           alert( 'Your alias email address has been created.' );          *
206 
                                                                               
 *       }                                                                   *
207 
                                                                               
 *       //-->                                                               *
208 
                                                                               
 *       </script>                                                           *
209 
                                                                               
 *                                                                           *
210 
                                                                               
 *       (*) Editing aliases, via method editAlias:                          *
211 
                                                                               
 *                                                                           *
212 
                                                                               
 *       <script type="text/javascript">                                     *
213 
                                                                               
 *       <!--//                                                              *
214 
                                                                               
 *       var strAliasName =                                                  *
215 
                                                                               
 *           prompt( 'Please type in your alias name' , '' );                *
216 
                                                                               
 *       var strPassWord =                                                   *
217 
                                                                               
 *           prompt( 'Please type in your password' , '' );                  *
218 
                                                                               
 *       var strForwardAddress =                                             *
219 
                                                                               
 *           prompt( 'Please type in an email address' , '' );               *
220 
                                                                               
 *       var intForwardCount =                                               *
221 
                                                                               
 *           parseInt( prompt( 'How many mails to be forwarded?' , '' ) );   *
222 
                                                                               
 *       var bNotify =                                                       *
223 
                                                                               
 *           ( confirm( 'Would you like to receive notifications?' ) )       *
224 
                                                                               
 *           ? true                                                          *
225 
                                                                               
 *           : false;                                                        *
226 
                                                                               
 *       if( ! SpamJuggler.editAlias( strAliasName ,                         *
227 
                                                                               
 *                                    strPassWord ,                          *
228 
                                                                               
 *                                    strForwardAddress ,                    *
229 
                                                                               
 *                                    intForwardCount ,                      *
230 
                                                                               
 *                                    bNotify ) )                            *
231 
                                                                               
 *       {                                                                   *
232 
                                                                               
 *           alert( SpamJuggler.getError() );                                *
233 
                                                                               
 *       }                                                                   *
234 
                                                                               
 *       else                                                                *
235 
                                                                               
 *       {                                                                   *
236 
                                                                               
 *           alert( 'Your alias email address has been modified.' );         *
237 
                                                                               
 *       }                                                                   *
238 
                                                                               
 *       //-->                                                               *
239 
                                                                               
 *       </script>                                                           *
240 
                                                                               
 *                                                                           *
241 
                                                                               
 *       (*) Deleting aliases, via method deleteAlias:                       *
242 
                                                                               
 *                                                                           *
243 
                                                                               
 *       <script type="text/javascript">                                     *
244 
                                                                               
 *       <!--//                                                              *
245 
                                                                               
 *       var strAliasName =                                                  *
246 
                                                                               
 *           prompt( 'Please type in your alias name' , '' );                *
247 
                                                                               
 *       var strPassWord =                                                   *
248 
                                                                               
 *           prompt( 'Please type in your password' , '' );                  *
249 
                                                                               
 *       if( ! SpamJuggler.deleteAlias( strAliasName ,                       *
250 
                                                                               
 *                                      strPassWord ) )                      *
251 
                                                                               
 *       {                                                                   *
252 
                                                                               
 *           alert( SpamJuggler.getError() );                                *
253 
                                                                               
 *       }                                                                   *
254 
                                                                               
 *       else                                                                *
255 
                                                                               
 *       {                                                                   *
256 
                                                                               
 *           alert( 'Your alias email address has been deleted.' );          *
257 
                                                                               
 *       }                                                                   *
258 
                                                                               
 *       //-->                                                               *
259 
                                                                               
 *       </script>                                                           *
260 
                                                                               
 *                                                                           *
261 
                                                                               
 * ------------------------------------------------------------------------- *
262 
                                                                               
 *                                                                           *
263 
                                                                               
 * Attributes/Fields                                                         *
264 
                                                                               
 *                                                                           *
265 
                                                                               
 *    private Array   _arrQueryResult                                        *
266 
                                                                               
 *                                                                           *
267 
                                                                               
 * Methods                                                                   *
268 
                                                                               
 *                                                                           *
269 
                                                                               
 *    public  void    SpamJugglerAPI( void )                                 *
270 
                                                                               
 *    public  String  getAPITitle( void )                                    *
271 
                                                                               
 *    public  String  getAPIVersion( void )                                  *
272 
                                                                               
 *    public  String  getError( void )                                       *
273 
                                                                               
 *    public  Boolean isError( void )                                        *
274 
                                                                               
 *    public  Boolean isOK( void )                                           *
275 
                                                                               
 *    public  Array   getSystemInfo( void )                                  *
276 
                                                                               
 *    public  Array   getSiteInfo( void )                                    *
277 
                                                                               
 *    public  Array   getStatistics( void )                                  *
278 
                                                                               
 *    public  Array   getQueryResults( void )                                *
279 
                                                                               
 *    public  Array   getUserData( void )                                    *
280 
                                                                               
 *    public  Boolean loadAlias( String ,                                    *
281 
                                                                               
 *                               String )                                    *
282 
                                                                               
 *    public  Boolean addAlias( String ,                                     *
283 
                                                                               
 *                              String ,                                     *
284 
                                                                               
 *                              String ,                                     *
285 
                                                                               
 *                              Integer ,                                    *
286 
                                                                               
 *                              Boolean )                                    *
287 
                                                                               
 *    public  Boolean editAlias( String ,                                    *
288 
                                                                               
 *                               String ,                                    *
289 
                                                                               
 *                               String ,                                    *
290 
                                                                               
 *                               Integer ,                                   *
291 
                                                                               
 *                               Boolean )                                   *
292 
                                                                               
 *    public  Boolean deleteAlias( String ,                                  *
293 
                                                                               
 *                                 String )                                  *
294 
                                                                               
 *    private Array   _getQuerySection( String )                             *
295 
                                                                               
 *    private Array   _queryAPIServer( Integer ,                             *
296 
                                                                               
 *                                     String ,                              *
297 
                                                                               
 *                                     String ,                              *
298 
                                                                               
 *                                     String ,                              *
299 
                                                                               
 *                                     Integer ,                             *
300 
                                                                               
 *                                     Boolean )                             *
301 
                                                                               
 *                                                                           *
302 
                                                                               
 *****************************************************************************/
303 
                                                                               

304 
                                                                               
/**
305 
                                                                               
 * Constructor of this API class.
306 
                                                                               
 *
307 
                                                                               
 * @author CI:A - Certus In Audio
308 
                                                                               
 * @method SpamJugglerAPI
309 
                                                                               
 * @param {void}
310 
                                                                               
 * @public
311 
                                                                               
 * @return {void}
312 
                                                                               
 * @since 1.0.0
313 
                                                                               
 * @uses _arrQueryResult
314 
                                                                               
 * @uses _queryAPIServer
315 
                                                                               
 */
316 
                                                                               
function SpamJugglerAPI()
317 
                                                                               
{
318 
                                                                               
    /**
319 
                                                                               
     * Holds results of last API server query.
320 
                                                                               
     *
321 
                                                                               
     * @author CI:A - Certus In Audio
322 
                                                                               
     * @private
323 
                                                                               
     * @property _arrQueryResult
324 
                                                                               
     * @since 1.0.0
325 
                                                                               
     * @type {Array}
326 
                                                                               
     */
327 
                                                                               
    this._arrQueryResult this._queryAPIServer();
328 
                                                                               
}
329 
                                                                               

330 
                                                                               
/**
331 
                                                                               
 * Returns the title of this API class.
332 
                                                                               
 *
333 
                                                                               
 * @author CI:A - Certus In Audio
334 
                                                                               
 * @method getAPITitle
335 
                                                                               
 * @param {void}
336 
                                                                               
 * @public
337 
                                                                               
 * @return {String} The title of this API class
338 
                                                                               
 * @since 1.0.0
339 
                                                                               
 * @uses _arrQueryResult
340 
                                                                               
 */
341 
                                                                               
SpamJugglerAPI.prototype.getAPITitle = function()
342 
                                                                               
{
343 
                                                                               
    return this._arrQueryResult'api_title' ];
344 
                                                                               
};
345 
                                                                               

346 
                                                                               
/**
347 
                                                                               
 * Returns the full version of this API class
348 
                                                                               
 * (including major-, minor- and revision numbers; separated by dots).
349 
                                                                               
 *
350 
                                                                               
 * @author CI:A - Certus In Audio
351 
                                                                               
 * @method getAPIVersion
352 
                                                                               
 * @param {void}
353 
                                                                               
 * @public
354 
                                                                               
 * @return {String} The full version of this API class
355 
                                                                               
 * @since 1.0.0
356 
                                                                               
 * @uses _arrQueryResult
357 
                                                                               
 */
358 
                                                                               
SpamJugglerAPI.prototype.getAPIVersion = function()
359 
                                                                               
{
360 
                                                                               
    return this._arrQueryResult'api_version' ];
361 
                                                                               
};
362 
                                                                               

363 
                                                                               
/**
364 
                                                                               
 * Returns current error message (from last API server query).
365 
                                                                               
 *
366 
                                                                               
 * @author CI:A - Certus In Audio
367 
                                                                               
 * @method getError
368 
                                                                               
 * @param {void}
369 
                                                                               
 * @public
370 
                                                                               
 * @return {String} Current error message (from last API server query)
371 
                                                                               
 * @since 1.0.0
372 
                                                                               
 * @uses _arrQueryResult
373 
                                                                               
 */
374 
                                                                               
SpamJugglerAPI.prototype.getError = function()
375 
                                                                               
{
376 
                                                                               
    return this._arrQueryResult'result_message' ];
377 
                                                                               
};
378 
                                                                               

379 
                                                                               
/**
380 
                                                                               
 * Returns true on errors (while last API server query).
381 
                                                                               
 *
382 
                                                                               
 * @author CI:A - Certus In Audio
383 
                                                                               
 * @method isError
384 
                                                                               
 * @param {void}
385 
                                                                               
 * @public
386 
                                                                               
 * @return {Boolean} True on errors (while last API server query)
387 
                                                                               
 * @since 1.0.0
388 
                                                                               
 * @uses _arrQueryResult
389 
                                                                               
 */
390 
                                                                               
SpamJugglerAPI.prototype.isError = function()
391 
                                                                               
{
392 
                                                                               
    var intEL this._arrQueryResult'result_message' ].length;
393 
                                                                               
    var bE = ( intEL ) ? true false;
394 
                                                                               
    return bE;
395 
                                                                               
};
396 
                                                                               

397 
                                                                               
/**
398 
                                                                               
 * Returns false on errors (while last API server query).
399 
                                                                               
 *
400 
                                                                               
 * @author CI:A - Certus In Audio
401 
                                                                               
 * @method isOK
402 
                                                                               
 * @param {void}
403 
                                                                               
 * @public
404 
                                                                               
 * @return {Boolean} False on errors (while last API server query)
405 
                                                                               
 * @since 1.0.0
406 
                                                                               
 * @uses isError
407 
                                                                               
 */
408 
                                                                               
SpamJugglerAPI.prototype.isOK = function()
409 
                                                                               
{
410 
                                                                               
    var bE = ( this.isError() ) ? false true;
411 
                                                                               
    return bE;
412 
                                                                               
};
413 
                                                                               

414 
                                                                               
/**
415 
                                                                               
 * Returns system informations from API server.
416 
                                                                               
 *
417 
                                                                               
 * @author CI:A - Certus In Audio
418 
                                                                               
 * @method getSystemInfo
419 
                                                                               
 * @param {void}
420 
                                                                               
 * @public
421 
                                                                               
 * @return {Array} Current system informations from API server
422 
                                                                               
 * @since 1.0.0
423 
                                                                               
 * @uses _getQuerySection
424 
                                                                               
 */
425 
                                                                               
SpamJugglerAPI.prototype.getSystemInfo = function()
426 
                                                                               
{
427 
                                                                               
    return this._getQuerySection'system' );
428 
                                                                               
};
429 
                                                                               

430 
                                                                               
/**
431 
                                                                               
 * Returns site informations from API server.
432 
                                                                               
 *
433 
                                                                               
 * @author CI:A - Certus In Audio
434 
                                                                               
 * @method getSiteInfo
435 
                                                                               
 * @param {void}
436 
                                                                               
 * @public
437 
                                                                               
 * @return {Array} Current site informations from API server
438 
                                                                               
 * @since 1.0.0
439 
                                                                               
 * @uses _getQuerySection
440 
                                                                               
 */
441 
                                                                               
SpamJugglerAPI.prototype.getSiteInfo = function()
442 
                                                                               
{
443 
                                                                               
    return this._getQuerySection'site' );
444 
                                                                               
};
445 
                                                                               

446 
                                                                               
/**
447 
                                                                               
 * Returns statistics from API server.
448 
                                                                               
 *
449 
                                                                               
 * @author CI:A - Certus In Audio
450 
                                                                               
 * @method getStatistics
451 
                                                                               
 * @param {void}
452 
                                                                               
 * @public
453 
                                                                               
 * @return {Array} Current statistics from API server
454 
                                                                               
 * @since 1.0.0
455 
                                                                               
 * @uses _getQuerySection
456 
                                                                               
 */
457 
                                                                               
SpamJugglerAPI.prototype.getStatistics = function()
458 
                                                                               
{
459 
                                                                               
    return this._getQuerySection'mails' );
460 
                                                                               
};
461 
                                                                               

462 
                                                                               
/**
463 
                                                                               
 * Returns current query results (from last API server query).
464 
                                                                               
 *
465 
                                                                               
 * @author CI:A - Certus In Audio
466 
                                                                               
 * @method getQueryResults
467 
                                                                               
 * @param {void}
468 
                                                                               
 * @public
469 
                                                                               
 * @return {Array} Current query results (from last API server query)
470 
                                                                               
 * @since 1.0.0
471 
                                                                               
 * @uses _getQuerySection
472 
                                                                               
 */
473 
                                                                               
SpamJugglerAPI.prototype.getQueryResults = function()
474 
                                                                               
{
475 
                                                                               
    return this._getQuerySection'result' );
476 
                                                                               
};
477 
                                                                               

478 
                                                                               
/**
479 
                                                                               
 * Returns current user data (from last API server query).
480 
                                                                               
 *
481 
                                                                               
 * @author CI:A - Certus In Audio
482 
                                                                               
 * @method getUserData
483 
                                                                               
 * @param {void}
484 
                                                                               
 * @public
485 
                                                                               
 * @return {Array} Current user data (from last API server query)
486 
                                                                               
 * @since 1.0.0
487 
                                                                               
 * @uses _getQuerySection
488 
                                                                               
 */
489 
                                                                               
SpamJugglerAPI.prototype.getUserData = function()
490 
                                                                               
{
491 
                                                                               
    return this._getQuerySection'alias' );
492 
                                                                               
};
493 
                                                                               

494 
                                                                               
/**
495 
                                                                               
 * Loads a data set of an alias from system.
496 
                                                                               
 *
497 
                                                                               
 * @author CI:A - Certus In Audio
498 
                                                                               
 * @method loadAlias
499 
                                                                               
 * @param {String} strAliasName An alias name
500 
                                                                               
 * @param {String} strPassWord A password
501 
                                                                               
 * @public
502 
                                                                               
 * @return {Boolean} True on success
503 
                                                                               
 * @since 1.0.0
504 
                                                                               
 * @uses _arrQueryResult
505 
                                                                               
 * @uses _queryAPIServer
506 
                                                                               
 * @uses isOK
507 
                                                                               
 */
508 
                                                                               
SpamJugglerAPI.prototype.loadAlias = function( strAliasName ,
509 
                                                                               
                                               strPassWord )
510 
                                                                               
{
511 
                                                                               
    this._arrQueryResult this._queryAPIServer,
512 
                                                                               
                                                 strAliasName ,
513 
                                                                               
                                                 strPassWord );
514 
                                                                               
    return this.isOK();
515 
                                                                               
};
516 
                                                                               

517 
                                                                               
/**
518 
                                                                               
 * Adds an alias to system.
519 
                                                                               
 *
520 
                                                                               
 * @author CI:A - Certus In Audio
521 
                                                                               
 * @method addAlias
522 
                                                                               
 * @param {String} strAliasName An alias name
523 
                                                                               
 * @param {String} strPassWord A password
524 
                                                                               
 * @param {String} strForwardAddress A forward address
525 
                                                                               
 * @param {Integer} intForwardCount Number of mails to receive [ 1 - 100 ]
526 
                                                                               
 * @param {Boolean} bNotify If true system notifications will be sent
527 
                                                                               
 * @public
528 
                                                                               
 * @return {Boolean} True on success
529 
                                                                               
 * @since 1.0.0
530 
                                                                               
 * @uses _arrQueryResult
531 
                                                                               
 * @uses _queryAPIServer
532 
                                                                               
 * @uses isOK
533 
                                                                               
 */
534 
                                                                               
SpamJugglerAPI.prototype.addAlias = function( strAliasName ,
535 
                                                                               
                                              strPassWord ,
536 
                                                                               
                                              strForwardAddress ,
537 
                                                                               
                                              intForwardCount ,
538 
                                                                               
                                              bNotify )
539 
                                                                               
{
540 
                                                                               
    this._arrQueryResult this._queryAPIServer,
541 
                                                                               
                                                 strAliasName ,
542 
                                                                               
                                                 strPassWord ,
543 
                                                                               
                                                 strForwardAddress ,
544 
                                                                               
                                                 intForwardCount ,
545 
                                                                               
                                                 bNotify  );
546 
                                                                               
    return this.isOK();
547 
                                                                               
};
548 
                                                                               

549 
                                                                               
/**
550 
                                                                               
 * Modifies data of an alias in system.
551 
                                                                               
 *
552 
                                                                               
 * @author CI:A - Certus In Audio
553 
                                                                               
 * @method editAlias
554 
                                                                               
 * @param {String} strAliasName An alias name
555 
                                                                               
 * @param {String} strPassWord A password
556 
                                                                               
 * @param {String} strForwardAddress A forward address
557 
                                                                               
 * @param {Integer} intForwardCount Number of mails to receive [ 1 - 100 ]
558 
                                                                               
 * @param {Boolean} bNotify If true system notifications will be sent
559 
                                                                               
 * @public
560 
                                                                               
 * @return {Boolean} True on success
561 
                                                                               
 * @since 1.0.0
562 
                                                                               
 * @uses _arrQueryResult
563 
                                                                               
 * @uses _queryAPIServer
564 
                                                                               
 * @uses isOK
565 
                                                                               
 */
566 
                                                                               
SpamJugglerAPI.prototype.editAlias = function( strAliasName ,
567 
                                                                               
                                               strPassWord ,
568 
                                                                               
                                               strForwardAddress ,
569 
                                                                               
                                               intForwardCount ,
570 
                                                                               
                                               bNotify )
571 
                                                                               
{
572 
                                                                               
    this._arrQueryResult this._queryAPIServer,
573 
                                                                               
                                                 strAliasName ,
574 
                                                                               
                                                 strPassWord ,
575 
                                                                               
                                                 strForwardAddress ,
576 
                                                                               
                                                 intForwardCount ,
577 
                                                                               
                                                 bNotify  );
578 
                                                                               
    return this.isOK();
579 
                                                                               
};
580 
                                                                               

581 
                                                                               
/**
582 
                                                                               
 * Removes an alias from system.
583 
                                                                               
 *
584 
                                                                               
 * @author CI:A - Certus In Audio
585 
                                                                               
 * @method deleteAlias
586 
                                                                               
 * @param {String} strAliasName An alias name
587 
                                                                               
 * @param {String} strPassWord A password
588 
                                                                               
 * @public
589 
                                                                               
 * @return {Boolean} True on success
590 
                                                                               
 * @since 1.0.0
591 
                                                                               
 * @uses _arrQueryResult
592 
                                                                               
 * @uses _queryAPIServer
593 
                                                                               
 * @uses isOK
594 
                                                                               
 */
595 
                                                                               
SpamJugglerAPI.prototype.deleteAlias = function( strAliasName ,
596 
                                                                               
                                                 strPassWord )
597 
                                                                               
{
598 
                                                                               
    this._arrQueryResult this._queryAPIServer,
599 
                                                                               
                                                 strAliasName ,
600 
                                                                               
                                                 strPassWord );
601 
                                                                               
    return this.isOK();
602 
                                                                               
};
603 
                                                                               

604 
                                                                               
/**
605 
                                                                               
 * Returns a section of the QueryResult-object as array.
606 
                                                                               
 *
607 
                                                                               
 * @author CI:A - Certus In Audio
608 
                                                                               
 * @method _getQuerySection
609 
                                                                               
 * @param {String} strSectionID An ID of a section to return
610 
                                                                               
 * @private
611 
                                                                               
 * @return {Array} An array, containing the section/result
612 
                                                                               
 * @since 1.0.0
613 
                                                                               
 * @uses _arrQueryResult
614 
                                                                               
 */
615 
                                                                               
SpamJugglerAPI.prototype._getQuerySection = function( strSectionID )
616 
                                                                               
{
617 
                                                                               
    var arrRV {};
618 
                                                                               
    for( var strRK in this._arrQueryResult )
619 
                                                                               
    {
620 
                                                                               
        if( strRK.substringstrSectionID.length ) ===
621 
                                                                               
            strSectionID '_' )
622 
                                                                               
        {
623 
                                                                               
            arrRVstrRK.replacestrSectionID '_' '' ) ] =
624 
                                                                               
                this._arrQueryResultstrRK ];
625 
                                                                               
        }
626 
                                                                               
    }
627 
                                                                               
    return arrRV;
628 
                                                                               
};
629 
                                                                               

630 
                                                                               
/**
631 
                                                                               
 * Performs a query to the API server and returns the result as array.
632 
                                                                               
 *
633 
                                                                               
 * @author CI:A - Certus In Audio
634 
                                                                               
 * @method _queryAPIServer
635 
                                                                               
 * @param {Integer} intAction A code of action to perform ( 0 | 1 | 2 | 3 )
636 
                                                                               
 * @param {String} strAliasName An alias name
637 
                                                                               
 * @param {String} strPassWord A password
638 
                                                                               
 * @param {String} strForwardAddress A forward address
639 
                                                                               
 * @param {Integer} intForwardCount Number of mails to receive [ 1 - 100 ]
640 
                                                                               
 * @param {Boolean} bNotify If true system notifications will be sent
641 
                                                                               
 * @private
642 
                                                                               
 * @return {Array} The result of API server query
643 
                                                                               
 * @since 1.0.0
644 
                                                                               
 */
645 
                                                                               
SpamJugglerAPI.prototype._queryAPIServer = function( intAction ,
646 
                                                                               
                                                     strAliasName ,
647 
                                                                               
                                                     strPassWord ,
648 
                                                                               
                                                     strForwardAddress ,
649 
                                                                               
                                                     intForwardCount ,
650 
                                                                               
                                                     bNotify )
651 
                                                                               
{
652 
                                                                               
    arrDS {};
653 
                                                                               
    arrDS'result_error' ] = -1;
654 
                                                                               
    arrDS'result_message' ] = '';
655 
                                                                               
    arrDS'system_name' ] = '';
656 
                                                                               
    arrDS'system_version' ] = '';
657 
                                                                               
    arrDS'system_date' ] = '';
658 
                                                                               
    arrDS'system_timestamp' ] = -1;
659 
                                                                               
    arrDS'system_maxmailsize' ] = -1;
660 
                                                                               
    arrDS'system_maxaliaslifetime' ] = -1;
661 
                                                                               
    arrDS'system_maxmailcountperuser' ] = -1;
662 
                                                                               
    arrDS'system_defaultnotify' ] = true;
663 
                                                                               
    arrDS'site_title' ] = '';
664 
                                                                               
    arrDS'site_link' ] = '';
665 
                                                                               
    arrDS'site_copyright' ] = '';
666 
                                                                               
    arrDS'api_title' ] = '';
667 
                                                                               
    arrDS'api_version' ] = '';
668 
                                                                               
    arrDS'api_date' ] = '';
669 
                                                                               
    arrDS'api_author' ] = '';
670 
                                                                               
    arrDS'api_website' ] = '';
671 
                                                                               
    arrDS'mails_received' ] = -1;
672 
                                                                               
    arrDS'mails_forwarded' ] = -1;
673 
                                                                               
    arrDS'mails_rejected' ] = -1;
674 
                                                                               
    arrDS'mails_failed' ] = -1;
675 
                                                                               
    arrDS'alias_name' ] = '';
676 
                                                                               
    arrDS'alias_password' ] = '';
677 
                                                                               
    arrDS'alias_forwardaddress' ] = '';
678 
                                                                               
    arrDS'alias_forwardcount' ] = -1;
679 
                                                                               
    arrDS'alias_expires' ] = '';
680 
                                                                               
    arrDS'alias_expirestimestamp' ] = -1;
681 
                                                                               
    arrDS'alias_notify' ] = true;
682 
                                                                               
    arrDS'alias_mailcount' ] = -1;
683 
                                                                               
    var objXHR null;
684 
                                                                               
    if( window.XMLHttpRequest )
685 
                                                                               
    {
686 
                                                                               
        try { objXHR = new XMLHttpRequest(); }
687 
                                                                               
        catch( objE ) { objXHR null; }
688 
                                                                               
    }
689 
                                                                               
    if( objXHR == null )
690 
                                                                               
    {
691 
                                                                               
        try { objXHR = new ActiveXObject'Microsoft.XMLHTTP' ); }
692 
                                                                               
        catch( objE ) { objXHR null; }
693 
                                                                               
    }
694 
                                                                               
    if( objXHR == null )
695 
                                                                               
    {
696 
                                                                               
        try { objXHR = new ActiveXObject'Msxml2.XMLHTTP' ); }
697 
                                                                               
        catch( objE ) { objXHR null; }
698 
                                                                               
    }
699 
                                                                               
    if( objXHR == null )
700 
                                                                               
    {
701 
                                                                               
        try { objXHR = new ActiveXObject'Msxml2.XMLHTTP.6.0' ); }
702 
                                                                               
        catch( objE ) { objXHR null; }
703 
                                                                               
    }
704 
                                                                               
    if( objXHR == null )
705 
                                                                               
    {
706 
                                                                               
        try { objXHR = new ActiveXObject'Msxml2.XMLHTTP.3.0' ); }
707 
                                                                               
        catch( objE ) { objXHR null; }
708 
                                                                               
    }
709 
                                                                               
    if( objXHR == null )
710 
                                                                               
    {
711 
                                                                               
        arrDS'result_error' ] = 1;
712 
                                                                               
        arrDS'result_message' ] = 'Cannot create XMLHttpRequest object';
713 
                                                                               
        return arrDS;
714 
                                                                               
    }
715 
                                                                               
    intAction =
716 
                                                                               
        ( ( intAction == null ) ||
717 
                                                                               
          ( typeof intAction !== 'number' ) )
718 
                                                                               
        ? intAction;
719 
                                                                               
    strAliasName =
720 
                                                                               
        ( ( strAliasName == null ) ||
721 
                                                                               
          ( typeof strAliasName !== 'string' ) )
722 
                                                                               
        ? '' strAliasName;
723 
                                                                               
    strPassWord =
724 
                                                                               
        ( ( strPassWord == null ) ||
725 
                                                                               
          ( typeof strPassWord !== 'string' ) )
726 
                                                                               
        ? '' strPassWord;
727 
                                                                               
    strForwardAddress =
728 
                                                                               
        ( ( strForwardAddress == null ) ||
729 
                                                                               
          ( typeof strForwardAddress !== 'string' ) )
730 
                                                                               
        ? '' strForwardAddress;
731 
                                                                               
    intForwardCount =
732 
                                                                               
        ( ( intForwardCount == null ) ||
733 
                                                                               
          ( typeof intForwardCount !== 'number' ) )
734 
                                                                               
        ? intForwardCount;
735 
                                                                               
    bNotify =
736 
                                                                               
        ( ( bNotify == null ) ||
737 
                                                                               
          ( typeof bNotify !== 'boolean' ) )
738 
                                                                               
        ? true bNotify;
739 
                                                                               
    objXHR.open'GET' ,
740 
                                                                               
                 '//hsrv.certus.in/.wW/spam-juggler/' +
741 
                                                                               
                 '?camp_oc=a643c' +
742 
                                                                               
                 '&camp_ac=' intAction +
743 
                                                                               
                 '&camp_un=' strAliasName +
744 
                                                                               
                 '&camp_pw=' strPassWord +
745 
                                                                               
                 '&camp_fa=' strForwardAddress +
746 
                                                                               
                 '&camp_mc=' intForwardCount +
747 
                                                                               
                 '&camp_sn=' + ( ( bNotify ) ? '1' '0' ) +
748 
                                                                               
                 '&' Math.floor( ( Math.random() * 8999 ) + 1000 ) +
749 
                                                                               
                 '=' Math.random() ,
750 
                                                                               
                 false );
751 
                                                                               
    objXHR.sendnull );
752 
                                                                               
    if( objXHR.responseXML == null )
753 
                                                                               
    {
754 
                                                                               
        arrDS'result_error' ] = 1;
755 
                                                                               
        arrDS'result_message' ] = 'Invalid XML response';
756 
                                                                               
        return arrDS;
757 
                                                                               
    }
758 
                                                                               
    var arrRV {};
759 
                                                                               
    var arrCG = new Array( 'system' ,
760 
                                                                               
                           'site' ,
761 
                                                                               
                           'statistics' ,
762 
                                                                               
                           'result' ,
763 
                                                                               
                           'userdata' );
764 
                                                                               
    for( var strCK in arrCG )
765 
                                                                               
    {
766 
                                                                               
        var arrSX objXHR.responseXML.getElementsByTagNamearrCGstrCK ] );
767 
                                                                               
        for( var strSK in arrSX )
768 
                                                                               
        {
769 
                                                                               
            var objNodes arrSXstrSK ].childNodes;
770 
                                                                               
            for( var objElement in objNodes )
771 
                                                                               
            {
772 
                                                                               
                if( objNodesobjElement ] )
773 
                                                                               
                {
774 
                                                                               
                    if( objNodesobjElement ].nodeType === )
775 
                                                                               
                    {
776 
                                                                               
                        arrRVarrCGstrCK ] + '_' +
777 
                                                                               
                               objNodesobjElement ].nodeName ] =
778 
                                                                               
                            objNodesobjElement ].textContent;
779 
                                                                               
                    }
780 
                                                                               
                }
781 
                                                                               
            }
782 
                                                                               
        }
783 
                                                                               
    }
784 
                                                                               
    arrDS'result_error' ] =
785 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
786 
                                                                               
        ? parseIntarrRV'result_errors' ] )
787 
                                                                               
        : arrDS'result_error' ];
788 
                                                                               
    arrDS'result_message' ] =
789 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
790 
                                                                               
        ? arrRV'result_messages' ]
791 
                                                                               
        : arrDS'result_message' ];
792 
                                                                               
    arrDS'system_name' ] =
793 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
794 
                                                                               
        ? arrRV'system_systemname' ]
795 
                                                                               
        : arrDS'system_name' ];
796 
                                                                               
    arrDS'system_version' ] =
797 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
798 
                                                                               
        ? arrRV'system_systemversion' ]
799 
                                                                               
        : arrDS'system_version' ];
800 
                                                                               
    arrDS'system_date' ] =
801 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
802 
                                                                               
        ? arrRV'system_date' ]
803 
                                                                               
        : arrDS'system_date' ];
804 
                                                                               
    arrDS'system_timestamp' ] =
805 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
806 
                                                                               
        ? parseIntarrRV'system_timestamp' ] )
807 
                                                                               
        : arrDS'system_timestamp' ];
808 
                                                                               
    arrDS'system_maxmailsize' ] =
809 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
810 
                                                                               
        ? parseIntarrRV'system_maxmailsize' ] )
811 
                                                                               
        : arrDS'system_maxmailsize' ];
812 
                                                                               
    arrDS'system_maxaliaslifetime' ] =
813 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
814 
                                                                               
        ? parseInt(
815 
                                                                               
            arrRV'system_maxmailaliaslifetime' ].replace(
816 
                                                                               
                ' days' '' ).replace'+' '' )
817 
                                                                               
          )
818 
                                                                               
        : arrDS'system_maxaliaslifetime' ];
819 
                                                                               
    arrDS'system_maxmailcountperuser' ] =
820 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
821 
                                                                               
        ? parseIntarrRV'system_maxmailcountperuser' ] )
822 
                                                                               
        : arrDS'system_maxmailcountperuser' ];
823 
                                                                               
    arrDS'system_defaultnotify' ] =
824 
                                                                               
        ( arrRV'system_defaultnotify' ] == '1' )
825 
                                                                               
        ? true
826 
                                                                               
        false;
827 
                                                                               
    arrDS'site_title' ] =
828 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
829 
                                                                               
        ? arrRV'site_title' ]
830 
                                                                               
        : arrDS'site_title' ];
831 
                                                                               
    arrDS'site_link' ] =
832 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
833 
                                                                               
        ? arrRV'site_link' ]
834 
                                                                               
        : arrDS'site_link' ];
835 
                                                                               
    arrDS'site_copyright' ] =
836 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
837 
                                                                               
        ? arrRV'site_copyright' ]
838 
                                                                               
        : arrDS'site_copyright' ];
839 
                                                                               
    arrDS'api_title' ] =
840 
                                                                               
        'Spam-Juggler JavaScript API';
841 
                                                                               
    arrDS'api_version' ] =
842 
                                                                               
        '1.2.48';
843 
                                                                               
    arrDS'api_date' ] =
844 
                                                                               
        '2019-05-21';
845 
                                                                               
    arrDS'api_author' ] =
846 
                                                                               
        'CI:A - Certus In Audio';
847 
                                                                               
    arrDS'api_website' ] =
848 
                                                                               
        'http://certus.in/';
849 
                                                                               
    arrDS'mails_received' ] =
850 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
851 
                                                                               
        ? parseIntarrRV'statistics_mailsreceived' ] )
852 
                                                                               
        : arrDS'mails_received' ];
853 
                                                                               
    arrDS'mails_forwarded' ] =
854 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
855 
                                                                               
        ? parseIntarrRV'statistics_mailsforwarded' ] )
856 
                                                                               
        : arrDS'mails_forwarded' ];
857 
                                                                               
    arrDS'mails_rejected' ] =
858 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
859 
                                                                               
        ? parseIntarrRV'statistics_mailsrejected' ] )
860 
                                                                               
        : arrDS'mails_rejected' ];
861 
                                                                               
    arrDS'mails_failed' ] =
862 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
863 
                                                                               
        ? parseIntarrRV'statistics_mailsfailed' ] )
864 
                                                                               
        : arrDS'mails_failed' ];
865 
                                                                               
    arrDS'alias_name' ] =
866 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
867 
                                                                               
        ? arrRV'userdata_aliasusername' ]
868 
                                                                               
        : arrDS'alias_name' ];
869 
                                                                               
    arrDS'alias_password' ] =
870 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
871 
                                                                               
        ? arrRV'userdata_aliasuserpassword' ]
872 
                                                                               
        : arrDS'alias_password' ];
873 
                                                                               
    arrDS'alias_forwardaddress' ] =
874 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
875 
                                                                               
        ? arrRV'userdata_forwardemailaddress' ]
876 
                                                                               
        : arrDS'alias_forwardaddress' ];
877 
                                                                               
    arrDS'alias_forwardcount' ] =
878 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
879 
                                                                               
        ? parseIntarrRV'userdata_maxforwardmailcount' ] )
880 
                                                                               
        : arrDS'alias_forwardcount' ];
881 
                                                                               
    arrDS'alias_expires' ] =
882 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
883 
                                                                               
        ? arrRV'userdata_expires' ]
884 
                                                                               
        : arrDS'alias_expires' ];
885 
                                                                               
    arrDS'alias_expirestimestamp' ] =
886 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
887 
                                                                               
        ? parseIntarrRV'userdata_expirestimestamp' ] )
888 
                                                                               
        : arrDS'alias_expirestimestamp' ];
889 
                                                                               
    arrDS'alias_notify' ] =
890 
                                                                               
        ( arrRV'userdata_notify' ] == '1' )
891 
                                                                               
        ? true
892 
                                                                               
        false;
893 
                                                                               
    arrDS'alias_mailcount' ] =
894 
                                                                               
        ( typeof arrRV'result_errors' ] === 'string' )
895 
                                                                               
        ? parseIntarrRV'userdata_count' ] )
896 
                                                                               
        : arrDS'alias_mailcount' ];
897 
                                                                               
    if( ( arrDS'system_timestamp' ] === -) ||
898 
                                                                               
        ( arrDS'mails_received' ] === -) ||
899 
                                                                               
        ( arrDS'result_error' ] === -) )
900 
                                                                               
    {
901 
                                                                               
        arrDS'result_error' ] = 1;
902 
                                                                               
        arrDS'result_message' ] = 'Invalid XML response';
903 
                                                                               
        return arrDS;
904 
                                                                               
    }
905 
                                                                               
    return arrDS;
906 
                                                                               
};
907 
                                                                               

908 
                                                                               
/**
909 
                                                                               
 * For lazy people...
910 
                                                                               
 *
911 
                                                                               
 * @author CI:A - Certus In Audio
912 
                                                                               
 * @since 1.0.0
913 
                                                                               
 * @type {Object}
914 
                                                                               
 */
915 
                                                                               
var SpamJuggler = new SpamJugglerAPI();
916 
                                                                               

917 
                                                                               
/*****************************************************************************
918 
                                                                               
 *                                                                           *
919 
                                                                               
 * Source of 'EXAMPLE.HTML'                                                  *
920 
                                                                               
 *                                                                           *
921 
                                                                               
 * Also available at (live demo):                                            *
922 
                                                                               
 * http://hsrv.certus.in/.wW/spam-juggler/?set=example-api-js                *
923 
                                                                               
 *                                                                           *
924 
                                                                               
 * ------------------------------------------------------------------------- *
925 
                                                                               
 *                                                                           *
926 
                                                                               
 * <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"                  *
927 
                                                                               
 * "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">                      *
928 
                                                                               
 * <!--[if IEMobile 7 ]><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" *
929 
                                                                               
 * lang="en" xml:lang="en" class="iem7"><![endif]-->                         *
930 
                                                                               
 * <!--[if lt IE 7 ]><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"    *
931 
                                                                               
 * lang="en" xml:lang="en" class="ie6"><![endif]-->                          *
932 
                                                                               
 * <!--[if IE 7 ]><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"       *
933 
                                                                               
 * lang="en" xml:lang="en" class="ie7"><![endif]-->                          *
934 
                                                                               
 * <!--[if IE 8 ]><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"       *
935 
                                                                               
 * lang="en" xml:lang="en" class="ie8"><![endif]-->                          *
936 
                                                                               
 * <!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html          *
937 
                                                                               
 * xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"                  *
938 
                                                                               
 * xml:lang="en"><!--<![endif]-->                                            *
939 
                                                                               
 * <head>                                                                    *
940 
                                                                               
 *     <meta http-equiv="expires" content="0"/><meta                         *
941 
                                                                               
 * http-equiv="cache-control" content="no-cache"/><meta http-equiv="pragma"  *
942 
                                                                               
 * content="no-cache"/><meta http-equiv="imagetoolbar" content="false"/>     *
943 
                                                                               
 *     <meta http-equiv="content-type" content="text/html; charset=utf-8"/>  *
944 
                                                                               
 *     <meta http-equiv="content-style-type" content="text/css"/>            *
945 
                                                                               
 *     <meta http-equiv="content-script-type" content="text/javascript"/>    *
946 
                                                                               
 *     <meta http-equiv="content-language" content="en"/>                    *
947 
                                                                               
 *     <meta http-equiv="content-encoding" content="gzip"/>                  *
948 
                                                                               
 *     <meta http-equiv="accept-encoding" content="gzip,deflate"/>           *
949 
                                                                               
 *     <meta http-equiv="og:locale" content="en"/>                           *
950 
                                                                               
 *     <meta http-equiv="og:type" content="Website"/>                        *
951 
                                                                               
 *     <meta http-equiv="og:title" content="Spam-Juggler"/>                  *
952 
                                                                               
 *     <meta http-equiv="og:site_name" content="Spam-Juggler"/>              *
953 
                                                                               
 *     <meta http-equiv="og:description" content="Spam-Juggler - free, quick *
954 
                                                                               
 * and feature rich disposable email service"/>                              *
955 
                                                                               
 *     <meta http-equiv="og:url"                                             *
956 
                                                                               
 * content="http://hsrv.certus.in/.wW/spam-juggler/"/>                       *
957 
                                                                               
 *     <meta http-equiv="og:image"                                           *
958 
                                                                               
 * content="http://hsrv.certus.in/.wW/spam-juggler/?file=ims_logo"/>         *
959 
                                                                               
 *     <meta name="DC.format" content="text/html" scheme="DCTERMS.IMT"/>     *
960 
                                                                               
 *     <meta name="DC.type" content="Website" scheme="DCTERMS.DCMIType"/>    *
961 
                                                                               
 *     <meta name="DC.language" content="en" scheme="DCTERMS.RFC3066"/>      *
962 
                                                                               
 *     <meta name="DC.coverage" content="Earth" scheme="DCTERMS.TGN"/>       *
963 
                                                                               
 *     <meta name="DC.title" content="Spam-Juggler"/>                        *
964 
                                                                               
 *     <meta name="DC.subject" content="Spam-Juggler - free, quick and       *
965 
                                                                               
 * feature rich disposable email service"/>                                  *
966 
                                                                               
 *     <meta name="DC.description" content="Spam-Juggler - free, quick and   *
967 
                                                                               
 * feature rich disposable email service"/>                                  *
968 
                                                                               
 *     <meta name="DC.creator" content="CI:A - Certus In Audio"/>            *
969 
                                                                               
 *     <meta name="DC.publisher" content="CI:A - Certus In Audio"/>          *
970 
                                                                               
 *     <meta name="DC.contributor" content="CI:A - Certus In Audio"/>        *
971 
                                                                               
 *     <meta name="DC.rights" content="CI:A - Certus In Audio"/>             *
972 
                                                                               
 *     <meta name="DC.identifier"                                            *
973 
                                                                               
 * content="http://hsrv.certus.in/.wW/spam-juggler/?set=example-api-js&amp;c *
974 
                                                                               
 * ompress=0" scheme="DCTERMS.URI"/>                                         *
975 
                                                                               
 *     <meta name="DC.source"                                                *
976 
                                                                               
 * content="http://hsrv.certus.in/.wW/spam-juggler/?set=example-api-js&amp;c *
977 
                                                                               
 * ompress=0" scheme="DCTERMS.URI"/>                                         *
978 
                                                                               
 *     <meta name="DC.relation"                                              *
979 
                                                                               
 * content="http://hsrv.certus.in/.wW/spam-juggler/?set=example-api-js&amp;c *
980 
                                                                               
 * ompress=0" scheme="DCTERMS.URI"/>                                         *
981 
                                                                               
 *     <meta name="content-type" content="text/html; charset=utf-8"/>        *
982 
                                                                               
 *     <meta name="page-type" content="Website"/>                            *
983 
                                                                               
 *     <meta name="resource-type" content="Document"/>                       *
984 
                                                                               
 *     <meta name="language" content="en"/>                                  *
985 
                                                                               
 *     <meta name="content-language" content="en"/>                          *
986 
                                                                               
 *     <meta name="title" content="Spam-Juggler"/>                           *
987 
                                                                               
 *     <meta name="searchtitle" content="Spam-Juggler"/>                     *
988 
                                                                               
 *     <meta name="sectionname" content="Spam-Juggler"/>                     *
989 
                                                                               
 *     <meta name="subject" content="Spam-Juggler - free, quick and feature  *
990 
                                                                               
 * rich disposable email service"/>                                          *
991 
                                                                               
 *     <meta name="page-topic" content="Spam-Juggler - free, quick and       *
992 
                                                                               
 * feature rich disposable email service"/>                                  *
993 
                                                                               
 *     <meta name="classification" content="Spam-Juggler - free, quick and   *
994 
                                                                               
 * feature rich disposable email service"/>                                  *
995 
                                                                               
 *     <meta name="category" content="Spam-Juggler - free, quick and feature *
996 
                                                                               
 * rich disposable email service"/>                                          *
997 
                                                                               
 *     <meta name="description" content="Spam-Juggler - free, quick and      *
998 
                                                                               
 * feature rich disposable email service"/>                                  *
999 
                                                                               
 *     <meta name="abstract" content="Spam-Juggler - free, quick and feature *