
	function iFrameFix() {
		this.local = self.location.toString();
		this.new_url = '';
	}
	
	iFrameFix.prototype.fix = function() {
	
		var parts = this.local.split('/');
		this.new_url = '/?';
		var add = false;
		for (var i = 0; i < parts.length; i++) {
			if (parts[i] == 'pages') {
				add = true;
			}
			if (add) {
				this.new_url += parts[i] + '/';
			}
		}
		this.new_url = this.new_url.substring(0, (this.new_url.length - 1));
		self.location.replace(this.new_url);
	}

if (top.location == self.location) {
	var fix = new iFrameFix();
	fix.fix();
}