var StrutsUtils={};StrutsUtils.getValidationErrors=function(data){if(data.indexOf("/* {")===0){return eval("( "+data.substring(2,data.length-2)+" )")}else{return null}};StrutsUtils.clearValidationErrors=function(a){var b=StrutsUtils.firstElement(a);var c=b.tagName.toLowerCase()==="table";if(c){clearErrorMessagesXHTML(a);clearErrorLabelsXHTML(a)}else{clearErrorMessagesCSS(a);clearErrorLabelsCSS(a)}if(StrutsUtils.errorLists[a]&&StrutsUtils.errorLists[a]!==null){a.parentNode.removeChild(StrutsUtils.errorLists[a]);StrutsUtils.errorLists[a]=null}};StrutsUtils.errorLists=[];StrutsUtils.showValidationErrors=function(c,g){StrutsUtils.clearValidationErrors(c,g);if(g.errors){var e,d=document.createElement("ul");d.setAttribute("class","errorMessage");d.setAttribute("className","errorMessage");for(e=0;e<g.errors.length;e++){var k=document.createElement("li");var h=document.createTextNode(g.errors[e]);k.appendChild(h);d.appendChild(k)}c.parentNode.insertBefore(d,c);StrutsUtils.errorLists[c]=d}var f,j,b=StrutsUtils.firstElement(c);
var a=b.tagName.toLowerCase()==="table";if(g.fieldErrors){for(j in g.fieldErrors){if(g.fieldErrors.hasOwnProperty(j)){for(f=0;f<g.fieldErrors[j].length;f++){if(a){addErrorXHTML(c.elements[j],g.fieldErrors[j][f])}else{addErrorCSS(c.elements[j],g.fieldErrors[j][f])}}}}}};StrutsUtils.firstElement=function(a,b){var c=a.firstChild;while(c&&c.nodeType!==1){c=c.nextSibling}if(b&&c&&c.tagName&&c.tagName.toLowerCase()!==b.toLowerCase()){c=StrutsUtils.nextElement(c,b)}return c};StrutsUtils.nextElement=function(b,a){if(!b){return null}do{b=b.nextSibling}while(b&&b.nodeType!==1);if(b&&a&&a.toLowerCase()!==b.tagName.toLowerCase()){return StrutsUtils.nextElement(b,a)}return b};StrutsUtils.previousElement=function(b,a){if(!b){return null}if(a){a=a.toLowerCase()}do{b=b.previousSibling}while(b&&b.nodeType!==1);if(b&&a&&a.toLowerCase()!==b.tagName.toLowerCase()){return StrutsUtils.previousElement(b,a)}return b};StrutsUtils.addOnLoad=function(a){var b=window.onload;if(typeof window.onload!=="function"){window.onload=a}else{window.onload=function(){b();
a()}}};StrutsUtils.addEventListener=function(d,c,b,a){if(d.addEventListener){d.addEventListener(c,b,false)}else{if(d.attachEvent){d.attachEvent("on"+c,b)}}};
