if(top.location!==window.location){top.location=window.location.href}var pageTracker;var Cwo={that:this,SetSessionCookie:function(b,a){document.cookie=b+"="+a+";path=/"},IsLoggedIn:function(){return($("#HdnIsLoggedIn").length)?true:false},GetCookieTime:function(b){var a=b.getMonth()+1+"/"+b.getDate()+"/"+b.getFullYear()+" "+b.getHours()+":"+b.getMinutes()+":"+b.getSeconds();return a},RegisterNamespace:function(a){var c=a.split("."),d=window;for(var b=0;b<c.length;b++){if(typeof d[c[b]]==="undefined"){d[c[b]]=new Object()}d=d[c[b]]}},Collection:function(){this.Items=new Array();this.Item=function(a){return this.Items[a]};this.Add=function(a){this.Items[this.Items.length]=a};this.Remove=function(b){var a=this.IndexOf(b);if(a>-1){this.Items=this.Items.slice(0,a).concat(this.Items.slice(a+1,this.Items.length))}};this.Contains=function(a){if(this.IndexOf(a)>-1){return true}else{return false}};this.IndexOf=function(b){for(var a=0;a<this.Items.length;a++){if(this.Items[a]===b){return a}}return -1};this.Count=function(){return this.Items.length};this.Clear=function(){for(var a=0;a<this.Items.length;a++){this[a]=null}}},LogMIActivity:function(a){if(a===undefined){_gaq.push(["_trackPageview"])}else{_gaq.push(["_trackPageview",a])}},AjaxCall:function(a,h,g,f,d,b){var e=null;if(d!==null){e=function(k,j){g(k,j);try{Cwo.LogMIActivity(d)}catch(i){}}}else{e=function(i,j){g(i,j)}}this.timeout=Cwo.Common.GetCookie("SessionTimeout");if(this.timeout!==""){this.timeoutdate=new Date(this.timeout);this.currentTime=new Date();if(this.currentTime.getTime()>this.timeoutdate.getTime()){var c="";if(Cwo.Common.GetCookie("PropertywideTrackerID")===""){c="00000000-0000-0000-0000-000000000000"}else{c=Cwo.Common.GetCookie("PropertywideTrackerID")}this.currentTime.setMinutes(this.currentTime.getMinutes()+TrackerSessionTimeoutPeriod);Cwo.SetSessionCookie("SessionTimeout",Cwo.GetCookieTime(this.currentTime));Cwo.AjaxCall("/webservices/UserAccount.asmx/TrackerIDRefresh","{ trackerID:'"+c+"'}",function(){Cwo.AjaxCall(a,h,g,f,d)},null,null)}else{if(h===null){h="{}"}$.ajax({type:"POST",url:a,data:h,contentType:"application/json; charset=utf-8",dataType:"json",success:e,error:function(k,i,j){if(f!==null){f()}else{if(!b){Cwo.Error.Popup("There was a problem","An unknown error occured. There may be a problem connecting to our website. Please wait a few minutes and try again.\n\n"+i+"\n\n"+k.responseText)}}}})}}}};
