var __IsIE = !!(window.attachEvent && navigator.userAgent.indexOf('Opera') === -1);
function IsIE()
{
return __IsIE;
}
function isArray(object)
{
return object != null && typeof object == "object" && 'splice' in object && 'join' in object;
}
function isUndefined(object)
{
return typeof object == "undefined";
}
if (isUndefined(Array.indexOf))
{
Array.prototype.indexOf = function(value) {
for (var i = 0; i < this.length; i++)
{
if (this[i] == value)
return i;
}
return -1;
}
}
Array.prototype.contains = function(value)
{
return this.indexOf(value) >= 0;
}
function format(fmt)
{
if (arguments.length == 1)
return fmt;
else if (arguments.length > 1)
{
if (arguments.length == 2 && isArray(arguments[1]))
{
var array = arguments[1];
arguments.length = array.length + 1;
for (var i = 0; i < array.length; i++)
arguments[i + 1] = array[i];
}
var result = fmt.toString().replace(/[%]7B/gi, "{").replace(/[%]7D/gi, "}");
if (result.indexOf("{") >= 0)
{
for (var i = 0; i < arguments.length - 1; i++)
{
var obj = arguments[i + 1];
result = result.replace(new RegExp("[{]" + i + "[}]", "g"), (obj != null ? obj.toString() : ""));
}
}
return result;
}
else return "";
}
function $A(obj)
{
var array = [];
if (obj.length > 0)
{
for (var i = 0; i < obj.length; i++)
array.push(obj[i]);
}
return array;
}
String.prototype.format = function()
{
if (arguments.length > 0)
return format(this, $A(arguments));
else return this;
}
var __JS = {
LoadHistory: [],
Loads: [],
LoadsJS: [],
LoadsCSS: [],
Ord: 10000,
Version: '0',
windowLoaded: false
};
__Debug = false;
__Root = "";
function generateScript(arr, cb)
{
if (__JS.Version != '0' && arr.length > 0)
{
__JS.Ord++;
var id = "__script_" + __JS.Ord;
var src = "{0}/ajax.aspx?n={1}&v={2}".format(__Root, arr.join('$'), __JS.Version);
if (__JS.windowLoaded)
{
var oHead = document.getElementsByTagName('HEAD').item(0);
var oScript = document.createElement("script");
oScript.setAttribute("id", id);
oScript.setAttribute("type", "text/javascript");
oScript.setAttribute("src", src);
oHead.appendChild(oScript);
var callback = cb;
if (typeof callback == "function")
{
if (IsIE())
oScript.onreadystatechange = function() {
if (oScript.readyState == 'complete')
callback.defer();
};
else oScript.onload = function() { callback.defer(); };
}
}
else document.write(("<scr" + "ipt type='text/javascript' src='{0}' id='{1}'></scr" + "ipt>").format(src, id));
return id;
}
return "";
}
function generateCSSLink(arr, cb)
{
if (__JS.Version != '0' && arr.length > 0)
{
__JS.Ord++;
var id = "__css_" + __JS.Ord;
var href = "{0}/ajax.aspx?n={1}&v={2}' rel='stylesheet".format(__Root, arr.join('$'), __JS.Version);
if (__JS.windowLoaded)
{
var oHead = document.getElementsByTagName('HEAD').item(0);
var oCSS = document.createElement("link");
oCSS.setAttribute("id", id);
oCSS.setAttribute("type", "text/css");
oCSS.setAttribute("href", href);
oHead.appendChild(oCSS);
var callback = cb;
if (typeof callback == "function")
{
if (IsIE())
oCSS.onreadystatechange = function() {
if (oCSS.readyState == 'complete')
callback();
};
else oCSS.onload = function() {
callback();
};
}
}
else document.write("<link href='{0}' type='text/css' />".format(href));
return id;
}
return "";
}
function $using()
{
var name;
var key;
var maxLength = 900;
for (var i = 0; i < arguments.length; i++)
{
name = arguments[i];
key = name.toLowerCase();
name = encodeURIComponent(name);
if (!__JS.LoadHistory.contains(key))
{
if ((__JS.Loads.join('$')).length > maxLength)
$load();
if ((__JS.LoadsJS.join('$')).length > maxLength)
$load();
if ((__JS.LoadsCSS.join('$')).length > maxLength)
$load();
if (/[.]js$/.test(key))
__JS.LoadsJS.push(name);
else if (/[.]css$/.test(key))
__JS.LoadsCSS.push(name);
else __JS.Loads.push(name);
__JS.LoadHistory.push(key);
}
else if(!Prototype.Browser.Chrome && key != "hzhelper.js")
alert("Warning: Duplicated $using parameter [" + arguments[i] + "]");
}
};
function $load()
{
var cb = null;
if (arguments.length > 0)
{
if (typeof arguments[0] == "function") cb = arguments[0];
else
{
for (var i = 0; i < arguments.length; i++)
$using(arguments[i]);
}
}
if (__JS.Loads.length + __JS.LoadsJS.length + __JS.LoadsCSS.length == 0)
{
if (cb != null)
cb();
}
else
{
generateScript(__JS.Loads.sort(), cb);
generateScript(__JS.LoadsJS, cb);
generateCSSLink(__JS.LoadsCSS, cb);
__JS.Loads = [];
__JS.LoadsJS = [];
__JS.LoadsCSS = [];
}
};
if(typeof MoneyWise == "undefined") MoneyWise={};
if(typeof MoneyWise.WoNiuGu == "undefined") MoneyWise.WoNiuGu={};
if(typeof MoneyWise.WoNiuGu.Core == "undefined") MoneyWise.WoNiuGu.Core={};
if(typeof MoneyWise.WoNiuGu.HttpHandler == "undefined") MoneyWise.WoNiuGu.HttpHandler={};
if(typeof MoneyWise.WoNiuGuWang == "undefined") MoneyWise.WoNiuGuWang={};
if(typeof MoneyWise.WoNiuGuWang.HttpHandler == "undefined") MoneyWise.WoNiuGuWang.HttpHandler={};
if(typeof setDomain != 'undefined' && setDomain) document.domain = 'woniugu.com';
__JS.Version = '1.0.3890.29429';
__Debug = false;
__Root = 'http://city.woniugu.com';
__WoNiuGuRoot = 'http://www.woniugu.com';

