function ReloadFrames() {
	if (window.parent!=null) {
		window.parent.location="index.asp?url=" + escape(window.parent.location.href);
	} else {
		location.href="index.asp?url=" + escape(location.href);
	}
}

function CheckAndRedirectHome(){

	if (window.parent!=null) {
		if (window.parent.frames[0]!=null) {
			if (window.parent.frames[0].name!="mainFrame") {
				ReloadFrames();
			}
		} else {
			ReloadFrames();
		}
	} else {
		ReloadFrames();
	}
}
