  /*
   *  Global functions and prototypes.
   *
  */
  ( function()
  {
  
    window.func = function(){}
 
    // Window Method Add-ons.
    window.elementOffset = function( a_Element )
    {
      ///	<summary>
      ///   This function gets the top and left offset positions of the passed element.
      ///	</summary>
      ///	<param name="a_Element" type="HTMLElement">
      ///   1: The HTML Element that will be evaluated.
      ///	</param>
      ///	<returns type="Object">
      ///   1: The Top position of the HTML Element. This is assigned to the y value.
      ///   2: The Left position of the HTML Element. This is assigned to the x value.
      /// </return>
      var ReturnValue = {};
      if( isDefined( a_Element ) )
      {
        ReturnValue.y = ( a_Element.offsetTop )? a_Element.offsetTop:a_Element.scrollTop;
        ReturnValue.x = ( a_Element.offsetLeft )? a_Element.offsetLeft:a_Element.scrollLeft;
        var ElementStyle = a_Element.style;
        ReturnValue.y += ( ElementStyle.marginTop )?parseInt( ElementStyle.marginTop ):0;
        ReturnValue.x += ( ElementStyle.marginLeft )?parseInt( ElementStyle.marginLeft ):0;
      }
      return ReturnValue;
    }

    window.getObject = function( a_ObjectName )
    {
      ///	<summary>
      ///   Using the passed NameSpace ID, traverses the Moxi object until the Object is found or is undefined.
      ///	</summary>
      ///	<param name="a_ObjectName" type="String">
      ///   1: The Moxi object NameSpace to retrieve (i.e. Moxi.Video).
      ///	</param>
      ///	<returns type="Object">
      ///   1: The NameSpace Object found.
      ///   2: Undefined.
      /// </return>
      var ResultingObject;
      var level = 0;
      var ObjectChain = ( a_ObjectName  )? a_ObjectName.split( '.' ):[];
      var ChainLength = ObjectChain.length;
      if( ChainLength )
      {
        ResultingObject = window;
        while( level < ChainLength && isDefined( ResultingObject = ResultingObject[( ObjectChain[level++] )] ) ){}
      }
      return ResultingObject;
    }

    window.getElementScroll = window.getPageScroll = function( a_Element )
    {
      ///	<summary>
      ///   This function gets the top and left offset of the Body element.
      ///	</summary>
      ///	<returns type="Object">
      ///   1: The Top position of the Body Element. This is assigned to the y value.
      ///   2: The Left position of the Body Element. This is assigned to the x value.
      /// </return>
      var ReturnValue = {};
      a_Element = ( a_Element )? a_Element:document;
      ReturnValue.y = $( a_Element ).scrollTop();
      ReturnValue.x = $( a_Element ).scrollLeft();
      return ReturnValue;
    }

    window.getPageSize = function()
    {
      ///	<summary>
      ///   This function gets the visible height and width of the Body element.
      ///	</summary>
      ///	<returns type="Object">
      ///   1: The height position of the Body Element. This is assigned to the height value.
      ///   2: The width position of the Body Element. This is assigned to the width value.
      /// </return>
      var ReturnValue = {body:{}};
	    ReturnValue.width = $( window ).width();
	    ReturnValue.height = $( window ).height();
	    ReturnValue.body.width = $( document ).width();
	    ReturnValue.body.height = $( document ).height();
	    return ReturnValue;
    }

    window.isDefined = function( a_Object )
    {
      ///	<summary>
      ///   Determines if an object is defined.
      ///	</summary>
      ///	<param name="a_Object" type="Object">
      ///   1: The Object to be evaluated.
      ///	</param>
      ///	<returns type="Boolean">
      ///   1: True if the object is defined.
      ///   2: False if hte Object in undefined.
      /// </return>
      return ( typeof( a_Object ) == 'undefined' ) ? false : true;
    }

    window.IsJSLoaded = function( a_ScriptURL )
    {
      ///	<summary>
      ///   Returns true if the passed URL is contained within one of the page's script tag src attribute.
      ///	</summary>
      ///	<param name="a_ScriptURL" type="String">
      ///   1: The URL, either relative or absolute, of the JavaScript to search for.
      ///	</param>
      ///	<returns type="Boolean">
      ///   1: True if the URL string is contained in any of the SCRIPT tags.
      ///   2: False if the URL string is NOT contained in any of the SCRIPT tags.
      /// </return>
      return ( $( 'SCRIPT[src=' + a_ScriptURL + ']' ).length )?true:false;
    }

    window.Poll = function()
    {
      ///	<summary>
      ///   This function is used to query for a given NameSpace ID in order to run the passed function.
      ///   The query is run every half second or until a maximum time limit is reached.
      ///	</summary>
      var MoxiQueue = Moxi.Queue;
      var MoxiQueueIndex = Moxi.QueueIndex;
      if( MoxiQueue && MoxiQueueIndex < MoxiQueue.length )
      {
        var ThisTime = ( new Date ).getTime();
        var TimeElapsed = ( ( ThisTime - MoxiQueue[MoxiQueueIndex].time ) / 1000 );
        if( isDefined( getObject( MoxiQueue[MoxiQueueIndex].ns ) ) )
        {
          MoxiQueue[MoxiQueueIndex].func();
          Moxi.QueueIndex++;
        }
        if( TimeElapsed < 30000 )
        {
          setTimeout( function()
          {
            Poll();
          }, 500 );
        }
        else
        {
          Moxi.QueueIndex++;
          if( MoxiQueueIndex < MoxiQueue.length )
          {
            Poll();
          }
        }
      }
    }
    
    window.require = function( a_LibraryName )
    {
      ( '/us/js/html/library/moxi_lib_' + a_LibraryName + '.js' ).loadJS();
    }

    /*
     *  Array Prototypes
    */
    
    Array.prototype.index = function( a_Key )
    {
      ///	<summary>
      ///   Finds the key in an array and returns the index.
      ///	</summary>
      ///	<param name="a_Key" type="Object">
      ///   1: The object to compare to.
      ///	</param>
      ///	<returns type="Number">
      ///   1: The index at which the key was found.
      ///   2: -1 if key is not found.
      /// </return>
      for( var zed = 0; zed < this.length; zed++ )
      {
        if( a_Key === this[zed] )
        {
          return zed;
        }
      }
      return -1;
    };

    Array.prototype.isMember = function()
    {
      ///	<summary>
      ///   Locates a value, or set of values within an array.
      ///	</summary>
      ///	<param name="argument" type="Object">
      ///   1: One or more objects to compare within the array.
      ///	</param>
      ///	<returns type="Boolean">
      ///   1: True if all objects within the arguments object are found within the array.
      ///   2: False if one or more objects are not found within the array.
      /// </return>
      var NumberFound = 0;
      var ArrayJoined = this.join( '~!~' );
      for( var j = 0; j < arguments.length; j++ )
      {
        if( ArrayJoined.match( new RegExp( '(^|~!~)' + arguments[j] + '($|~!~)' ) ) )
        {
          NumberFound++;
        }
      }
      return ( arguments.length === NumberFound )? true : false;
    };

    Array.prototype.isPage = function()
    {
      var ReturnValue = false;
      for( var i = 0; i < this.length; i++ )
      {
        if( new RegExp( this[i], 'gi' ).test( location.href ) )
        {
          ReturnValue = true;
          break;
        }
      }
      return ReturnValue;
    }

    Array.prototype.last = function()
    {
      ///	<summary>
      ///   Gets the last item in an array.
      ///	</summary>
      ///	<returns type="Number">
      ///   1: The last index number of the array.
      ///   2: Null if the array length zero.
      /// </return>
      return ( this.length > 0 ? this[this.length - 1] : void(0) );
    };

    Array.prototype.loadJS = function( a_ID, a_Callback, a_OnError )
    {
      ///	<summary>
      ///   Loads JavaScript files into the document.
      ///   This function also doubles for the String prototype version.
      ///   The Array version consists of Objects with src, callback, and onerror used for the data.
      ///   When used as a String prototype the arguments, minus a_ID, are converted to an array item.
      ///	</summary>
      ///	<param name="a_ID" type="String">
      ///   1: The ID to be assigned to the script tag. This is used when used with String object only.
      ///	</param>
      ///	<param name="a_Callback" type="Function">
      ///   1: The Function to call when the script has successfully loaded. This is used when used with String object only.
      ///	</param>
      ///	<param name="a_OnError" type="Function">
      ///   1: The Function to call when the script has failed to load. This is used when used with String object only.
      ///	</param>
      var ThisArray = Array.TypeOf( this )?this:[{src:this, callback:a_Callback, onerror:a_OnError}];
      var head = $( 'HEAD' )[0];
      var script;
      for( var i = 0; i < ThisArray.length; i++ )
      {
        if( !IsJSLoaded( ThisArray[i].src ) )
        {
          script = document.createElement( "SCRIPT" );
          script.setAttribute( "type", "text/javascript" );
          script.onerror = ThisArray[i].onerror || func;
          script.setAttribute( "src", ThisArray[i].src );
          if( ThisArray[i].callback )
          {
            script.setAttribute( "callback", ThisArray[i].callback );
            script.onreadystatechange = function()
            {
              if( this.readyState == 'complete' || this.readyState == 'loaded' )
              {
                this.callback();
              }
            }
          }
          if( ThisArray[i].id )
          {
            script.id = ThisArray[i].id;
          }
          head.appendChild( script );
        }
      }
    };
    
    Array.prototype.Queue = function( a_CallBack )
    {
      ///	<summary>
      ///   Adds namespace IDs to an array for polling.
      ///	</summary>
      ///	<param name="a_ObjectName" type="String">
      ///   1: The NameSpace ID to be polled.
      ///	</param>
      ///	<param name="a_CallBack" type="Function">
      ///   1: The Function to call once the NameSpace ID has loaded.
      ///	</param>

      if( isDefined( Moxi ) )
      {
        var ThisArray = Array.TypeOf( this )?this:[{ns:this, func:a_CallBack}];
        if( !isDefined( Moxi.Queue ) )
        {
          Moxi.Queue = [];
        }
        for( var q = 0; q < ThisArray.length; q++ )
        {
          ThisArray[q].time = ( new Date ).getTime();
          Moxi.Queue.push( ThisArray[q] );
        }
        if( !isDefined( Moxi.QueueIndex ) )
        {
          Moxi.QueueIndex = 0;
          setTimeout( Poll, 500 );
        }
      }
      else
      {
        setTimeout( function()
        {
          ThisArray.Queue();
        }, 500 );
      }
    }
    
    Array.prototype.sortRandom = function()
    {
      ///	<summary>
      ///   Sorts an array into a random order.
      ///	</summary>
      ///	<returns type="Array">
      ///   1: The randomly sorted array.
      /// </return>
      var ThisArray = this;
      // This is a place holder for the random ordered index numbers. These numbers range from 0(zero)
      // to array length minus 1(one).
      var RandomNumberArray = [];
      var ReturnValue = [];
      for( var i = 0; i < ThisArray.length; i++ )
      {
        var RandomNumber = Math.floor( Math.random() * ThisArray.length );
        while( RandomNumberArray.isMember( RandomNumber ) )
        {
          RandomNumber = Math.floor( Math.random() * ThisArray.length );
        }
        RandomNumberArray.push( RandomNumber );
        ReturnValue.push( ThisArray[RandomNumber] );
      }
      return ReturnValue;
    };
    
    Array.prototype.trim = function()
    {
      ///	<summary>
      ///   Removes all entities that contain no value.
      ///	</summary>
      ///	<returns type="Array">
      ///   1: The modified array.
      /// </return>
      var ThisArray = this;
      return ThisArray.join( '~!~' ).replace( /(^|~\!~)[\s]*($|~\!~)/g, '~!~' ).replace( /(^~\!~|~\!~$)/gi, '' ).split( '~!~' );
    }

    /*
     *  Date Prototypes
    */

    Date.prototype.format = function( a_Format )
    {
      ///	<summary>
      ///   Formats the date object to either long or short.
      ///	</summary>
      ///	<param name="a_Format" type="String">
      ///   1: short (08/11/2008)
      ///   2: long (August 11, 2008)
      ///	</param>
      ///	<returns type="String">
      ///   1: The formatted date string
      /// </return>
      var DateTime = this;
      var MonthsLong = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
      var ReturnValue = '';
      switch( a_Format )
      {
        case 'short':
          var sDate = ( DateTime.getMonth() + 1 ) + "/";
          sDate += DateTime.getDate() + "/";
          sDate += DateTime.getFullYear() + " ";
          sDate += DateTime.getHours() > 12 ? DateTime.getHours() - 12 : DateTime.getHours();
          sDate += ":" + DateTime.getMinutes();
          sDate += ":" + DateTime.getSeconds();
          sDate += ( DateTime.getHours() > 12 )? " PM" : " AM";
          ReturnValue = sDate;
          break;
        case 'long':
          ReturnValue += MonthsLong[DateTime.getMonth()] + ' ' + DateTime.getDate() + ', ' + DateTime.getFullYear();
          break;
      }
      return ReturnValue;
    };

    /*
     *  Function Prototypes
    */
    
    Function.prototype.add = function( a_NameSpace )
    {
      ///	<summary>
      ///   Creates a NameSpace object and assigns a new instance of the Function to it.
      ///	</summary>
      ///	<param name="a_NameSpace" type="String">
      ///   1: The NameSpace ID
      ///	</param>
      var NameChain = a_NameSpace.split( '.' );
      var ChainedObject = window;
      for( var c = 0; c < NameChain.length - 1; c++ )
      {
        ChainedObject = ( ChainedObject[NameChain[c]] )? ChainedObject[NameChain[c]] : ChainedObject[NameChain[c]] = {};
      }
      var NewObject = ChainedObject[NameChain[c]] = new this;
      if( NewObject.Init ){NewObject.Init();}
      if( NewObject.onLoad ){$( document ).ready( NewObject.onLoad );}
      NewObject.alive = true;
      NewObject.ns = a_NameSpace;
    };
    
    Function.prototype.Is = function( a_Object )
    {
      ///	<summary>
      ///   Compares tha passed Object's constructor to the Function and returns a boolean.
      ///	</summary>
      ///	<param name="a_Object" type="Object">
      ///   1: The Object to compare.
      ///	</param>
      ///	<returns type="Boolean">
      ///   1: True is the Object constructor is the same as the Function.
      /// </return>
      ReturnValue = false;
      try{ReturnValue = ( a_Object.constructor == this );}
      catch(e){}
      return ReturnValue;
    };

    Function.prototype.TypeOf = Function.prototype.Is;

    /*
     *  Number Prototypes
    */

    Number.prototype.toFixedDecimal = function( a_DecimalPoint )
    {
      ///	<summary>
      ///   Rounds the Number to the specified number of decimal places.
      ///	</summary>
      ///	<param name="a_DecimalPoint" type="Number">
      ///   1: Number of decimal points to round the number to.
      ///	</param>
      ///	<returns type="Number">
      ///   1: Rounded number or 0.00 if not a number.
      /// </return>
      var ThisValue = this;
      if( isNaN( ThisValue ) )
      {
        ThisValue = "0.00";
      }
      else
      {
        ThisValue = ThisValue.toFixed( a_DecimalPoint );
      }
      return ThisValue;
    };
    
    Number.prototype.toNum = function()
    {
      ///	<summary>
      ///   Converts a string to a number.
      ///   Added Number prototype for fail-over.
      ///	</summary>
      ///	<returns type="Number" />
      var ThisObject = this;
      return new Number( ThisObject );
    };

    /*
     *  String Prototypes
    */

    String.prototype.AbsoluteLink = function()
    {
      ///	<summary>
      ///   Converts a relative link to an absolute link.
      ///	</summary>
      ///	<returns type="Number">
      ///   1: The absolute link.
      /// </return>
      return document.location.protocol + "//" + location.host + this;
    }

    String.prototype.format = function()
    {
      ///	<summary>
      ///   Replaces {n} markers in the string passed strings.
      ///	</summary>
      ///	<param name="arguments" type="Object">
      ///   1: List of strings to use for replacement.
      ///	</param>
      ///	<returns type="String">
      ///   1: Modified string.
      /// </return>
      var ThisString = this;
      var Args = arguments;
      var FormatRegExp;
      for( var i = 0; i < Args.length; ++i )
      {
        ThisString = ThisString.replace( '{' + i + '}', Args[i] );
      }
      return ThisString;
    };
    
    String.prototype.Eq = function( a_CompareString )
    {
      ///	<summary>
      ///   Compares two strings. This is intended as a shortcut for certain instances.
      ///	</summary>
      ///	<param name="a_CompareString" type="String">
      ///   1: String to be compared.
      ///	</param>
      ///	<returns type="Boolean" />
      return ( this == a_CompareString )?true:false;
    }
    
    String.prototype.IsEmpty = function()
    {
      var ThisString = this;
      if( ThisString.trim() == '' )
      {
        return true;
      }
      return false;
    };
    
    String.prototype.isObject = function()
    {
      var ThisNS = this.split( '.' );
      var ReturnValue = true;
      var Base = window;
      for( var i = 0; i < ThisNS.length; i++ )
      {
        if( Base[ThisNS] )
        {
          Base = Base[ThisNS];
        }
        else
        {
          ReturnValue = false;
        }
      }
      return ReturnValue;
    }
    
    String.prototype.isPage = function()
    {
      return ( location.href.match( new RegExp( this, 'gi' ) ) )? true : false;
    }
    
    String.prototype.loadCSS = function()
    {
      $('HEAD').append( '<link rel="stylesheet" type="text/css" href="' + this + '" />' );
    };
    
    String.prototype.loadJS = Array.prototype.loadJS;
    
    String.prototype.localize = function()
    {
      var thisString = this;
      var URLMatch = thisString.match( /^(?:http[s]?\:\/\/)([^\/]+)(?:\/)/i );
      if( URLMatch )
      {
        thisString = thisString.replace( URLMatch[1], location.host );
      }
      return thisString;
    }
    
    String.prototype.ParseHTML = function()
    {
      var ThisString = this;
      ThisString = ThisString.replace( /\&lt\;/g, '<' );
      ThisString = ThisString.replace( /\&gt\;/g, '>' );
      return ThisString;
    };

    String.prototype.printDoc = function() {
      var ThisString = this;
      window.printData = ThisString;
      window.open( 'misc/print_doc.html', 'PrintWindow', 'left=0,top=0,height=500,width=600,resizable=yes,scrollbars=yes' );
    }

    String.prototype.Queue = Array.prototype.Queue;

    String.prototype.toNum = Number.prototype.toNum;

    String.prototype.trim = function()
    {
      return this.replace( /^\s+|\s+$/g, "" );
    };
  })();

  /*
   *
   *  File: moxi.js
   *  NameSpace: Moxi
   *  Description: Defines global methods, properties, and prototypes.
   *  Created: March 31, 2009
   *  Last Modified: November 9, 2009
   *  Design Document: 
   *  
  */
  ( function()
  {
    var ThisFunction = this;

    var LocSearch = location.search.substring( 1, location.search.length );
    var LocSearchParams = LocSearch.split( '&' );
    var pathName = location.pathname;
    var pathLength = ( pathName.indexOf( '?' ) > -1 )? pathName.indexOf( '?' ) : pathName.length;
    var fileName = pathName.substring( pathName.lastIndexOf( '/' ) + 1, pathLength  );

    ThisFunction.query = {};
    ThisFunction.query.all = LocSearch;
    for( var s = 0; s < LocSearchParams.length; s++ )
    {
      var Pair = LocSearchParams[s].split( '=' );
      ThisFunction.query[Pair[0]] = Pair[1];
    }

    ThisFunction.TrackEvent = function( a_TrackMetric )
    {
      ///	<summary>
      ///   Sends tracking information to Google Analytics.
      ///	</summary>
      ///	<param name="a_TrackMetric" type="String">
      ///   1: String: Metrics to send to Google. If Ommited the page URL is sent.
      ///	</param>
      var gid = ( Moxi.headers && Moxi.headers.ga && Moxi.headers.ga.id ) ? Moxi.headers.ga.id : "UA-5549466-1";
      if( gid != '0' )
      {
        try
        {
          if( !window.pageTracker )
          {
            window.pageTracker = _gat._getTracker( gid );
            window.pageTracker._setDomainName("none");
			window.pageTracker._setAllowLinker(true);
            
          }
          pageTracker._trackPageview( a_TrackMetric );
        }
        catch(e){}
      }
    }

    ThisFunction.SiteRoot = '/us/';
    ThisFunction.JSRoot = '/us/js/html/';
    ThisFunction.CSSRoot = '/us/css/html/';
    ThisFunction.IMGRoot = '/us/images/';
    ThisFunction.XMLRoot = '/us/xml/';
   
    window.Protocol = document.location.protocol;
    var gaJsHost = ( Protocol.Eq( "https:" ) )? "https://ssl." : "http://www.";
    
    var JSFileList = [];
    JSFileList.push( {src: gaJsHost + "google-analytics.com/ga.js" } );
    JSFileList.push( {src: ThisFunction.JSRoot + "jquery/jquery_moxi.js" } );
    JSFileList.push( {src: "/header_data_json.jsp?loginurl=/login.jsp&logouturl=/logout.jsp&activateurl=/account_activate.jsp&summaryurl=/account_summary.jsp&manageaddurl=/account_manage_add.jsp" } );
    JSFileList.push( {src: ThisFunction.JSRoot + "jquery/jquery_cookie.js" } );
    JSFileList.push( {src: ThisFunction.JSRoot + "jquery/dd_roundies.min.js" } );
    JSFileList.push( {src: ThisFunction.JSRoot + "moxi_boxi.js" } );
    JSFileList.push( {src: ThisFunction.JSRoot + "moxi_banners.js" } );
    JSFileList.push( {src: ThisFunction.JSRoot + "jquery/jquery.bannercycle.lite.js" } );
    JSFileList.loadJS();
    
    ThisFunction.Init = function()
    {
      document.cookie = 'cookieEnabled=true';
      window.cookiesEnabled = false;
    }

    ThisFunction.openChat = function()
    {
      if( ThisFunction.chatWindow )
      {
        ThisFunction.chatWindow.close();
      }
      ThisFunction.chatWindow = ThisFunction.window.open( '/chatpresales.jsp?title=Chat Live with our Customer Service Team', 'Chat', 'left=0,top=0,height=400,width=540,resizable=yes,scrollbars=yes' ); 
    };
    
    ThisFunction.window = {
      open:function( a_URL, a_WindowName, a_Options, a_Callback )
      {
        var URL = a_URL?a_URL:'';
        var WindowName = a_WindowName?a_WindowName:'';
        var Options = a_Options?a_Options:'';
        ThisFunction.window.callback = a_Callback;
        ThisFunction.window.object = window.open( URL, WindowName, Options );
      },
      onWindowOpen:function()
      {
        if( ThisFunction.window.callback )
        {
          ThisFunction.window.callback( ThisFunction.window.object );
        }
      }
    };
    
    ThisFunction.onLoad = function()
    {
      ( "https://static.getclicky.com/62734.secure.js" ).loadJS();
      ( 'Moxi.headers' ).Queue( function()
      {
      
        var ServerTime = Moxi.headers.server.time.getTime();
        var ComputerTime = ( new Date ).getTime();
        var TimeDiff = ComputerTime - ServerTime;
        setInterval( function()
        {
          var CurrentServerTime = new Date();
          CurrentServerTime.setTime( CurrentServerTime.getTime() - TimeDiff );
          Moxi.headers.server.time = CurrentServerTime;
        }, 1000 );
      
        var SignInLink = $( "#signin" );        var ActivateMoxiLink = $( "#activatemoxi" );
        var SupportLink = $( "#supportlink" );
        
        var MoxiHeaders = Moxi.headers;
        
        if( SignInLink.length )
        {
          SignInLink.text( ( MoxiHeaders.user.loggedin?"My Account":"Sign In") );
          SignInLink.attr( 'href', ( MoxiHeaders.user.loggedin?MoxiHeaders.summary.url:MoxiHeaders.login.url ) );
        }
        
        if( ActivateMoxiLink.length )
        {
          ActivateMoxiLink.text( ( MoxiHeaders.user.loggedin?"Sign Out":"Activate a Moxi" ) );
          ActivateMoxiLink.attr( 'href', ( MoxiHeaders.user.loggedin?MoxiHeaders.logout.url:MoxiHeaders.activate.url ) );
        }
        
        SupportLink.attr( 'href', MoxiHeaders.support.url );

        if( MoxiHeaders.chat && MoxiHeaders.chat.on )
        {
          var chatPages = ['faq.html'];
          if( chatPages.isMember( fileName ) )
          {
            $( '#content h2:first' ).after( '<div id="chat_button" class="chat_button"><a href="javascript:Moxi.openChat()"><span class="white_text">CHAT</span> WITH US</a> OR<br /></span>CALL US AT <span class="white_text">877-933-4430</span><br />Monday-Friday 8AM-5PM PT</div>' );
            $( '#content' ).css( 'padding-top', '40px' );
          }
          $( '#footer_chat_anchor' ).attr( 'href', 'javascript:Moxi.openChat()' );
          $( '.chatLink' ).css( 'display', 'inline' );
          $( '.contactLink' ).css( 'display', 'none' );
        }

        Moxi.TrackEvent();
        if( isDefined( window.onHeaderLoad ) && Function.Is( window.onHeaderLoad ) )
        {
          window.onHeaderLoad();
        }
      });

      var AdvertDisclaimer = "Certain current and/or future features/services provided by third-parties may contain advertising.";
      var CostDisclaimer = "Certain non-DVR services may be offered at additional cost."
      var TrialDisclaimer = "If you purchase a Moxi HD DVR and Moxi Mate bundle, you must return both products together to participate in this risk-free trial"	  
      var FeesDisclaimer = "Certain future services may be offered at additional cost.";
      var TivoDisclaimer = "TiVo cancellation fee equals $12.95 multiplied by the number of months remaining in your first year at the time of cancellation."
      var Tivo2Disclaimer = "TiVo also offers annual, three-year pre-pay and lifetime payment options without a monthly fee."  
      var FeaturesDisclaimer = "Third parties may require separate fees for their optional features."	
      var MoxiNetDisclaimer = "Not all websites will appear as they do on a computer." 
      var PlayonDisclaimer = "PlayOn software and third party content services sold separately. Twonky needed for Mac."
      var HardDriveDisclaimer = "HD DVR supports most DVR-certified eSATA external hard drives; sold separately."
      var MoxiMateDisclaimer = "The Moxi Mate does not tune to live TV at this time."
      var MoxiMatePlayonDisclaimer = "PlayOn Software must be purchased separately from MediaMall Technologies." 
      var ServicesDisclaimer = "Certain future services may be offered at additional cost; certain optional third-party features may be subject to third-party charges; certain third-party features may include advertising, but the main user interface and DVR-functions will not!" 
      var MoxiPlayonDisclaimer  = "The PlayOn Software and access to certain third-party video content (e.g., Netflix, Hulu and YouTube) will require separate purchase of a PlayOn software license available from MediaMall Technologies. Occasionally, ARRIS may provide a limited&ndash;time offer to obtain the first year&#39;s subscription to a PlayOn Software license at no additional cost when you purchase a Moxi HD DVR.";
      var Disclaimers = [];

      Disclaimers.push( {page:'faq.html', disclaimer:PlayonDisclaimer, indicator:'*'});
      Disclaimers.push( {page:'moxi_mate.html', disclaimer:MoxiMatePlayonDisclaimer, indicator:'**'});
      Disclaimers.push( {page:'moxi_dvr.html', disclaimer:HardDriveDisclaimer, indicator:'**'});
      Disclaimers.push( {page:'moxi_dvr.html', disclaimer:ServicesDisclaimer, indicator:'***'});
      Disclaimers.push( {page:'moxi_dvr.html', disclaimer:MoxiPlayonDisclaimer, indicator:'&dagger;'});
      Disclaimers.push( {page:'moxi_dvr_two_tuner.html', disclaimer:HardDriveDisclaimer, indicator:'**'});
      Disclaimers.push( {page:'moxi_dvr_two_tuner.html', disclaimer:ServicesDisclaimer, indicator:'***'});
      Disclaimers.push( {page:'moxi_dvr_two_tuner.html', disclaimer:MoxiPlayonDisclaimer, indicator:'&dagger;'});
      Disclaimers.push( {page:'moxi_two_room_bundle.html', disclaimer:HardDriveDisclaimer, indicator:'**'});
      Disclaimers.push( {page:'moxi_two_room_bundle.html', disclaimer:ServicesDisclaimer, indicator:'***'});
      Disclaimers.push( {page:'moxi_two_room_bundle.html', disclaimer:MoxiPlayonDisclaimer, indicator:'&dagger;'});
      Disclaimers.push( {page:'moxi_three_room_bundle.html', disclaimer:HardDriveDisclaimer, indicator:'**'});
      Disclaimers.push( {page:'moxi_three_room_bundle.html', disclaimer:ServicesDisclaimer, indicator:'***'});
      Disclaimers.push( {page:'moxi_three_room_bundle.html', disclaimer:MoxiPlayonDisclaimer, indicator:'&dagger;'});
      Disclaimers.push( {page:'moxi_multi_room_bundle.html', disclaimer:HardDriveDisclaimer, indicator:'**'});
      Disclaimers.push( {page:'moxi_multi_room_bundle.html', disclaimer:ServicesDisclaimer, indicator:'***'});
      Disclaimers.push( {page:'moxi_multi_room_bundle.html', disclaimer:MoxiPlayonDisclaimer, indicator:'&dagger;'});
      Disclaimers.push( {page:'tivo_vs_moxi.html', disclaimer:"Comparison based on standard rates, basic DVR services and remote for model HD DVR from cable providers.", indicator:'*'});
      Disclaimers.push( {page:'tivo_vs_moxi.html', disclaimer:CostDisclaimer, indicator:'&dagger;'});
      Disclaimers.push( {page:'monthly_fees.html', disclaimer:TivoDisclaimer, indicator:'*'});
      Disclaimers.push( {page:'monthly_fees.html', disclaimer:Tivo2Disclaimer, indicator:'&dagger;'});
      Disclaimers.push( {page:'monthly_fees.html', disclaimer:FeaturesDisclaimer, indicator:'&dagger;&dagger;'});
      Disclaimers.push( {page:'features.html', disclaimer:MoxiNetDisclaimer, indicator:'*'});
      Disclaimers.push( {page:'moxi_challenge.html', disclaimer:TrialDisclaimer, indicator:'*'});
      Disclaimers.push( {page:'moxi_challenge.html', disclaimer:FeesDisclaimer, indicator:'**'});
      Disclaimers.push( {page:'internet_connectivity.html', disclaimer:PlayonDisclaimer, indicator:'**'});

      var InsertDisclaimers = '';
      
      for( var i = 0; i < Disclaimers.length; i++ )
      {
        if( Disclaimers[i].page.isPage() )
        {
          InsertDisclaimers +=  '<div style="margin:0 0 6px 0;">' + Disclaimers[i].indicator + ' ' + Disclaimers[i].disclaimer + '</div>';
        }
      }
      $( '#disclaimer_text' ).append( InsertDisclaimers );
    
      if( document.cookie != '' )
      {
        window.cookiesEnabled = true;
      }

      var TractionIMGSrc = ( "http{0}://ad.yieldmanager.com/pixel?id=523573&t=2" ).format( ( ( Protocol.Eq( "https:" ) )? "s" : "" ) );
      $( 'BODY' ).append( '<img src="' + TractionIMGSrc + '" width="1" height="1" />' );

      var Hash = location.hash.substring( 1, location.hash.length );
      if( Hash && Hash == 'reload' && !$.cookie( 'hash_reload' ) )
      {
        $.cookie( 'hash_reload', 'true' );
        location.reload( true );
      }
      else if( Hash )
      {
        $.cookie( 'hash_reload', null );
        var HashParts = Hash.split( '.' );
        var Base = window.Moxi;
        for( var i = 0; i < HashParts.length; i++ )
        {
          if( Base[HashParts[i]] )
          {
            Base = Base[HashParts[i]];
          }
        }
      }

      ( 'DD_roundies' ).Queue( function()
      {
        if( !( 'home.html' ).isPage() && !( 'offer.html' ).isPage() )
        {
          DD_roundies.addRule( "#content", "0 0 8px 8px", true );
        }
        DD_roundies.addRule( "#subscribe_submit", "4px", true );
        DD_roundies.addRule( ".submenu_last", "0 0 8px 8px", true );
      });

      if( $.browser.msie && $.browser.version == '6.0' )
      {
        $( 'A' ).fixIE6Links();
      }
      
      $( 'INPUT[id^=redirect_]' ).each(function()
      {
        this.value = this.value.localize();
      });

      var Selects = document.getElementsByTagName( 'select' );
      for( var s = 0; s < Selects.length; s++ )
      {
        Selects[s].valueOf = Selects[s].valueof = function()
        {
          var ValueOf = ( this.options[this.selectedIndex].value == null )? '' : this.options[this.selectedIndex].value;
          return { text: this.options[this.selectedIndex].text, value: ValueOf };
        }
      }
    }

  }).add( 'Moxi' );