function Page(url, href) {
	this.url = url;
	this.href = href;
}

function PageTracker() {
	this.currentPage = '';
	this.pages = new Array();
	this.timer = new Timer(this);
}

PageTracker.prototype.addPage = function(url, href) {
	this.pages.push(new Page(url, href));
}

PageTracker.prototype.checkPage = function() {
	var hrefPage = $(window).attr('location').toString().split('#')[1];
	if (hrefPage != this.currentPage) {
		for(var i = 0; i < this.pages.length; i++) {
			var page = this.pages[i];
			if(page.href == hrefPage) {
				loadContent(page.url, page.href);
				this.updateCurrentPage();
				return true;
			}
		}
	}
	return false;
}

PageTracker.prototype.updateCurrentPage = function() {
	this.currentPage = $(window).attr('location').toString().split('#')[1];
}

PageTracker.prototype.poll = function() {
	this.checkPage();
	this.timer.setTimeout('poll();', 200, this.updateCurrentPage());
}

