// JavaScript Document

//window.onerror = err_handler;
function err_handler (msg, url, line) {						// Define the error handler
	top.location = "http:/www.flyager.com/index.php?page="+escape(location.pathname);
	return true;										// Do nothing (disallow warning dialog)
}

if (self == top && (self.location.replace)) {  // this will load the top frame if it doesn't exist
	location.replace("/index.php?page="+escape(location.pathname));
}else{
	if (domain=top.location.href){ // this will normally be denied so the onerror will fire
		tabdomain=domain.split('\/');
		if(tabdomain[2].search("flyager") == -1) { // if the top frame isn't the correct domain
			top.location.replace("http://www.flyager.com/index.php?page="+escape(location.pathname));
		}
	}
}
//alert(escape(location.pathname));
