// JavaScript Document

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

//alert('top ' + top.location + '\nself ' + self.location);
var mcgPathname = location.search.replace('?','&')+location.hash;
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));
	location.replace("/index.php?page="+encodeURI(location.pathname+mcgPathname));
}else{
	if (domain=top.location.href){ // this will normally be denied so the onerror will fire
		tabdomain=domain.split('\/');
		if(tabdomain[2].search("sunstarfrance") == -1) { // if the top frame isn't the correct domain
//			top.location.replace("http://www.womenspgopen.org/index.php?page="+escape(location.pathname));
			top.location.replace("http://www.sunstarfrance.com/index.php?page="+encodeURI(location.pathname+mcgPathname));
		}
	}
}


