function mysubmit()
{
	if(form1.title.value==""){
		alert("标题不能为空！");
		form1.title.focus();
		return(false);
	}
	if(form1.context.value==""){
		alert("贴子内容不能为空！");
		form1.context.focus();
		return(false);
	}
document.getElementById("postbtn").disabled=true;
document.all.waiting.style.pixelTop = (document.body.offsetHeight - document.all.waiting.clientHeight) / 2 - 100 + document.body.scrollTop;
document.all.waiting.style.pixelLeft = (document.body.offsetWidth - document.all.waiting.clientWidth) / 2 + document.body.scrollLeft;
document.all.waiting.style.visibility = "visible";
document.form1.submit();
}
function mysubmitsearch()
{
document.all.waiting.style.pixelTop = (document.body.offsetHeight - document.all.waiting.clientHeight) / 2 - 100 + document.body.scrollTop;
document.all.waiting.style.pixelLeft = (document.body.offsetWidth - document.all.waiting.clientWidth) / 2 + document.body.scrollLeft;
document.all.waiting.style.visibility = "visible";
document.search.submit();
}

function openreg()
{
	var x,y;
	x=(screen.width-640)/3;
	y=(screen.height-480)/3;
	window.open("register.asp","regwindow","toolbar=no,resizable=no,directories=no,status=yes,scrollbars=auto,menubar=no,width=310,height=230,left="+x+",top="+y);
}
function memberinfo(id)
{
	var x,y;
	x=(screen.width-640)/3;
	y=(screen.height-480)/3;
	window.open("memberinfo.asp?id="+id,"memberwindow","toolbar=no,resizable=no,directories=no,status=yes,scrollbars=auto,menubar=no,width=310,height=260,left="+x+",top="+y);
}
function openabout(id)
{
	var x,y;
	x=(screen.width-640)/3;
	y=(screen.height-480)/3;
	window.open("about.htm","aboutwindow","toolbar=no,resizable=no,directories=no,status=yes,scrollbars=auto,menubar=no,width=320,height=240,left="+x+",top="+y);
}

function DoTitle(addTitle) { 
var revisedTitle; 
var currentTitle = document.form1.title.value; 
revisedTitle = addTitle+String.fromCharCode(32)+currentTitle; 
document.form1.title.value=revisedTitle; 
document.form1.title.focus();
return; 
}

function insertemot(emotCode) {
	var txtarea = document.form1.message;
	emotCode = ' ' + emotCode + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
	var caretPos = txtarea.caretPos;
	caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? emotCode + ' ' : emotCode;
	txtarea.focus();
	} else {
	txtarea.value  += emotCode;
	txtarea.focus();
	}
}
function errpic(thepic){
thepic.src="images/showerr.gif" 
}

