//***************************************************************************
// Ensure the page is called properly - as an ASPX under /personal-insurance
//***************************************************************************
if (document.getElementById('pfs_base') == null) {  
  var path = location.pathname.toLowerCase();

  var newLoc = "";
  // Ensure the suffix is correct.
  if (path.substring(path.lastIndexOf("/")) == "/") {
	// building the default page in the directory - this is not guaranteed to be index.aspx
	newLoc = location.pathname + "index.aspx";
  } else if (path.substring(path.lastIndexOf(".")) != ".aspx") {
	// Since we are not targeting a directories default page, assume the requested page has an extension
	// This check will throw an exception if there is no "." in the pathname, although this should never happen.
	newLoc = location.pathname.substring(0, path.lastIndexOf(".")) + ".aspx";
  }
  // Ensure the prefix is correct
  if (path.indexOf("/personal-insurance/") != 0) {
	if (newLoc.length == 0) {
		// The suffix is correct, use the current path
		newLoc = location.pathname;
	}
	// prefix with /personal-insurance
	newLoc = "/personal-insurance" + newLoc;
  }
  // Redirect if we have an updated location
  if (newLoc.length > 0) {
  	top.location = "http://www.travelers.com" + newLoc + location.search + location.hash;
  }
}


/* Email Page */
  function emailPage() {
	
	window.location = "mailto:"+"?subject=Information from Travelers" + "&body=I thought this information might interest you.  You can view it at: "+"  "+window.location+" ";

  }