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={
	'/index.php' : ['WEBTAG - Control - HomePage'],
	'/find/index.php' : ['WEBTAG - Find - Listing Page'],
	'/requestinfo/index.php' : ['WEBTAG - Request Info - Lead Capture'],
	'/requestinfo/error.php' : ['WEBTAG - Request Info - Error'],
	'/requestinfo/errorDup.php' : ['WEBTAG - Request Info - ErrorDup'],
	'/requestinfo/thankyou.php' : ['WEBTAG - Request Info - Thank You Page'],
	'/schools/' : ['WEBTAG - Schools - Profile Page']
}

/** Pixel Library Created on 06/15/09 by magnify360 
 */
 
 
/**
 * ww2.beautyschoolsdirectory.com
 */
sb.id=1191;
sb.cv="n";
var sbtagslist= {
	"ww2.beautyschoolsdirectory.com" : sbtagspaths
}
sb.SetTagsList(sbtagslist);