// JavaScript Document
function CheckForms(that) 
{if (that.username.value.length<3 || that.username.value.length>16){alert('用户名不得小于3位，大于16位！');that.username.focus();return false;}
if (that.isreg.value==0){alert('对不起，此用户已被注册，请重新选择一个！');that.email.focus();return false;}
//if (that.utype.selectedIndex==0){alert('请选择会员类型！');that.utype.focus();return false;}
if (that.password.value.length<6 || that.password.value.length>16){alert('密码不得小于6位，大于16位！');that.password.focus();return false;}
if (that.password.value!=that.password2.value){alert ("确认密码和密码不一样!请重新输入!!");that.password.value = "";that.password2.value = "";return false;}
if (that.tel.value==''){alert('电话号码不得为空！');that.tel.focus();return false;}
//if (isNaN(that.tel.value)){alert('电话号码应为数字！');that.tel.focus();return false;}
//if (that.tel.value.length<11){alert('电话号码不得小于11位！');that.tel.focus();return false;}
//if (regx["sheng"].selectedIndex=='0'){alert('请选择省份！');return false;}
//if (that.address.value==''){alert('单位不得为空！');that.address.focus();return false;}
//if (that.qq.value==''){alert('QQ/MSN不得为空！');that.qq.focus();return false;}
//if (that.email.value==''){alert('email不得为空！');that.email.focus();return false;}
//if (that.email.value.charAt(0)=="." || that.email.value.charAt(0)=="@"|| that.email.value.indexOf('@', 0) == -1 || that.email.value.indexOf('.', 0) == -1 || that.email.value.lastIndexOf("@")==that.email.value.length-1 || that.email.value.lastIndexOf(".")==that.email.value.length-1) {alert("Email格式不正确！"); that.email.focus(); return false; } 
}
/*********用户登录*********/
function checkLogin(){
var username=login.username.value;
var password=login.password.value;
if(username==""){
alert('用户名不能为空！');
login.username.focus();
return false;
}
if(password==""){
alert("密码不能为空！");
login.password.focus();
return false;
}
}

function checkLogin2(){
var username=login.username.value;
var password=login.password.value;
var vcode=login.vcode.value;
if(username==""){
alert('用户名不能为空！');
login.username.focus();
return false;
}
if(password==""){
alert("密码不能为空！");
login.password.focus();
return false;
}
if(vcode==""){
alert("验证码不能为空！");
login.vcode.focus();
return false;
}
}

/******弹出窗口*********/
function playerWindow(webname,bk,URLStr, left, top, width, height)
{
window.open(URLStr, webname, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+bk+',resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

/*********搜索歌曲*********/
function checkKey(){
var key=sou.key.value;
if(key==""){
	alert("请输入关键字！");
	sou.key.focus();
	return false;
	}
}


/*****时间函数****/
function clockon()
{
    var now = new Date();
    var year = now.getFullYear(); //getFullYear getYear
    var month = now.getMonth();
    var date = now.getDate();
    var day = now.getDay();
    var hour = now.getHours();
    var minu = now.getMinutes();
    var sec = now.getSeconds();
    var week;
     month = month+1;
    if(month<10)month="0"+month;
    if(date<10)date="0"+date;
    if(hour<10)hour="0"+hour;
    if(minu<10)minu="0"+minu;
    if(sec<10)sec="0"+sec;
    var arr_week = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
     week = arr_week[day];
    var time = "";
     time = year+"年"+month+"月"+date+"日"+" "+week+" "+hour+":"+minu+":"+sec;
 
	document.getElementById("btn_time").innerHTML=time;

    var timer = setTimeout("clockon()",200);  
}


function CheckForm(){
var that=document.zpqz;
if(that.title.value==""){
alert('标题不能为空!')
that.title.focus();
return false;
}
if(that.name.value==""){
alert('联系人不能为空!')
that.name.focus();
return false;
}
if(that.qq.value==""){
alert('QQ不能为空!')
that.qq.focus();
return false;
}
if(that.content.value==""){
alert('介绍不能为空!')
that.content.focus();
return false;
}
}

/****联选,反选*****/
function CheckOthers(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
			if (e.checked==false)
			{
				e.checked = true;
			}
			else
			{
				e.checked = false;
			}
	}
}
  
function CheckAll(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
			e.checked = true;
	}}
  
