//UBB

function showcode() {
	if (helpstat) {
		alert("代码标记\n使用代码标记，可以使你的程序代码里面的 html 等标志不会被破坏.\n使用方法:\n [code]这里是代码文字[/code]");
	} else if (basic) {
		AddTxt="\r[code]\r[/code]";
		AddText(AddTxt);
	} else {
		txt=prompt("输入代码","");
		if (txt!=null) {
			AddTxt="[code]"+txt;
			AddText(AddTxt);
			AddTxt="[/code]";
			AddText(AddTxt);
		}
	}
}


//验证留言
function LoginAdd(){

	if(myform.name.value==''){
		alert("请填写您的称呼哦！");
		myform.name.focus();
		return false;
	}
	if(myform.name.value.length>8){
		alert("姓名不能多于8个字！");
		myform.name.focus();
		return false;
	}		    
	if(myform.web.value==''){
		alert("请留下联系电话！");
		myform.web.focus();
		return false;
	}
			

	if(myform.GuestContent.value==''){
		alert("留言内容不能为空！");
		myform.GuestContent.focus();
		return false;
	}			
	if(myform.GuestContent.value.length>500){
		alert("内容限制在500字内，你已超出了范围！");
		myform.GuestContent.focus();
		return false;
	}
				
	return true;
}
function DDelete(){
	if(Deleteform.yz.value==''){
		alert("验证码不能为空！");
		Deleteform.yz.focus();
		return false;
	}		
	if(Deleteform.yz.value != Deleteform.yzz.value){
		alert("验证码输入错误！");
		Deleteform.yz.focus();
		return false;
	}		
	if(Deleteform.Password.value==''){
		alert("密码不能为空！");
		Deleteform.Password.focus();
		return false;
	}					
	return true;
}
function AdminLogin(){
	if(Adminform.yz.value==''){
		alert("验证码不能为空！");
		Adminform.yz.focus();
		return false;
	}		
	if(Adminform.yz.value != Adminform.yzz.value){
		alert("验证码输入错误！");
		Adminform.yz.focus();
		return false;
	}		
	if(Adminform.admin.value==''){
		alert("帐号不能为空！");
		Adminform.admin.focus();
		return false;
	}			
	if(Adminform.Password.value==''){
		alert("密码不能为空！");
		Adminform.Password.focus();
		return false;
	}					
	return true;
	
}
function Adminpassword(){
	if(passwordform.Password.value==''){
		alert("密码不能为空！");
		passwordform.Password.focus();
		return false;
	}		
	return true;
	
}
function DoTitle(addTitle) {
var revisedTitle;var currentTitle = document.myform.Title.value;revisedTitle = addTitle+currentTitle;document.myform.Title.value=revisedTitle;document.myform.Title.focus();
return;}