//***************************************************************************
// Ensure the page is called properly - as an ASPX under /corporate-info
//***************************************************************************
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("/corporate-info/") != 0) {
	if (newLoc.length == 0) {
		// The suffix is correct, use the current path
		newLoc = location.pathname;
	}
	// prefix with /corporate-info
	newLoc = "/corporate-info" + 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+" ";

  }
  
  var ContactUsPopUpWin = null;
  function OpenContactUsWindow(ContactUsPopUpPageURL,ContactUsPopUpWinName,ContactUsPopUpWinValues) 
  {
  if (ContactUsPopUpWin != null) closeContactUsPopUpWin();
  ContactUsPopUpWin = window.open (ContactUsPopUpPageURL,ContactUsPopUpWinName,ContactUsPopUpWinValues);
  ContactUsPopUpWin.opener.top.name="opener";
  ContactUsPopUpWin.focus();
  }
  
  function closeContactUsPopUpWin() 
  {
  if (ContactUsPopUpWin && ContactUsPopUpWin.open && !ContactUsPopUpWin.closed) ContactUsPopUpWin.close();
  }
