<script>function SenRegisterAjax(){
var regload=document.getElementById('RegLoad'),
reguser=document.getElementById('RegUsername').value,
regpass=document.getElementById('RegPassword').value,
regrepass=document.getElementById('RegRepassword').value,
regemail=document.getElementById('RegEmail').value,
regname=document.getElementById('RegName').value,
regcapt=document.getElementById('RegCapt').value,
address='/Register_Ajax?f_register=1&757365726E616D65='+reguser+''+
'&70617373776F7264='+regpass+'&726570617373776F7264='+
''+regrepass+'&email='+regemail+'&name='+
''+encodeURIComponent(regname)+'&capt='+regcapt,
xhttp=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
regload.innerHTML='<center><img src="http://up.3nafari.ir/up/3nafari/theme3/img/load2.gif" width="30" height="30" style="vertical-align:middle;">'+
' در حال ثبت نام در سایت...<\/center>';
xhttp.onreadystatechange=function(){
if(xhttp.readyState==4 && xhttp.status==200)
regload.innerHTML=xhttp.responseText;
}
xhttp.open('GET',address,true);
xhttp.send();
}
</script>
<table>
<tbody>
<tr>
<td>نام کاربری : </td>
<td><input type="text" id="RegUsername" value="" maxlength="40"></td>
</tr>
<tr>
<td>رمز عبور : </td>
<td><input type="password" id="RegPassword" value="" maxlength="60"></td>
</tr>
<tr>
<td>تکرار رمز : </td>
<td><input type="password" id="RegRepassword" value="" maxlength="60"></td>
</tr>
<tr>
<td>ایمیل : </td>
<td><input type="text" id="RegEmail" value="" maxlength="100"></td>
</tr>
<tr>
<td>نام اصلی : </td>
<td><input type="text" id="RegName" value="" maxlength="100"></td>
</tr>
<tr>
<td>کد امنیتی : *</td>
<td>
<img src="/include/captcha/cap7.php" title="کد امنیتی" alt="کد امنیتی" id="im_sec" height="20" width="67">
<a href="javascript:void(0)" onclick="document.getElementById('im_sec').src='/include/captcha/cap7.php?Reload_id='+Math.random();return false">
<img src="/images/refresh.gif" title="بارگزاری مجدد" alt="بارگزاری مجدد" style="border:0px;vertical-align:bottom;" height="16" width="16">
</a>
</td>
</tr>
<tr>
<td></td>
<td><input type="text" value="" id="RegCapt"></td>
</tr>
</tbody>
</table>
<div style="text-align: center;">
<button onclick="SenRegisterAjax();">عضویت</button>
</div>
<div id="RegLoad"></div>