function $package(name)
{
//Split the namespace domain string
var domains = (".");
var cur_domain = window;
//Loop through each subdomain
for(var i=0; i< ; i++)
{
var domain = domains[i];
//If the space of the domain is not created
if(typeof(cur_domain[domain]) == "undefined")
{
//Create a domain
cur_domain[domain] = {};
}
//Set the current domain as the domain of this loop
cur_domain = cur_domain[domain];
}
return cur_domain;
};
//Use with reference
$package("");
$package("");
with()
with()
{
alert("system1 : " + system);
alert("test1 : " + test);
}
//Closed reference
$package("");
$package("");
(function(){
var system = ;
var test = ;
alert("system2 : " + system);
alert("test2" + test);
})();