Enum usage in javascript
<p>i was searching Enum usage in javascript. i found one stackoverflow link 
<a href="http://stackoverflow.com/questions/287903/enums-in-javascript">Enums in JavaScript?</a> it is good start.</p>

<p>this link show one good use like </p>

<pre><code>var SIZE = {
SMALL : {value: 0, name: "Small", code: "S"}, 
MEDIUM: {value: 1, name: "Medium", code: "M"}, 
LARGE : {value: 2, name: "Large", code: "L"}
};

var currentSize = SIZE.MEDIUM;
if (currentSize == SIZE.MEDIUM) {
// this alerts: "1: Medium"
alert(currentSize.value + ": " + currentSize.name);
}
</code></pre>

<p>my requirement was bit different and that why i change the above code like</p>

<pre><code>var MSg = {
        Country= {
                    GBR: {name_req:"Name Required",email_req:"Email Required"},
                    FRA: {name_req:"FRA Name Required",email_req:"FRA Email Required"}
                 }

    };

but it is giving error. so please guide me how to write the above code without error. also tell me the enum code will work in all the browser? thanks.
</code></pre>

<h2><strong>For my own future references</strong></h2>

<pre><code>var dialog =
    {
        MainContainer:
        {
            Country:
            {
                GBR:
                    {
                        height: 365, width: 257
                    },
                FRA:
                    {
                        height: 375, width: 310
                    }

            }
        },
        SubContainer:
        {
            Country:
            {
                GBR:
                    {
                        height: 0, width: 257
                    },
                FRA:
                    {
                        height: 0, width: 300
                    }
            }
        }
    };

    var Validation =
    {
        Msg:
        {
            Country:
            {
                GBR:
                    {
                        Name: "Name Required",
                        Subject: "Subject Required",
                        Email: "Email Required",
                        Invalid_Email: "Invalid Email Address",
                        Feedback: "Feedback details Required",
                        Success: "Feedback send successfully",
                        Fail: "Feedback send fail"
                    },
                USA:
                    {
                        Name: "Name Required",
                        Subject: "Subject Required",
                        Email: "Email Required",
                        Invalid_Email: "Invalid Email Address",
                        Feedback: "Feedback details Required",
                        Success: "Feedback send successfully",
                        Fail: "Feedback send fail"
                    }
            }
        }
    };
</code></pre>

<h2><strong>assignment or set country</strong></h2>

<pre><code> var feedCookie = getCookie('SetCountry');
 feedCookie = (feedCookie == '' ? 'GBR' : feedCookie);
 var dialog_Main = dialog.MainContainer.Country[feedCookie];
 var dialog_Sub = dialog.SubContainer.Country[feedCookie];
</code></pre>
