			  function check_email(e) {
			ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
			for(i=0; i < e.length ;i++){
			if(ok.indexOf(e.charAt(i))<0){ 
			return (false);
			}	
			} 
			if (document.images) {
			re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
			re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
			if (!e.match(re) && e.match(re_two)) {
			return (-1);		
			} 
			}
			}
	
		  function chkdate(item,textname)
		  {
		  	     f  = document.form;
		  		ndate = new Date()
				g = ndate.getFullYear()+543

		  		sp = item.split("/")
				if  (sp.length != 3)
				{
					alert("กรุณาตรวจสอบวันที่อีกครั้ง")
					day='01'
					month='01'
					year=g
					eval("f."+textname+".focus()");
				}
				else
				{
							var day = sp[0]
							var month = sp[1]
							var year = sp[2]
							
							if (eval(day) == 0  || eval(month) == 0 || eval(year) == 0 )
							{
								alert("กรุณาตรวจสอบวันที่อีกครั้ง")
									if (eval(day) == 0 )
									{
									day = '01'
									}
									if(eval(month) == 0)
									{
									month = '01'
									}
									if(eval(year) == 0)
									{
									year = g
									}
							}

						if  (day.length < 2)
							{
							day = "0"+day
							}
							else if(eval(day) > 31 )
							{
									alert("กรุณาตรวจสอบวันอีกครั้ง (เนื่อจากวันที่ มากกว่า 31 )")
									day = '01'
							}
							else
							{
							day = day
							}

							
							if  (month.length < 2)
							{
							month = "0"+month
							}
							else if(eval(month) > 12 )
							{
									alert("กรุณาตรวจสอบเดือนอีกครั้ง (เนื่องจากเดือน มากกว่า 12 )")
									month = '01'
							}
							else
							{
							month = month
							}
							
							if  (year.length < 4)
							{
									alert("กรุณาตรวจปีอีกครั้ง")
									year = g
							}
							else
							{
									year = year
							}
											if((month == '04')||(month == '06')||(month == '09')||(month == '11'))
											{
												if(day > 30)
												{
												alert ('กรุณาตรวจสอบเดือนอีกครั้งเนื่องจากเดือนนี้มี 30 วัน');
												day ='30'
												}
											}
										else if(month =='02')
											{
											var snyear = eval((year - 543)%4);
											if( snyear > 0 && day > 28)
												{
												alert('กรุณาตรวจสอบวันอีกครั้งเนื่องจากเดือนนี้มี 28 วัน');
																								day ='28'

						              eval("f."+textname+".focus()");
												}
											else if( snyear == 0 && day > 29)
												{
												alert('กรุณาตรวจสอบวันอีกครั้งเนื่องจากเดือนนี้มี 29 วัน');
																																				day ='29'
												}
									  	}
				}
						editdate = day+"/"+month+"/"+year
						eval("f."+textname+".value = editdate");
				}