function validateSingleDestination(theForm,formNum,bRequired) { var gotoType = theForm.elements[ 'goto'+formNum ].value; if (bRequired && gotoType == '') { alert('Please select a Destination'); return false; } else { // check the 'custom' goto, if selected if (gotoType == 'custom') { var gotoFld = theForm.elements[ 'custom'+formNum ]; var gotoVal = gotoFld.value; if (gotoVal.indexOf('custom-') == -1) { alert('Custom Goto contexts must contain the string "custom-". ie: custom-app,s,1'); gotoFld.focus(); return false; } } } return true; } function randomPassword(length) { chars = ".-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRSTUVWXYZ1234567890"; pass = ""; for(x=0;x