function lg(sj)
{var i="";
for (i=0;i<sj.length;i++)
{
i=i+" ";
}
return (i==sj)
}

function bj(a,b)
{return (a == b);}

function lg1()
{
if (lg(document.form1.xingming.value))
{document.form1.xingming.focus();
alert("姓名不能为空！");
return false;}

if (lg(document.form1.nianling.value))
{
document.form1.nianling.focus();
alert("年龄不能为空！");
return false;
}

if (lg(document.form1.shouji.value))
{
document.form1.shouji.focus();
alert("手机不能为空！");
return false;
}

if (lg(document.form1.dizhi.value))
{
document.form1.dizhi.focus();
alert("地址不能为空！");
return false;
}

if (lg(document.form1.youbian.value))
{
document.form1.youbian.focus();
alert("邮编不能为空！");
return false;
}

if (lg(document.form1.pass.value))
{
document.form1.pass.focus();
alert("密码不能为空！");
return false;
}

if (lg(document.form1.repass.value))
{
document.form1.repass.focus();
alert("确认密码不能为空！");
return false;
}

if (!(bj(document.form1.pass.value,document.form1.repass.value)))
{
document.form1.repass.focus();
alert("密码不相符请重新输入！");
return false;
}

return true;
}
