
function checkreg()
{
	var username = document.getElementById("username").value;
	var password = document.getElementById("password").value;
	var password1 = document.getElementById("password12").value;
	var mobile = document.getElementById("mobile").value;
	var email = document.getElementById("email").value;
	var msg = "";
	if (username == "") msg += "    请输入用户名!\n\n";
	
	if (password == "") msg += "    请输入密码!\n\n";
	if (password != "")
		{
			if (password.length <= 16 || password.length >= 6) msg += "    密码长度为 6 - 16 位!\n\n";
		}
	if (password1 == "") msg += "    请输入确认密码!\n\n";
	if (password1 != password) msg += "    您两次密码输入不相同!\n\n";
	if (mobile == "") msg += "    请输入手机号码!\n\n";
	if(isNaN(mobile)) msg += "    手机号码必须是11位数字!\n\n";
	if (mobile != "")
		{
			if (mobile.length != 11) msg += "    请输入11位手机号吗!\n\n";
		}
	if(email !="")
	{
		var c_email = /^([0-9a-zA-Z_-])+@+([0-9a-zA-Z_-])+(.[0-9a-zA-Z_-])+/;
		if(!c_email.test(email)) msg += "    请填写正确的邮箱地址!\n\n";
	}
		
	if (msg != "")
		{
			msg = "----------------------------------\n\n"+msg;
			msg = msg + "----------------------------------\n";
			alert (msg);
			return false;
		}
	else
		{
			return true;
		}
}






function checkindexlogin()
{
	var username = document.getElementById("username1").value;
	var password = document.getElementById("password1").value;

	var msg = "";
	if (username == "" || username == "用户名") msg += "    请输入用户名!\n\n";
	

	if (password == "" || password == "服务密码") msg += "    请输入密码!\n\n";
	if (password != "")
		{
			if (password.length > 16 || password.length <= 3) msg += "    密码长度为 3 - 16 位!\n\n";
		}
		
	if (msg != "")
		{
			msg = "----------------------------------\n\n"+msg;
			msg = msg + "----------------------------------\n";
			alert (msg);
			return false;
		}
	else
		{
			return true;
		}
}





//弹出窗口效果
		$(document).ready(function() {
			//示例9，综合效果
			var t9 = new PopupLayer({trigger:"#ele9",popupBlk:"#blk9",closeBtn:"#close9",useOverlay:true,useFx:true,
				offsets:{
					x:0,
					y:-41
				}
			});
			t9.doEffects = function(way){
				if(way == "open"){
					this.popupLayer.css({opacity:0.3}).show(400,function(){
						this.popupLayer.animate({
							left:($(document).width() - this.popupLayer.width())/2,
							top:(document.documentElement.clientHeight - this.popupLayer.height())/2 + $(document).scrollTop(),
							opacity:0.8
						},1000,function(){this.popupLayer.css("opacity",1)}.binding(this));
					}.binding(this));
				}
				else{
					this.popupLayer.animate({
						left:this.trigger.offset().left,
						top:this.trigger.offset().top,
						opacity:0.1
					},{duration:500,complete:function(){this.popupLayer.css("opacity",1);this.popupLayer.hide()}.binding(this)});
				}
			}
		});
