function submitForm(s)  {
s.value = "Processing";
return true;
}
ftext = "";
htext="";
dtext="";
ptext="";
etext="";
function TestPass() {
msg = "";
proc = 0;
htext=document.forms[0].head.value;
if (htext == "") {msg = ' a Heading,\n'; proc++;}
dtext=document.forms[0].details.value;
if (dtext == "") {msg = msg+' the Details,\n'; proc = (proc+2);}
ptext=document.forms[0].phone.value;
etext=document.forms[0].email.value;
if (ptext == '' && etext == '') {msg = msg+' a Phone or Email,\n'; proc++;}

ftext=document.forms[0].pass.value;
if (ftext == '') {msg = msg+' a Password\n'; proc++;}
if (proc > 0) {msg = 'Please enter:\n'+msg;}

if (proc > 0) {ErrorMsg(msg); document.forms[0].elements["pass"].focus();} 

if (proc == 0) {document.forms[0].submit(); process.innerHTML='<b>Please Wait, Processing<\/b>';}
}
function ErrorMsg(msg) {
window.alert(msg); 
}
maxlen = 800;
function CountText() {
ftext=document.forms[0].details.value;
var flen = (ftext.length+1);
if (flen > maxlen) {document.forms[0].details.value=ftext.substring(0,maxlen); ErrorMsg('Please shorten the Details.');}
}
