function OpenRegisterDlg(){OpenDialog(280,360,"Register").innerHTML='\t\t
\t\t\t
\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
Username:
E-mail:

Please choose a password:
Password:
Verify:
\t\t\t\t\t\t\t\t

Add optional extra information
 
\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t
\t\t
'; return false} function OpenExtraInfoDialog(){OpenDialog(400,300,"Optional information").innerHTML='\t\t
\t\t\t
\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

Optional information:
Full name:
City:
I am:
Telephone No.:
\t\t\t\t
\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t
\t\t
';ExtraInfoTransfer(GetElem("regForm"), GetElem("extraInfoForm"));return false}function CopyExtraInfo(){ExtraInfoTransfer(GetElem("extraInfoForm"),GetElem("regForm"));CancelDialog()}function ExtraInfoTransfer(a,b){b.tel.value=a.tel.value;b.organisationType.value=a.organisationType.value;b.fullname.value=a.fullname.value;b.city.value=a.city.value}var regProgressDlg=null; function regUser(){var a=GetElem("regForm");if(checkPasses(a)){var b=a.pass1.value,c=a.username.value,d=a.fullname.value,e=a.city.value,f=a.auto.checked?a.auto.value:0,g=a.newsletter.checked?a.newsletter.value:0,h=a.organisationType.value,i=a.email.value;a=a.tel.value;regProgressDialog=OpenDialog(300,160,"Processing");regProgressDialog.innerHTML='\t\t\t
\t\t\t\t
\t\t\t\t\tPlease wait... contacting server\t\t\t\t


\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t
'; b="library/newuser.php?op=AddUser&username="+encodeURIComponent(c)+"&pass="+encodeURIComponent(b)+"&email="+encodeURIComponent(i)+"&auto="+encodeURIComponent(f)+"&newsletter="+encodeURIComponent(g)+"&organisationType="+encodeURIComponent(h)+"&tel="+encodeURIComponent(a)+"&fullname="+encodeURIComponent(d)+"&city="+encodeURIComponent(e);RequestURL(b,null,"RegReceiveData",ReceiveRegData)}}function Refresh(){location.href+=""} function ReceiveRegData(){var a=GetElem("regProgressState"),b=GetElem("regProgressCloseBtn"),c=GetElem("RegReceiveData");if(c&&c.childNodes.length&&c.childNodes[0].getAttribute){c=c.childNodes[0];a.innerHTML=c.getAttribute("html");if(c.getAttribute("result")=="1")b.onclick=Refresh}else a.innerHTML="Failure contacting server.";b.disabled=false} function checkPasses(a){if(a.pass1.value!=a.pass2.value){alert("Passwords do not match!");return false}if(a.username.value.length<2){alert("Username not long enough! (min 2 characters)");return false}if(a.email.value.length<2)if(!confirm("No e-mail address entered - you will not be able to receive newsletters or receive responses to messages you send on this site... is this ok?"))return false;return true};