﻿// JScript File


///////////////////// Module which also should have a tab 
////////////////////  attached to it.


function NewModuleViewer()
{
    
    
    ////////////////////////////
    // 
    //   Tabstrip will create them from the DataBase
    // 
    ////////////////////////////
    /** 
    *   "frmNewModule" locate in Constants.js :: Frame_Names
    */
    this.iframe = document.getElementById(NEWMODULE_FRM);
    
    
    /** 
    *   prexif + Name
    *   "frmNewModule" locate in Constants.js :: Frame_Names
    */
    
    this.button = document.getElementById(BTN_NEWMODULE);

    /** 
    *   prexif + Name
    *   "btnNewModule" locate in Constants.js :: Button id & Names
    */

    
    this.visible = false;
    this.onClick = onClick;
    this.requestShutDown = requestShutDown;
    
    
    function requestShutDown()
    {
        
        try
        {
	        var frame = top[this.iframe.name];
            var response = frame.NewModule.RequestShutDown();
            return response.value;
        }
        catch(err)
        {
	        return false;
        }
    }
    
    function onClick(id)
    {
        
//        var request = new Request(REQ_PARAGRAPH_TYPE);
//        request.id = id;
//        top.uiCtrl.sendData(request);
    } 
}   