function checkName(){
	var temp;
	temp = document.form1;
	if(temp.tName.value==""){
		alert("请填写名称！");
		temp.tName.select();
		return false;
	}
}

function checkPsw(){
	var temp
	temp = document.changePsw;
	if(temp.psw1.value==""){
		alert("请填写密码!");
		temp.psw1.select();
		return false;
	}
	if(temp.psw1.value.length<6 || temp.psw1.value.length>20){
		alert('密码长度不能少于6位多于20位');
		temp.psw1.select();
		return false;
	}
	if(temp.psw2.value!=temp.psw1.value){
		alert('您二次输入的密码不一致，请检查！');
		temp.psw2.select();
		return false;
	}		
}

function checkNC(){
	var temp;
	temp = document.Company;
	if(temp.tName.value==""){
		alert("请填写名称！");
		temp.tName.select();
		return false;
	}
	if(temp.tContent.value==""){
		alert("请填写内容！");
		temp.tContent.select();
		return false;
	}
}

<!--
function checkLogin(){
	var temp;
	temp = document.form1
	if(temp.username.value==""){
		alert("请输入用户名");
		temp.username.focus();
		temp.username.select();
		return false;
	}
	if(temp.psw.value==""){
		alert("请输入密码");
		temp.psw.focus();
		temp.psw.select();
		return false;
	}
	if(temp.psw.value.length<6 || form1.psw.value.length>20){
		alert('密码长度不能少于6位多于20位');
		temp.psw.focus();
		temp.psw.select();
		return false;
	}
	if(temp.validate.value==""){
		alert("请输入验证码");
		form1.validate.focus();
		form1.validate.select();
		return false;
	}
	if(temp.validate.value.length!=4 || isNaN(temp.validate.value)){
		alert("验证码必须是四位数字");
		temp.validate.focus();
		temp.validate.select();
		return false;
	}
}
//-->

//selectName:select控件的名称;	value:该控件要选中的项;
function selectOption(selectName,value){
	var   mlist   =   document.getElementById(selectName);   
    for(var i=1;i<mlist.options.length;i++){   
         var e=mlist.options[i];   
         if(e.value==value)
		 	e.selected="checked";   
    }
	return true;
}

//obj:要返回的控件名称
function SelectDate(obj)
{ 
result = window.showModalDialog('../Inc/time.asp?action=showdate','','help:no;status: no;dialogWidth=184px;dialogHeight=220px;dialogleft=400px');
if (result!=null) { document.all(obj).value = result.day; 
} 
}

//o:一般设为this
function bbimg(o){
	var zoom=parseInt(o.style.zoom, 10)||100;
	zoom+=event.wheelDelta/12;
	if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}
