<!--
function chkblankkeyword(tf) {
	if (tf.txtKeyword.value == "") {
		alert('กรุณาป้อน Keyword ด้วย');
		tf.txtKeyword.focus();
		return false;
	}
}
// ลืมรหัสผ่านฟรีเว็บบอร์ด
function chkblankdataform(tf) {
	if (tf.txtusername.value == "") {
		alert('กรุณาป้อน Username คุณด้วย');
		tf.txtusername.focus();
		return false;
	}
	if (tf.txtemail.value == "") {
		alert('กรุณาป้อนอีเมล์ของคุณด้วย');
		tf.txtemail.focus();
		return false;
	}
	if (tf.txtemail.value!="") {
			if (tf.txtemail.value.indexOf("@")==-1 || tf.txtemail.value.indexOf(".")==-1 || tf.txtemail.value.indexOf(" ")!=-1 || tf.txtemail.value.length<6) 	{
				alert('รูปแบบอีเมล์ไม่ถูกต้อง');
				tf.txtemail.focus();return false
			} 
	}
}
// ลืมรหัสผ่าน
function chkblankforgot(tf) {
	if (tf.txtemail.value == "") {
		alert('กรุณาป้อนอีเมล์ของคุณด้วย');
		tf.txtemail.focus();
		return false;
	}
	if (tf.txtemail.value!="") {
			if (tf.txtemail.value.indexOf("@")==-1 || tf.txtemail.value.indexOf(".")==-1 || tf.txtemail.value.indexOf(" ")!=-1 || tf.txtemail.value.length<6) 	{
				alert('รูปแบบอีเมล์ไม่ถูกต้อง');
				tf.txtemail.focus();return false
			} 
	}
}
// แจ้งลบกระทู้
function chkblankalertform(tf) {	
	if (tf.txtcomment.value == "") {
		alert('กรุณากรอกเหตุผลที่ต้องการให้ลบด้วย');
		tf.txtcomment.focus();
		return false;
	}
	if (tf.txtpname.value == "") {
		alert('กรุณากรอกชื่อผู้แจ้งลบด้วย');
		tf.txtpname.focus();
		return false;
	}
	if (tf.txtemail.value == "") {
		alert('กรุณากรอกอีเมล์ที่สามารถติดต่อได้ด้วย');
		tf.txtemail.focus();
		return false;
	}
	if (tf.txtemail.value!="") {
			if (tf.txtemail.value.indexOf("@")==-1 || tf.txtemail.value.indexOf(".")==-1 || tf.txtemail.value.indexOf(" ")!=-1 || tf.txtemail.value.length<6) 	{
				alert('รูปแบบอีเมล์ไม่ถูกต้อง');
				tf.txtemail.focus();return false
			} 
	}
}
function chkconfigbannercode(tf) {
	if (tf.txttopcodehtml.value == "") {
		alert('กรุณาป้อนโค้ด HTML สำหรับการแสดงผลด้านบนด้วย\nหรือใส่เครื่องหมาย - เพื่อเป็นการเว้นว่างไว้');
		tf.txttopcodehtml.focus();
		return false;
	}
	if (tf.txtmidcodehtml.value == "") {
		alert('กรุณาป้อนโค้ด HTML สำหรับการแสดงผลตรงกลางด้วย\nหรือใส่เครื่องหมาย - เพื่อเป็นการเว้นว่างไว้');
		tf.txtmidcodehtml.focus();
		return false;
	}
	if (tf.txtbottomcodehtml.value == "") {
		alert('กรุณาป้อนโค้ด HTML สำหรับการแสดงผลด้านล่างด้วย\nหรือใส่เครื่องหมาย - เพื่อเป็นการเว้นว่างไว้');
		tf.txtbottomcodehtml.focus();
		return false;
	}
}

function chkwbmemberlogin(tf) {
	if (tf.txtusername.value == "") {
		alert('กรุณาป้อน Username ด้วย');
		tf.txtusername.focus();
		return false;
	}
	if (tf.txtpassword.value == "") {
		alert('กรุณาป้อน Password ด้วย');
		tf.txtpassword.focus();
		return false;
	}
}
function chkblankmbregister(tf) {
	if (tf.txtusername.value == "") {
		alert('กรุณากำหนด Username ด้วย');
		tf.txtusername.focus();
		return false;
	}
	if (tf.txtpassword.value == "") {
		alert('กรุณากำหนด Password ด้วย');
		tf.txtpassword.focus();
		return false;
	}
	if (tf.txtrepassword.value != tf.txtpassword.value) {
          alert("ยืนยันรหัสผ่านให้ตรงกับรหัสผ่านด้วย");
          tf.txtrepassword.focus();
          return false;
      }   	
	if (tf.txtemail.value =="") {
		alert('กรุณาใส่ชื่ออีเมล์ที่ใช้ในระบบด้วย');
		tf.txtemail.focus();
		return false;
	}
	if (tf.txtemail.value!="") {
			if (tf.txtemail.value.indexOf("@")==-1 || tf.txtemail.value.indexOf(".")==-1 || tf.txtemail.value.indexOf(" ")!=-1 || tf.txtemail.value.length<6) 	{
				alert('รูปแบบอีเมล์ไม่ถูกต้อง');
				tf.txtemail.focus();return false
			} 
	}						
}
function chkblankeditprofile(tf) {
	if (tf.txtpassword.value == "") {
		alert('กรุณากำหนด Password ด้วย');
		tf.txtpassword.focus();
		return false;
	}
	if (tf.txtrepassword.value != tf.txtpassword.value) {
          alert("ยืนยันรหัสผ่านให้ตรงกับรหัสผ่านด้วย");
          tf.txtrepassword.focus();
          return false;
      }   	
	if (tf.txtemail.value =="") {
		alert('กรุณาใส่ชื่ออีเมล์ที่ใช้ในระบบด้วย');
		tf.txtemail.focus();
		return false;
	}
	if (tf.txtemail.value!="") {
			if (tf.txtemail.value.indexOf("@")==-1 || tf.txtemail.value.indexOf(".")==-1 || tf.txtemail.value.indexOf(" ")!=-1 || tf.txtemail.value.length<6) 	{
				alert('รูปแบบอีเมล์ไม่ถูกต้อง');
				tf.txtemail.focus();return false
			} 
	}						
}
function chkconfigfreewebboard(tf) {
	if (tf.txtlisttop.value == "") {
		tf.txtlisttop.value = "-";
	}
	if (tf.txtlistbottom.value == "") {
		tf.txtlistbottom.value = "-";
	}
	if (tf.txtposttop.value == "") {
		tf.txtposttop.value = "-";
	}
	if (tf.txtpostbottom.value == "") {
		tf.txtpostbottom.value = "-";
	}	
	if (tf.txtalltopic.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า หัวข้อทั้งหมด ด้วย');
		tf.txtalltopic.focus();
		return false;
	}
	if (tf.txtnewpost.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า ตั้งกระทู้ใหม่ ด้วย');
		tf.txtnewpost.focus();
		return false;
	}
	if (tf.txtsearchtopic.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า ค้นหากระทู้ ด้วย');
		tf.txtsearchtopic.focus();
		return false;
	}
	if (tf.txtnumhot.value == "") {
		alert('กรุณาป้อนเลขจำนวนครั้งที่อ่าน ที่ต้องการให้ขึ้นกระทู้ยอดนิยมด้วย');
		tf.txtnumhot.focus();
		return false;
	}	
	if (tf.txtnumnew.value == "") {
		alert('กรุณาป้อนจำนวนวันที่ต้องการให้ขึ้น New หรือ Update ด้วย');
		tf.txtnumnew.focus();
		return false;
	}
	if (tf.txthotcolor.value == "") {
		alert('กรุณาป้อนสีแจ้งกระทู้ยอดนิยมด้วย');
		tf.txthotcolor.focus();
		return false;
	}
	if (tf.txtnewcolor.value == "") {
		alert('กรุณาป้อนสีแสดงคำว่า New ด้วย');
		tf.txtnewcolor.focus();
		return false;
	}
	if (tf.txtupdatecolor.value == "") {
		alert('กรุณาป้อนสีแสดงคำว่า Update ด้วย');
		tf.txtupdatecolor.focus();
		return false;
	}
	if (tf.txtfont.value == "") {
		alert('กรุณาป้อนชื่อฟอนต์ที่ต้องการให้แสดงที่หน้าเว็บบอร์ดด้วย เช่น Ms Sans Serif');
		tf.txtfont.focus();
		return false;
	}
	if (tf.txttopiccolor.value == "") {
		alert('กรุณาป้อนสีหัวข้อกระทู้ด้วย');
		tf.txttopiccolor.focus();
		return false;
	}
	if (tf.txttablebgcolor.value == "") {
		alert('กรุณาป้อนสีตารางด้วย');
		tf.txttablebgcolor.focus();
		return false;
	}
	if (tf.txttablebdrcolor.value == "") {
		alert('กรุณาป้อนสีเส้นขอบตารางด้วย');
		tf.txttablebdrcolor.focus();
		return false;
	}
	if (tf.txttablewidth.value == "") {
		alert('กรุณาป้อนเลขกำหนดความกว้างของตารางด้วย');
		tf.txttablewidth.focus();
		return false;
	}
	if (tf.txttablebdrwidth.value == "") {
		alert('กรุณาป้อนเลขกำหนดขนาดขอบตารางด้วย');
		tf.txttablebdrwidth.focus();
		return false;
	}
	if (tf.txttopic.value == "") {
		alert('กรุณาป้อนเลขกำหนดขนาดขอบตารางด้วย');
		tf.txttablebdrwidth.focus();
		return false;
	}
	if (tf.txtfrom.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า จาก ด้วย');
		tf.txtfrom.focus();
		return false;
	}
		if (tf.txtpict.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า รูปภาพประกอบ ด้วย');
		tf.txtpict.focus();
		return false;
	}
		if (tf.txtemail.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า อีเมล์ ด้วย');
		tf.txtemail.focus();
		return false;
	}
		if (tf.txttel.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า หมายเลขโทรศัพท์ ด้วย');
		tf.txttel.focus();
		return false;
	}
	if (tf.txtdetail.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า รายละเอียด ด้วย');
		tf.txtdetail.focus();
		return false;
	}
	if (tf.txtposttopic.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า โพสต์กระทู้ ด้วย');
		tf.txtposttopic.focus();
		return false;
	}
	if (tf.txtclear.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า เคลียร์ข้อความ ด้วย');
		tf.txtclear.focus();
		return false;
	}
}

function chkmbconfigfreewebboard(tf) {
	if (tf.txtbgcolor.value == "") {
		alert('กรุณากำหนดสีพื้นหลังด้วย');
		tf.txtbgcolor.focus();
		return false;
	}
	if (tf.txtlisttop.value == "") {
		tf.txtlisttop.value = "-";
	}
	if (tf.txtlistbottom.value == "") {
		tf.txtlistbottom.value = "-";
	}
	if (tf.txtqpagelen.value == "") {
		alert('กรุณากำหนดจำนวนกระทู้ที่แสดงต่อ 1 หน้าด้วย');
		tf.txtqpagelen.focus();
		return false;
	}
	if (tf.txtpostbgcolor.value == "") {
		alert('กรุณากำหนดสีพื้นหลังด้วย');
		tf.txtpostbgcolor.focus();
		return false;
	}
	if (tf.txtposttop.value == "") {
		tf.txtposttop.value = "-";
	}
	if (tf.txtpostbottom.value == "") {
		tf.txtpostbottom.value = "-";
	}	
	if (tf.txtalltopic.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า หัวข้อทั้งหมด ด้วย');
		tf.txtalltopic.focus();
		return false;
	}
	if (tf.txtnewpost.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า ตั้งกระทู้ใหม่ ด้วย');
		tf.txtnewpost.focus();
		return false;
	}
	if (tf.txtsearchtopic.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า ค้นหากระทู้ ด้วย');
		tf.txtsearchtopic.focus();
		return false;
	}
	if (tf.txtnumhot.value == "") {
		alert('กรุณาป้อนเลขจำนวนครั้งที่อ่าน ที่ต้องการให้ขึ้นกระทู้ยอดนิยมด้วย');
		tf.txtnumhot.focus();
		return false;
	}	
	if (tf.txtnumnew.value == "") {
		alert('กรุณาป้อนจำนวนวันที่ต้องการให้ขึ้น New หรือ Update ด้วย');
		tf.txtnumnew.focus();
		return false;
	}
	if (tf.txthotcolor.value == "") {
		alert('กรุณาป้อนสีแจ้งกระทู้ยอดนิยมด้วย');
		tf.txthotcolor.focus();
		return false;
	}
	if (tf.txtnewcolor.value == "") {
		alert('กรุณาป้อนสีแสดงคำว่า New ด้วย');
		tf.txtnewcolor.focus();
		return false;
	}
	if (tf.txtupdatecolor.value == "") {
		alert('กรุณาป้อนสีแสดงคำว่า Update ด้วย');
		tf.txtupdatecolor.focus();
		return false;
	}
	if (tf.txtviewbgcolor.value == "") {
		alert('กรุณากำหนดสีพื้นหลังด้วย');
		tf.txtviewbgcolor.focus();
		return false;
	}
	if (tf.txtfont.value == "") {
		alert('กรุณาป้อนชื่อฟอนต์ที่ต้องการให้แสดงที่หน้าเว็บบอร์ดด้วย เช่น Ms Sans Serif');
		tf.txtfont.focus();
		return false;
	}
	if (tf.txttopiccolor.value == "") {
		alert('กรุณาป้อนสีหัวข้อกระทู้ด้วย');
		tf.txttopiccolor.focus();
		return false;
	}
	if (tf.txttablebgcolor.value == "") {
		alert('กรุณาป้อนสีตารางด้วย');
		tf.txttablebgcolor.focus();
		return false;
	}
	if (tf.txttablebdrcolor.value == "") {
		alert('กรุณาป้อนสีเส้นขอบตารางด้วย');
		tf.txttablebdrcolor.focus();
		return false;
	}
	if (tf.txttablewidth.value == "") {
		alert('กรุณาป้อนเลขกำหนดความกว้างของตารางด้วย');
		tf.txttablewidth.focus();
		return false;
	}
	if (tf.txttablebdrwidth.value == "") {
		alert('กรุณาป้อนเลขกำหนดขนาดขอบตารางด้วย');
		tf.txttablebdrwidth.focus();
		return false;
	}
	if (tf.txttopic.value == "") {
		alert('กรุณาป้อนเลขกำหนดขนาดขอบตารางด้วย');
		tf.txttablebdrwidth.focus();
		return false;
	}
	if (tf.txtfrom.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า จาก ด้วย');
		tf.txtfrom.focus();
		return false;
	}
		if (tf.txtpict.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า รูปภาพประกอบ ด้วย');
		tf.txtpict.focus();
		return false;
	}
		if (tf.txtemail.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า อีเมล์ ด้วย');
		tf.txtemail.focus();
		return false;
	}
		if (tf.txttel.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า หมายเลขโทรศัพท์ ด้วย');
		tf.txttel.focus();
		return false;
	}
	if (tf.txtdetail.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า รายละเอียด ด้วย');
		tf.txtdetail.focus();
		return false;
	}
	if (tf.txtposttopic.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า โพสต์กระทู้ ด้วย');
		tf.txtposttopic.focus();
		return false;
	}
	if (tf.txtclear.value == "") {
		alert('กรุณาป้อนข้อความแทนคำว่า เคลียร์ข้อความ ด้วย');
		tf.txtclear.focus();
		return false;
	}
	if (tf.txtallowimg.value == "") {
		alert('กรุณากำหนดประเภทของไฟล์รูปภาพที่สามารถอัพโหลดได้ด้วย');
		tf.txtallowimg.focus();
		return false;
	}	
	if (tf.txtimgsize.value == "") {
		alert('กรุณากำหนดขนาดของไฟล์รูปภาพที่สามารถอัพโหลดได้ด้วย');
		tf.txtimgsize.focus();
		return false;
	}	
	if (tf.txtnoneimg.value == "") {
		alert('กรุณากำหนดประเภทของไฟล์อื่นๆ ที่สามารถอัพโหลดได้ด้วย');
		tf.txtnoneimg.focus();
		return false;
	}	
	if (tf.txtnoneimgsize.value == "") {
		alert('กรุณากำหนดขนาดของไฟล์อื่นๆ ที่สามารถอัพโหลดได้ด้วย');
		tf.txtnoneimgsize.focus();
		return false;
	}	
}
//ปรับแต่งระบบ
function chkconfigform(tf) {						
	if (tf.txturl.value == "") {
		alert('กรุณากำหนด URL ของฟรีเว็บบอร์ดด้วย');
		tf.txturl.focus();
		return false;
	}
	if (tf.txttitle.value == "") {
		alert('กรุณาป้อนข้อความที่ต้องการให้แสดงที่ Title Bar ด้วย');
		tf.txttitle.focus();
		return false;
	}	
	if (tf.txtdesc.value =="") {
		alert('กรุณากำหนดคำอธิบายเกี่ยวกับเว็บไซต์ด้วย (จะปรากฎใน Tag Description)');
		tf.txtdesc.focus();
		return false;
	}
	if (tf.txtkeywords.value =="") {
		alert('กรุณากำหนดคำค้นด้วย (ปรากฎใน Tag Keywords)');
		tf.txtkeywords.focus();
		return false;
	}
	if (tf.txtemail.value =="") {
		alert('กรุณาใส่ชื่ออีเมล์ที่ใช้ในระบบด้วย');
		tf.txtemail.focus();
		return false;
	}
	if (tf.txtemail.value!="") {
			if (tf.txtemail.value.indexOf("@")==-1 || tf.txtemail.value.indexOf(".")==-1 || tf.txtemail.value.indexOf(" ")!=-1 || tf.txtemail.value.length<6) 	{
				alert('รูปแบบอีเมล์ไม่ถูกต้อง');
				tf.txtemail.focus();return false
			} 
	}					
}
function chkblankboardgroup(tf)
	{
		if (tf.txttitle.value == "") {
			alert('กรุณาป้อนชื่อหมวดหมู่ด้วย');
			tf.txttitle.focus();
			return false;
		}
		if (tf.txtdescription.value == "") {
			alert('กรุณาป้อนคำอธิบายเกี่ยวกับหมวดหมู่นี้ด้วย');
			tf.txtdescription.focus();
			return false;
		}
	}
function chkblanksearchword(tf) {
	if (tf.txtsrch.value =="") {
		alert('กรุณาป้อนคำที่ต้องการค้นหาด้วย');
		tf.txtsrch.focus();
		return false;
	}
}
//คำหยาบ
function chkblankbadword(tf) {
	if (tf.badwords.value == "") {
		alert('กรอกคำหยาบที่ต้องการป้องกันในเว็บบอร์ดด้วย');
		tf.badwords.focus();
		return false;
	}
}		
function chkblankmemberlogin(tf) {
	if (tf.txtusername.value == "") {
		alert('กรุณาป้อน Username ที่ต้องการด้วย');
		tf.txtusername.focus();
		return false;
	}
	if (tf.txtpassword.value == "") {
		alert('กรุณากำหนด Password ด้วย');
		tf.txtpassword.focus();
		return false;
	}
}
function checkeng() {
     var obj=frmregister.txtusername;
     var str="0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" //กำหนดอักษรอังกฤษส่วนนี้ครับ
     var val=obj.value
     var valOK = true;
     
     for (i=0; i<val.length & valOK; i++){
           valOK = (str.indexOf(val.charAt(i))!= -1) 
     }
     
     if (!valOK) {
           alert("ใช้ได้เฉพาะภาษาอังกฤษ เลข 0-9 และเครื่องหมาย _ เท่านั้น !!! ")
           obj.focus()
           return false
     } return true
} 

function chkblankregister(tf) {
	if (tf.txtusername.value == "") {
		alert('กรุณาป้อน Username ที่ต้องการด้วย');
		tf.txtusername.focus();
		return false;
	}
	if (tf.txtusername.value != "") {
		return checkeng();
	}
	if (tf.txtpassword.value == "") {
		alert('กรุณากำหนด Password ด้วย');
		tf.txtpassword.focus();
		return false;
	}
	if (tf.txtrepassword.value == "") {
		alert('กรุณายืนยัน Password ด้วย');
		tf.txtrepassword.focus();
		return false;
	}
	if (tf.txtpassword.value != tf.txtrepassword.value) {
		alert('กรุณายืนยัน Password ให้ตรงกับ Password ช่องแรกด้วย');
		tf.txtrepassword.focus();
		return false;
	}
	if (tf.txtaddress.value == "") {
		alert('กรุณาป้อนที่อยู่ของคุณด้วย');
		tf.txtaddress.focus();
		return false;
	}
	if (tf.txtemail.value == "") {
		alert('กรุณาป้อนอีเมล์ของคุณด้วย');
		tf.txtemail.focus();
		return false;
	}
	if (tf.txtemail.value!="") {
		if (tf.txtemail.value.indexOf("@")==-1 || tf.txtemail.value.indexOf(".")==-1 || tf.txtemail.value.indexOf(" ")!=-1 || tf.txtemail.value.length<6) 	{
			alert('รูปแบบอีเมล์ไม่ถูกต้อง');
			tf.txtemail.focus();return false
		} 
	}
	if (tf.lstcategory.value == "") {
		alert('กรุณาเลือกกลุ่มของเว็บบอร์ดที่คุณต้องการด้วย');
		tf.lstcategory.focus();
		return false;
	}	
}
function chkblankregister2(tf) {	
	if (tf.txtpassword.value == "") {
		alert('กรุณากำหนด Password ด้วย');
		tf.txtpassword.focus();
		return false;
	}
	if (tf.txtrepassword.value == "") {
		alert('กรุณายืนยัน Password ด้วย');
		tf.txtrepassword.focus();
		return false;
	}
	if (tf.txtpassword.value != tf.txtrepassword.value) {
		alert('กรุณายืนยัน Password ให้ตรงกับ Password ช่องแรกด้วย');
		tf.txtrepassword.focus();
		return false;
	}
	if (tf.txtaddress.value == "") {
		alert('กรุณาป้อนที่อยู่ของคุณด้วย');
		tf.txtaddress.focus();
		return false;
	}
	if (tf.txtemail.value == "") {
		alert('กรุณาป้อนอีเมล์ของคุณด้วย');
		tf.txtemail.focus();
		return false;
	}
	if (tf.txtemail.value!="") {
		if (tf.txtemail.value.indexOf("@")==-1 || tf.txtemail.value.indexOf(".")==-1 || tf.txtemail.value.indexOf(" ")!=-1 || tf.txtemail.value.length<6) 	{
			alert('รูปแบบอีเมล์ไม่ถูกต้อง');
			tf.txtemail.focus();return false
		} 
	}
	if (tf.lstcategory.value == "") {
		alert('กรุณาเลือกกลุ่มของเว็บบอร์ดที่คุณต้องการด้วย');
		tf.lstcategory.focus();
		return false;
	}	
}
function chkblankcategory(tf) {
	if (tf.txtcattitle.value== "") {
		alert('กรุณาป้อนชื่อกลุ่มเว็บบอร์ดด้วย');
		tf.txtcattitle.focus();
		return false;
	}
}
// Login
	function chkadminloginform(tf)
	{
		if (tf.loginname.value == "") {
			alert('กรุณาป้อน Username ด้วย');
			tf.loginname.focus();
			return false;
		}
		if (tf.upassword.value == "") {
			alert('กรุณาป้อน Password ด้วย');
			tf.upassword.focus();
			return false;
		}
	}
	// เปลี่ยนรหัสผ่าน admin
function chkpwd(tf) {
   	if (tf.passwd.value == "") {
          alert("กำหนดรหัสผ่านใหม่ด้วย");
          tf.passwd.focus();
          return false;
      }     
      if (tf.passwd.value.length < 5) {
          alert("รหัสผ่านไม่ควรน้อยกว่า 5 ตัวอักษร");
          tf.passwd.focus();
          return false;
      }
      if (tf.confirmpwd.value != tf.passwd.value) {
          alert("ยืนยันรหัสผ่านให้ตรงกับรหัสผ่านใหม่ด้วย");
          tf.confirmpwd.focus();
          return false;
      }   	
    }
function conf(obj)
   {
   	if (confirm('การกระทำนี้ จะเป็นการลบข้อมูลอย่างถาวร\nคลิก OK เพื่อยืนยันการลบข้อมูล') == true) {
   	   return true;
   	}
   	return false;
   }
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','dsp',optNN);}
if (isIE){imgWin=window.open('about:blank','dsp',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}
function keyCheck(eventObj, obj)
{
	var keyCode

	// Check For Browser Type
	if (document.all){ 
		keyCode=eventObj.keyCode
	}
	else{
		keyCode=eventObj.which
	}

	var str=obj.value
	if(keyCode==46){ 
		if (str.indexOf(".")>0){
			return false;
		}
	}
	if((keyCode<48 || keyCode >58)){ 
		return false;
	}
	return true;
}
//ค้นหากระทู้ในบอร์ดสมาชิก
function chkblanksrch(tf) {
	if (tf.srchtext.value == "") {
		alert('กรุณากรอกคำที่ต้องการค้นหาด้วย');
		tf.srchtext.focus();
		return false;
	}	
}
function chkblanksrchmember(tf) {
	if (tf.srchname.value =="") {
		alert('ป้อนชื่อของสมาชิกที่ต้องการค้นหาด้วย');
		tf.srchname.focus();
		return false;
	}
}
function chkblanksrchwebboard(tf) {
	if (tf.srchkeyword.value =="") {
		alert('ป้อนคำที่ต้องการค้นหาด้วย');
		tf.srchkeyword.focus();
		return false;
	}
}
function chkblankavartar(tf) {
	if (tf.txtavartartitle.value == "") {
		alert('กำหนดชื่อรูปภาพแทนตัวสมาชิกด้วย');
		tf.txtavartartitle.focus();
		return false;
	}
	if (tf.blob.value == "") {
		alert('เลือกรูปภาพแทนตัวสมาชิกด้วย');
		tf.blob.focus();
		return false;
	}
}
function chkblankbanner(tf) {
	if (tf.txttitle.value == "") {
		alert('กรุณากรอกชื่อแบนเนอร์ สำหรับแสดงตอนเอาเมาส์ชี้ที่หน้าเว็บด้วย');
		tf.txttitle.focus();
		return false;
	}
	if (tf.txturl.value == "") {
		alert('กรุณากรอก URL ด้วย');
		tf.txturl.focus();
		return false;
	}
	if (tf.slalign.value == "") {
		alert('กรุณาระบุตำแหน่งที่ต้องการแสดงผลด้วย');
		tf.slalign.focus();
		return false;
	}
}
//-->