              
              
              function drawSignUp()
		      { str = '<form name="signUpForm" id="signUpForm" action="javascript:get(document.getElementById(\'signUpForm\'));">'
		      	str +='<table>'
		      	str +='<tr><td colspan="2" align="center" style="padding:3px">'
		      	str +='     When you have done your registration our system automatically give password<br>'
		      	str +='     to you, which will be used our further service.</td></tr>'
		      	str +='<tr><td colspan="2" style="border-top:1px solid gray; color:white">.</td></tr>'
		  	    str +='<tr><td align="right"><font color="red">*</font> Last name: </td>'
		  	    str +='    <td><input type="text" name="lname" onFocus="tabPower =true" class="st1" maxlength="25" style="width:200px"></td></tr>'
		  	    str +='<tr><td align="right"><font color="red">*</font> First name: </td>'
		  	    str +='    <td><input type="text" name="fname" onFocus="tabPower =true" class="st1" maxlength="25" style="width:200px"></td></tr>'
		  	    str +='<tr><td align="right">Gender: </td>'
		  	    str +='    <td><table><tr><td><input type="RADIO" name="m" checked'
		  	    str +='                        onClick="tabPower =true; document.signUpForm.w.checked =false"></td>'
		  	    str +='                   <td>Male</td>'
		  	    str +='                   <td><input type="RADIO" name="w"'
		  	    str +='                        onClick="tabPower =true; document.signUpForm.m.checked =false"></td>'
		  	    str +='                   <td>Female</td>'
		  	    str +='               </tr></table></td></tr>'
		  	    str +='<tr><td align="right"><font color="red">*</font> Birthday: </td>'
		  	    str +='    <td><input type="text" name="byear" onFocus="tabPower =true" class="st1" style="width:33px" maxlength="4" onKeyUp="keyFilter(this,event)">'
		  	    str +='        <input type="text" name="bmonth" onFocus="tabPower =true" class="st1" style="width:24px" maxlength="2" onKeyUp="keyFilter(this,event)">'
		  	    str +='        <input type="text" name="bday" onFocus="tabPower =true" class="st1" style="width:24px" maxlength="2" onKeyUp="keyFilter(this,event)"> &nbsp;[ year month day ] <font color="gray">Only number</font></td></tr>'
		  	    str +='<tr><td align="right"><font color="red">*</font> E-mail address: </td>'
		  	    str +='    <td><input type="text" name="email" onFocus="tabPower =true" class="st1" maxlength="40" style="width:200px"></td></tr>'
		  	    str +='<tr><td></td>'
		  	    str +='    <td style="color:#878787; padding-bottom:10px">'
		  	    str +='        Your e-mail will be used for new password as a necessary information,<br>'
		  	    str +='        in case of forget your password!!!</td></tr>'
		  	    str +='<tr><td colspan="2" style="border-top:1px solid gray; color:white">.</td></tr>'
		  	    str +='<tr><td align="right"><font color="red">*</font> Nationality: </td>'
		  	    str +='    <td><input type="text" name="citizen" onFocus="tabPower =true" class="st1" style="width:200px" maxlength="25"></td></tr>'
		  	    str +='<tr><td align="right"><font color="red">*</font> Contact phone: </td>'
		  	    str +='    <td><input type="text" name="phone" onFocus="tabPower =true" class="st1" maxlength="20" style="width:200px"></td></tr>'
		  	    str +='<tr><td align="right" valign="top" style="padding-top:3px"><font color="red">*</font> Home address: </td>'
		  	    str +='    <td style="padding-top:1px">'
		  	    str +='        <textarea name="address" onFocus="tabPower =true" class="st1" onKeyPress="strlimit(this,170)" style="width:304px; height:70px;"></textarea>'
		  	    str +='    </td></tr>'
		  	    str +='<tr><td style="color:#FF7E00; padding-left:6px; padding-bottom:3px; padding-top:10px">'
		  	    str +='        <b>+ Service terms</b></td></tr>'
		  	    str +='<tr><td colspan="2" align="center" style="padding-left:10px; padding-right:0px">'
		  	    str +='        <div style="overflow:auto; width:449px; height:180px;'
		  	    str +='                    border:1px solid gray; padding:7px; background-color:#F6F6F6">'
		  	    str +='        <table><tr><td valign="top" style="padding-top:5px"><img src="img/pro/th.gif"></td>'
		  	    str +='                   <td>To become a member of our internet shopping system and order Altai Cashmere LLC brand products'
		  	    str +='                       first you have to give your true and complete information filling new member’s form, then obtain '
		  	    str +='                       personal code assigned to you (The personal code will be sent to your e-mail additionally)!</td></tr>'
				str +='	              <tr><td valign="top" style="padding-top:5px"><img src="img/pro/th.gif"></td>'
				str +='                   <td>Member’s personal code and private information security is to be at the member’s disposal..</td></tr>'
				str +='	              <tr><td valign="top" style="padding-top:5px"><img src="img/pro/th.gif"></td>'
				str +='                   <td>It is prohibited to use the information system for insult of others or other criminal offenses. Any'
			    str +='                       actions taken by using your personal membership are subject of your own responsibility</td></tr>'
				str +='	              <tr><td valign="top" style="padding-top:5px"><img src="img/pro/th.gif"></td>'
				str +='                   <td>In case of the member have not signed in the system for the period of more than 180 days, the'
				str +='                       membership account will be deleted as well as all personal information from the system.</td></tr>'
                str +='        </table></div></td></tr>'
		  	    str +='<tr><td colspan="2" style="padding-left:3px">'
		  	    str +='    <table><tr onClick="getObj(\'iAgree\').checked =(!getObj(\'iAgree\').checked) ? true : false"'
		  	    str +='            style="cursor:pointer">'
		  	    str +='               <td><input name="iAgree" id="iAgree" type="checkbox" onFocus="tabPower=true"'
		  	    str +='                    onClick="this.checked =(!this.checked) ? true : false"></td>'
		  	    str +='               <td style="padding-bottom:3px">Do you agree?</td></tr>'
		  	    str +='    </table></td></tr>'
		  	    str +='</table></form>'
		  	    
		  	    preLoaderControl(false)
		  	    getObj('proBody').innerHTML =str
		  	    str = '<table align="center">'
		  	    str +='<tr><td height="3"></td></tr>'
		  	    str +='<tr><td><input type="button" class="st1" value="Sign up" onFocus="tabPower=true" style="color:black;'
			    str +='         cursor:pointer; padding-bottom:2px" onClick="checkSignUpError()"></td>'
			    str +='    <td><input type="button" class="st1" value="Close window" onFocus="tabPower=false" style="color:black;'
			    str +='         cursor:pointer; padding-bottom:2px" onClick="closeProgram()"></td></tr>'
		  	    str +='<tr><td height="3"></td></tr>'
		  	    str +='</table>'
		  	    getObj('proExplain').innerHTML =str
		        getObj('proName').innerHTML ='SIGN UP WINDOW' }
		  	  	
		  	  	
		  	  function checkSignUpError()
		  	  { var msg ='Errors occured!\n'
			    if(document.signUpForm.lname.value =='')   msg +='Your last name is empty!\n';
			    if(document.signUpForm.fname.value =='')   msg +='Your first name is empty!\n';
			    if(document.signUpForm.phone.value =='')   msg +='Contact phone is undefined!\n';
			    if(document.signUpForm.citizen.value =='') msg +='Your nationality is empty!\n';
			    if(document.signUpForm.address.value =='') msg +='Your home address is empty!\n';
			    if(document.signUpForm.byear.value =='' ||
			       parseInt(document.signUpForm.byear.value) ==0 ||
			       parseInt(document.signUpForm.byear.value) <1900 ||
			       parseInt(document.signUpForm.byear.value) >2005)
			                                               msg +='Your birth year is undefined!\n';
			    if(document.signUpForm.bmonth.value =='08')   document.signUpForm.bmonth.value ='8'
			    if(document.signUpForm.bmonth.value =='09')   document.signUpForm.bmonth.value ='9'
			    if(document.signUpForm.bmonth.value =='' ||
			       parseInt(document.signUpForm.bmonth.value) ==0 ||
			       parseInt(document.signUpForm.bmonth.value) >12)
			                                               msg +='Your birth month is undefined!\n';
			    if(document.signUpForm.bday.value =='08')     document.signUpForm.bday.value ='8'
			    if(document.signUpForm.bday.value =='09')     document.signUpForm.bday.value ='9'
			    if(document.signUpForm.bday.value =='' ||
			       parseInt(document.signUpForm.bday.value) ==0 ||
			       parseInt(document.signUpForm.bday.value) >31)
			                                               msg +='Your birth day is undefined!\n';
			    if(document.signUpForm.email.value =='')   msg +='Please, input E-mail address!\n';
			    if(!document.signUpForm.iAgree.checked)    msg +='Please, tick to agree detail!\n'
		  	    if(document.signUpForm.email.value !='')
                { str =document.signUpForm.email.value
	              var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	              if(!filter.test(str))  msg +='Your E-mail address is incorrect!\n'; }
		  	    if(msg =='Errors occured!\n')
			    { preLoaderControl(true)
			      javascript:get(this.parentNode)
			      getObj('proBody').innerHTML =''
			      changeColorMemberPass() }
			      else alert(msg)
		  	  }
		  	  
		  	  
		  	  function changeColorMemberPass()
		  	  { if(getObj('proBody') && getObj('proBody').innerHTML !='')
		  	  	  setTimeout('changeColorMemberPass()',350)
		  	  	if(getObj('memberPass'))
		  	  	{ var mObj =getObj('memberPass')
		  	  	  mObj.style.color =(mObj.style.color =='black') ? 'red' : 'black'
		  	  } }
		  	  	
		  	  
		  	  var httpRequest =false;
			  function makePOSTRequest(url, parameters)
			  { httpRequest =getXMLHttpObject()
			    if(httpRequest ==null)
			    { alert('Cannot create XMLHTTP instance'); return false; }
			    httpRequest.onreadystatechange =alertContents;
			    httpRequest.open('POST', url, true);
			    httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			    httpRequest.setRequestHeader("Content-length", parameters.length);
			    httpRequest.setRequestHeader("Connection", "close");
			    httpRequest.send(parameters); }
			   
			  function alertContents()
			  { if(httpRequest.readyState ==4)
			    { if(httpRequest.status ==200)
			      { preLoaderControl(false)
			      	str = '<table>'
			      	str +='<tr><td height="3"></td></tr>'
			      	str +='<tr><td><input type="button" class="st1" value="Close window" style="color:black;'
			      	str +='         cursor:pointer; padding-bottom:2px" onClick="closeProgram()"></td></tr>'
			      	str +='<tr><td height="3"></td></tr>'
			      	str +='</table>'
		  	        getObj('proExplain').innerHTML =str
		            getObj('proName').innerHTML ='MESSAGE WINDOW'
			        getObj('proBody').innerHTML =httpRequest.responseText
			      }
			      else alert('There was a problem with the request.')
			  } }
			   
			  function get(obj)
			  { var sex =(document.signUpForm.m.checked) ? 1 : 0
			  	str  =     'lname='+ encodeURI(document.signUpForm.lname.value) +'&'
			    str +=     'fname='+ encodeURI(document.signUpForm.fname.value) +'&'
			    str +=       'sex='+ sex +'&'
			    str +=   'citizen='+ encodeURI(document.signUpForm.citizen.value) +'&'
			    str +=     'byear='+ encodeURI(document.signUpForm.byear.value) +'&'
			    str +=    'bmonth='+ encodeURI(document.signUpForm.bmonth.value) +'&'
			    str +=      'bday='+ encodeURI(document.signUpForm.bday.value) +'&'
			    str +=     'email='+ encodeURI(document.signUpForm.email.value) +'&'
			    str +=     'phone='+ encodeURI(document.signUpForm.phone.value) +'&'
			    str +=   'address='+ encodeURI(document.signUpForm.address.value)
			    makePOSTRequest('modulee/ajax/signUp.php', str) }