	if (top == self) {
		var href = location.href;
		if (href.indexOf('/pages') != -1 || href.indexOf('\pages') != -1) {
			if (href.indexOf('/pages') != -1)
				sp = href.split('/pages')
			else if (href.indexOf('\pages') != -1)
				sp = href.split('\pages')
			top.location.href = sp[0]+"/index.html?page="+escape(location.href);
		}
	}
	
	if (window.addEventListener) {
		window.addEventListener("load",f_onload,false);
	} else if (window.attachEvent) {
		window.attachEvent("onload",f_onload);
	} else {
		window.onload = function() {f_onload();}
	}

	if (window.addEventListener) {
		window.addEventListener("unload",f_onunload,false);
	} else if (window.attachEvent) {
		window.attachEvent("onunload",f_onunload);
	} else {
		window.onunload = function() {f_onunload();}
	}

	function f_onload() {
		if (top != self && parent.name == 'body') {
			parent.pageChange();
			parent.f_onresize_();
			top.setHistory(location.href);
		}
	}
	
	function f_onunload() {
		if (top != self) {
			top.saveScroll();
		}
	}
	