function countText(formName,textAreaName,counterName,maxLength,hiddenMessageText){currentLength=eval("document."+formName+"."+textAreaName+".value.length");if(hiddenMessageText&&currentLength!=maxLength){eval("document."+formName+'.elements["'+hiddenMessageText+'"].value = '+currentLength);}if(currentLength>=maxLength){eval("document."+formName+"."+textAreaName+".value = document."+formName+"."+textAreaName+".value.substr( 0, "+maxLength+")");}eval("document."+formName+"."+counterName+".value = "+maxLength+" - document."+formName+"."+textAreaName+".value.length");}function changeUrl(form,newFormAction,selectOptionToChangeOn,optionSelected){alert("current form action: "+form.action);alert("new form action: "+newFormAction);alert("selectOptionToChangeOn = "+selectOptionToChangeOn);alert("optionSelected = "+optionSelected);if(selectOptionToChangeOn==optionSelected){form.action=newFormAction;alert("current form action: "+form.action);form.submit();}}function defaultTreeItem(divId,childDivId){collapseExpand(divId);if(childDivId!="null"&&childDivId!="childDiv"){if(document.getElementById(childDivId)!=null){document.getElementById(childDivId).style.fontWeight="bold";}}}function collapseExpand(divId){var styleClassName="";if(divId!="null"&&divId!="subDiv"){var mainDivId="mainDiv"+divId;if(document.getElementById(divId)!=null){if(document.getElementById(divId).style.display=="block"){document.getElementById(divId).style.display="none";if(document.getElementById(mainDivId).className=="first contract"){styleClassName="first expand";}else{if(document.getElementById(mainDivId).className=="last contract"){styleClassName="last expand";}else{styleClassName="expand";}}document.getElementById(mainDivId).className=styleClassName;}else{document.getElementById(divId).style.display="block";if(document.getElementById(mainDivId).className=="first expand"){styleClassName="first contract";}else{if(document.getElementById(mainDivId).className=="last expand"){styleClassName="last contract";}else{styleClassName="contract";}}document.getElementById(mainDivId).className=styleClassName;}}}}function setUserAgent(userAgentVar){if(userAgentVar!=null){userAgentVar.value=navigator.userAgent;}}function submitWebServicesForm(form,formName){var eventName=eval("document."+formName+".eventName.value");var selectedValue=eval("document."+formName+".emailSubject.value");if(eventName=="passwordHelp"&&selectedValue!="Password / Site Login"){form.action="/contactAA/forwardPasswordHelpFormSubmit.do?eventName=passwordHelp&forwardForm=true";form.submit();}else{if(eventName=="webServices"&&selectedValue=="Password / Site Login"){form.action="/contactAA/forwardWebServicesFormSubmit.do?eventName=webServices&forwardForm=true";form.submit();}}}
