﻿// JScript File

Type.registerNamespace("IglooSite.Sms");

IglooSite.Sms.smsShowDialog = function()
{    
    if(IglooSite.Sms._loadSms_handler) {
        Sys.Application.remove_load(IglooSite.Sms._loadSms_handler);
    }

    IglooSite.Sms._loadSms_handler = Function.createDelegate(this, IglooSite.Sms.showDialog);
    Sys.Application.add_load(IglooSite.Sms._loadSms_handler);    
}

IglooSite.Sms.showDialog = function()
{  
    if(IglooSite.Sms._loadSms_handler) {
        Sys.Application.remove_load(IglooSite.Sms._loadSms_handler);
        IglooSite.Sms._loadSms_handler = null;
    }
    
    var theDlg = $find("begDlgSms");
    theDlg.show();    
    
    
    return void(0);
}
 
IglooSite.Sms._loadSms_handler = null;

IglooSite.Sms.raiseEvent = function(param, source)
{
    var theDlg = $find("begDlgSms");
    theDlg.set_RevealElement(source);
    var el = theDlg.get_element();
    var strCmdTemplate = el._postEvent;
    eval(strCmdTemplate.replace("_#####_", param));
}

IglooSite.Sms.closeDialog = function() {
    var theDlg = $find("begDlgSms");
    theDlg.close();
} 

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); 