self.onerror = null;

if (self.document.location.href == top.document.location.href)
{
    self.location.href = "default.asp?doc=" + self.document.location.href;
}
