/**
* New Javascript classes
**/
var RC = {

  Pricing: {

    expandRelated: function(iMenuId, iTopicId, iCategoryId, iItemId, sKeyword, iFeedCatType, sFeedCatId) {
      var sUrl = 'http://'+rcCfg.HTTP_HOST+'/modules/expandRelated.php?kwd='+encodeURIComponent(sKeyword)+'&menuId=' +iMenuId+'&topicId='+iTopicId+'&catId='+iCategoryId+'&itemId='+iItemId+'&expand=1';
      sUrl += '&fct='+iFeedCatType+'&fci='+sFeedCatId;
      req = loadXMLDoc(sUrl, RC.Pricing.expandCollpaseRelatedCallback, false, true);
    },
    
    collapseRelated: function(iMenuId, iTopicId, iCategoryId, iItemId, sKeyword, iFeedCatType, sFeedCatId) {
      var sUrl = 'http://'+rcCfg.HTTP_HOST+'/modules/expandRelated.php?kwd='+encodeURIComponent(sKeyword)+'&menuId=' +iMenuId+'&topicId='+iTopicId+'&catId='+iCategoryId+'&itemId='+iItemId+'&collapse=1';
      sUrl += '&fct='+iFeedCatType+'&fci='+sFeedCatId;
      req = loadXMLDoc(sUrl, RC.Pricing.expandCollpaseRelatedCallback, false, true);
    },
    
    expandCollpaseRelatedCallback: function() {
      if (req.readyState == 4){
        if (req.status == 200){
          PRdoc = req.responseText;
          var pit = getById('pr1');
          if(!pit){    return;  }
          pit.innerHTML=PRdoc;
          var objScroll = getById('pr1');
          scroll(0, getOffsetTop(objScroll));
          /**
          * Allow the linkify code to do it's stuff
          **/
          setLinks();
        }
      }
    }
  },
  
  Track: {
  	sTrackingBreadcrumb: null,
  	
  	click: function(sTrackingLabel) {
      if (sTrackingLabel != null && this.sTrackingBreadcrumb != null) {
        // Google analytics tracking
        try {
          pageTracker._trackEvent(sTrackingLabel, 'Click', this.sTrackingBreadcrumb);
        } catch (oException) {
          // Do nothing
        }
      }
    }
  }
}