var errorname = errorElements.item(0).textContent || errorElements.item(0).text;\r
if (errorname === "class javax.faces.application.ViewExpiredException") {\r
var newloc = window.location.protocol + "//" + window.location.host + window.location.pathname.replace(/;jsessionid.*/,'');\r
var errorname = errorElements.item(0).textContent || errorElements.item(0).text;\r
if (errorname === "class javax.faces.application.ViewExpiredException") {\r
var newloc = window.location.protocol + "//" + window.location.host + window.location.pathname.replace(/;jsessionid.*/,'');\r