function setToDefault(ID,defaultVal){if(!document.getElementById(ID).value){if(defaultVal&&defaultVal.length){setTo=defaultVal}else{setTo=document.getElementById(ID).defaultValue}document.getElementById(ID).value=setTo;document.getElementById(ID).style.color="silver"}}function clearDefault(ID,defaultVal){if(defaultVal&&defaultVal.length){checkOn=defaultVal}else{checkOn=document.getElementById(ID).defaultValue}if(document.getElementById(ID).value==checkOn){document.getElementById(ID).value="";document.getElementById(ID).style.color="black"}}function flashMessage(){setTimeout("setMessageColor('#CCFF99')",1000);setTimeout("setMessageColor('#D9FFB3')",2000)}function setMessageColor(color){if(document.getElementById("messageContent")){document.getElementById("messageContent").style.backgroundColor=color}}function setMessage(message){document.getElementById("messageContent").innerHTML=message;setMessageColor("#CCFF00");flashMessage()}function hide(divID){document.getElementById(divID).style.display="none"}function show(divID){document.getElementById(divID).style.display=""}function swapShowHide(divID){if(document.getElementById(divID).style.display=="none"){show(divID)}else{hide(divID)}}function saveSupport(){var url="/index.cfm?event=feedback.support";if(!document.getElementById("supportHelpWith").value){alert("Please select what you would like help with");return }var send="supportText="+escape(document.getElementById("supportText").value)+"&email="+document.getElementById("supportEmail").value+"&supportHelpWith="+escape(document.getElementById("supportHelpWith").value)+"&machiiInfo="+escape(document.getElementById("machiiInfo").value);document.getElementById("supportDiv").innerHTML="<br>Saving...";postForm(url,send)}function postForm(url,sendStr){if(window.XMLHttpRequest){req=new XMLHttpRequest()}else{if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP")}else{alert("save not authorized")}}if(req){req.onreadystatechange=processFeedback;req.open("POST",url);req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");req.send(sendStr)}else{alert("No req")}}function processFeedback(){if(req.readyState==4){if(req.status==200){document.getElementById("supportDiv").innerHTML=req.responseText}else{alert("There was a problem retrieving data:\n"+req.statusText)}}}var loggedOutNotifier=function(){alert("Your session has timed out.  Please either:\n\n- click on logout in the top right corner and start again.\n\n- or if you are in the middle of a task: 1) open a new window or tab 2) go to interfolio.com 3) log in 4) close new window or tab and return to this window/tab.")};function trimAll(sString){while(sString.substring(0,1)==" "){sString=sString.substring(1,sString.length)}while(sString.substring(sString.length-1,sString.length)==" "){sString=sString.substring(0,sString.length-1)}return sString}function validateEmail(str){return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(str)};
