/*
    Shows a modal Information screen
    using te ModalObject class as a base class
*/
var ModalInformationScreen =  Class.create(ModalObject, 
                              {
                                Message: '',
                                MessageCSSClass: 'ModalInfoScreenMessage',
                                ImageCSSClass: 'ModalInfoScreenImage',
                                InfoDiv: null,
                                
                              
                                initialize: function($super, id, zIndex, message)
                                            {
                                                $super(id, zIndex);
                                                this.Message = message;
                                            },
                              
                                Show: function($super)
                                {
                                    //Renders the base class
                                    $super();
                                    
                                    //render the information screen.
                                    this.CreateInfoDiv();
                                    
                                },
                                
                                Hide: function($super)
                                {
                                    //Hide the information screen
                                    $(this.Id + '_ModalInfoDiv').remove();
                                    
                                    //Hides the objects of the baseclass
                                    $super();
                                },
                                
                                CreateInfoDiv: function()
                                               {
                                                   var ScrollBarOffset_x = document.viewport.getScrollOffsets()[0];
                                                   var ScrollBarOffset_y = document.viewport.getScrollOffsets()[1];
                              
                                               
                                                   if(this.InfoDiv == null)
                                                   {
                                                        this.InfoDiv = document.createElement('div');
                                                        this.InfoDiv.setAttribute('id', this.Id + '_ModalInfoDiv');
                                                        
                                                        //Insert a table element which is fullScreen and is aligned in the center of the screen.
                                                        this.InfoDiv.innerHTML = '<table style="width:100%;height:100%;border:0px;"><tr><td style="vertical-align:middle;text-align:center"><div class="' + this.ImageCSSClass + '">&nbsp;</div><div class="' + this.MessageCSSClass + '">' + this.Message + '</div></td></tr></table>';
                                                                                                            
                                                        document.body.appendChild(this.InfoDiv);                                
                                                        $(this.Id + '_ModalInfoDiv').setStyle("width: 100%; height:100%; position: absolute; vertical-align: middle; text-align: center");
                                                        $(this.Id + '_ModalInfoDiv').setStyle("z-index: " + this.ZIndex + 1);                                                        
                                                   }
                                                   
                                                   $(this.Id + '_ModalInfoDiv').setStyle("left : " + ScrollBarOffset_x + "px");
                                                   $(this.Id + '_ModalInfoDiv').setStyle("top : " + ScrollBarOffset_y + "px");
                                                   
                                               }
                                

                              });
                        

