var sb={
	tags: [], //this sets up a place holder for the tags
	domain: "",
	https: false,
	url: "tag/tag.php",
	v_id: 0,

	ScriptTag: null,
	SetTags: function() {
		if (this.https) {
			this.url="https://"+this.domain+"/"+this.url;
		} else {
			this.url="http://"+this.domain+"/"+this.url;
		}
		
		if (this.tags!=null && this.tags.length>0) {
			this.url+="?";
			for (i=0; i<this.tags.length; i++) {
				this.url+="tags[]="+this.tags[i]+"&";
			}
			this.url += "id="+this.id ;
			if( this.cv ) {
				this.url += "&cv="+this.cv ;
			}
			if (this.v_id>0) {
				this.url+="&v_id="+this.v_id;
			}
			this._SendTags();
		} else {
			return false;
		}
	},
	
	SetTagsList: function(sbtagslist) {
		var CurPath=window.location.pathname+window.location.search;
                CurPath=CurPath.replace(/\s/g, "");

		for (domain in sbtagslist) {
			var domain_tags={};
			var sbtagslist_domain=sbtagslist[domain];
			for (path in sbtagslist_domain) {
				var sbtagslist_domain_path=sbtagslist_domain[path];
                                path=path.replace(/\s/g, "");
				if (CurPath.indexOf(path)>=0) {
					for (i=0; i<sbtagslist_domain_path.length; i++) {
						domain_tags[sbtagslist_domain_path[i]]=1;
					}					
				}
			}
			for (tag in domain_tags) {
				this.tags=this.tags.concat(tag);
			}
			this.domain=domain;
			this.SetTags();
			this._ResetObj();
		}
	},
	
	_ResetObj: function() {
		this.url="tag/tag.php";
		this.tags=[];
		this.ScriptTag=null;
	},
	
	_SendTags: function() {
		var e = document.createElement("script");
		e.src=this.url;
		e.type="text/javascript";
		this.ScriptTag=e;   
		document.getElementsByTagName("head")[0].appendChild(e);
	},
	
	_CleanUp: function() {}
}

var sbtagspaths={
	'/merchant-account-credit-card-processing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Merchant Account Credit Card Processing','MS Shopper'],
	'/credit-card-processing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Credit Card Processing','MS Shopper'],
	'/?launchHelpMeChoose=true'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Launch Help Me Choose','MS Shopper'],
	'/about-us/'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS About Us'],
	'/about-us/affiliate.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Affiliate'],
	'/apply-now/call-back.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Apply Now Call Back','MS Shopper'],
	'/apply-now/thankyou-cm.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Apply Now Thank You','MS Shopper'],
	'/contact-us.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Contact Us','MS Shopper'],
	'/products/'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Products'],
	'/products/basic-payment-solutions/'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Products Basic Payment Solutions','MS Shopper'],
	'/products/quickbooks-payment-solutions/'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Products Quickbooks Payment Solutions','MS Shopper'],
	'/products/quickbooks-payment-solutions/credit-card-processing-services.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS QB Payment Solutions Credit Card Processing Services','MS Shopper'],
	'/products/quickbooks-payment-solutions/online-credit-card-processing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS QB Payment Solutions Online Credit Card Processing','MS Shopper'],
	'/products/quickbooks-payment-solutions/point-of-sale-system.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS QB Payment Solutions POS Systems','MS Shopper'],
	'/products/quickbooks-payment-solutions/point-of-sale-solutions.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS QB Payment Solutions POS Solutions','MS Shopper'],
	'/products/quickbooks-payment-solutions/web-credit-card-processing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS QB Payment Solutions Web Credit Card Processing','MS Shopper'],
	'/products/basic-payment-solutions/e-check-processing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Basic Payment Solutions E Check Processing','MS Shopper'],
	'/products/basic-payment-solutions/check-processing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Basic Payment Solutions Check Processing','MS Shopper'],
	'/products/basic-payment-solutions/credit-card-processing-equipment.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Basic Payment Solutions Credit Card Processing Equipment','MS Shopper'],
	'/products/basic-payment-solutions/quicken-merchant-services.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Basic Payment Solutions Quicken Merchant Services','MS Shopper'],
	'/apply-now/'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Apply Now','MS Shopper','MS Shopper'],
	'/support/'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Support'],
	'/support/glossary.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Support Glossary'],
	'/support/faqs.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Support FAQs'],
	'/support/pci-resources.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Support PCI Resources'],
	'/support/change-request-forms.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Support Change Request Forms'],
	'/support/start-using.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Support Start Using'],
	'/pricing/'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Pricing','MS Shopper'],
	'/pricing/pricing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Price Comparison','MS Shopper'],
	'/demos/'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Demos','MS Shopper'],
	'/feedback.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Feedback','MS Shopper'],
	'/industry/ecommerce-credit-card-processing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Industry Ecommerce Credit Card Processing','MS Shopper'],
	'/industry/credit-card-processing-retailers.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Industry Retailers Credit Card Processing','MS Shopper'],
	'/industry/credit-card-processing-restaurants.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Industry Restaurants Credit Card Processing','MS Shopper'],
	'/industry/credit-card-personal-services.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Industry Personal Services Credit Card Processing','MS Shopper'],
	'/industry/credit-card-processing-trades.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Industry Trades Credit Card Processing','MS Shopper'],
	'/industry/credit-card-processing-manufacturing.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Industry Manufacturing Credit Card Processing','MS Shopper'],
	'/industry/credit-card-processing-nonprofit.jsp'	:	['WEB-Universal Hit','WEB-IPS','WEB-IPS Industry Nonprofit Credit Card Processing','MS Shopper']
}

/** Pixel Library Created on 03/11/09 for payments.intuit.com
 *
 *  Incluse client : 
 *
 *  600 - ww2.paymentsolutions.intuit.com
 *	600 - m360.quickbooksmerchantservice.com
 *
 *  793 - ww2.paymentsolutions.intuit.com
 *	793 - m360.quickbooksmerchantservice.com 
 *
 *  963 - www.ims4me.com	
 *
 *  1003 - www.quickbooksinsider.com
 *
 */
 
 
/**
 *  600 - ww2.paymentsolutions.intuit.com
 *	600 - m360.quickbooksmerchantservice.com
 */
sb.id=600;
sb.cv="n";
var sbtagslist= {
	"ww2.paymentsolutions.intuit.com" : sbtagspaths,
	"m360.quickbooksmerchantservice.com" : sbtagspaths
}
sb.SetTagsList(sbtagslist);

/**
 *  793 - ww2.paymentsolutions.intuit.com
 *	793 - m360.quickbooksmerchantservice.com
 */
sb.id=793;
sb.cv="n";
var sbtagslist= {
	"ww2.paymentsolutions.intuit.com" : sbtagspaths,
	"m360.quickbooksmerchantservice.com" : sbtagspaths
}
sb.SetTagsList(sbtagslist);


/**
 * 963 - www.ims4me.com
 */
sb.id=963;
sb.cv="n";
var sbtagslist= {
	"www.ims4me.com" : sbtagspaths
}
sb.SetTagsList(sbtagslist);

/**
 * 1003 - www.quickbooksinsider.com
 */
sb.id=1003;
sb.cv="n";
var sbtagslist= {
	"www.quickbooksinsider.com" : sbtagspaths
}
sb.SetTagsList(sbtagslist);