using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class NoAuthorization : System.Web.UI.Page {
    protected override void InitializeCulture() {

        //string sEng =Session.Contents["Localization"].ToString();

        //if (Request.Form.Get("ctl00$selLanguage") != null)
        //    sEng = Request.Form.Get("ctl00$selLanguage").ToString();

        //if (sEng != null && sEng != "") {
        //System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(sEng);
        //System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(sEng);

        ProfileCommon p = (ProfileCommon)this.Context.Profile;

        if (Request.Form.Get("ctl00$selLanguage") != null)
            p.lang = Request.Form.Get("ctl00$selLanguage").ToString();
        if (p.lang == String.Empty)
            p.lang = Session["Localization"].ToString();

        if (p.lang.Length > 0) {
            this.Culture = p.lang;
            this.UICulture = System.Globalization.CultureInfo.CreateSpecificCulture(p.lang).Name;
        }
    }
    //select theme
    protected void Page_PreInit(object sender, EventArgs e) {
        Page.Theme = Profile.UI.Theme;
    }
    
    protected void Page_Load(object sender, EventArgs e) {

    }
}
