Cwo.RegisterNamespace("Cwo.Common");function DebugObject(a){window.alert(JSON.stringify(a).replace(/,/g,",\n"))}Cwo.Common.SetNonPersistentCookie=function(b,a){document.cookie=b+"="+a};Cwo.Common.SetCookie=function(b,c){var a=new Date();a.setDate(a.getDate()+365);document.cookie=b+"="+c+";expires="+a.toGMTString()};Cwo.Common.GetCookie=function(c){if(document.cookie.length>0){var b=document.cookie.indexOf(c+"=");if(b!==-1){b=b+c.length+1;var a=document.cookie.indexOf(";",b);if(a===-1){a=document.cookie.length}return decodeURIComponent(document.cookie.substring(b,a))}}return""};function AddCommas(b){b+="";var a=b.split(".");var e=a[0];var c=a.length>1?"."+a[1]:"";var d=/(\d+)(\d{3})/;while(d.test(e)){e=e.replace(d,"$1,$2")}return e+c}function FormatCurrency(c,a){var d=parseFloat(c);if(isNaN(d)){return"NaN"}else{var b=new Number(d);if(a){b=b.toFixed(0)}else{b=b.toFixed(2)}return AddCommas(b)}}function CWOTypeOf(a){var b=typeof a;if(b==="object"){if(a){if(typeof a.length==="number"&&!(a.propertyIsEnumerable("length"))&&typeof a.splice==="function"){b="array"}}else{b="null"}}return b}function Hashtable(){this.length=0;this.Keys=new Array();this.Index=new Array();for(var a=0;a<arguments.length;a+=2){if(typeof(arguments[a+1])!=="undefined"){this.Keys[arguments[a]]=arguments[a+1];this.length++}}this.Remove=function(c){var b;if(typeof(this.Keys[c])!=="undefined"){this.length--;b=this.Keys[c];delete this.Keys[c]}return b};this.GetItemAt=function(b){return this.Keys[this.Index[b]]};this.GetItem=function(b){return this.Keys[b]};this.Add=function(c,b){if(typeof(b)!=="undefined"){if(typeof(this.Keys[c])==="undefined"){this.length++}this.Keys[c]=b;this.Index[this.length-1]=c}return b};this.ContainsKey=function(b){return typeof(this.Keys[b])!=="undefined"}}var CWO_Common_Loaded=true;
