﻿var Obj='';
var px=0;
var py=0;
function MD(object) //鼠标放下
{
 Obj=object.id;
 document.all(Obj).setCapture();
 px=event.x-document.all(Obj).style.pixelLeft; // 计算鼠标偏移
 py=event.y-document.all(Obj).style.pixelTop;  
}
function MM()   //鼠标移动
{
  if(Obj!='')
 {
  document.all(Obj).style.left=event.x-px;
  document.all(Obj).style.top=event.y-py;
  }
}
function MU() //鼠标抬起
{
 if(Obj!='')
 {
  document.all(Obj).releaseCapture();
  Obj='';
 }
}
//function islogin()
//{
//    setTimeout('islogin1()',3000);
//}
function islogin()
{
    if(!loginpage.login.islogin().value)
    {
        denglu.style.display="block";
    }
    else
    {
        denglu.style.display="none";
        window.location.href="my/index.html?type=0";
    }
}
function islogin2()
{
    if(!loginpage.login.islogin().value)
    {
        denglu2.style.display="block";
    }
    else
    {
        denglu.style.display="none";
        window.location.href="my/index.html?type=0";
    }
}

function us_dl2() {
    var uid1=document.getElementById("uid2").value;
    var pwd1=document.getElementById("pwd2").value;
	if(uid1==""||uid1.length<6)	{
		alert("用户名不能为空，且大于6位");
		document.getElementById("uid").focus();
		return false;
	}
	if(pwd1==""||pwd1.length<6)	{
		alert("密码不能为空，且大于6位");
		document.getElementById("pwd2").focus();
		return false;
	}
	if(loginpage.login.dl(uid1,pwd1).value)
	{
	    denglu.style.display="none";
	    window.location.reload();
	    return false;
	}
	else
	{
	    alert("用户名或密码错误");
	    return false;
	}
}
function us_dl() {
    var uid1=document.getElementById("uid").value;
    var pwd1=document.getElementById("pwd").value;
	if(uid1==""||uid1.length<6)	{
		alert("用户名不能为空，且大于6位");
		document.getElementById("uid").focus();
		return false;
	}
	if(pwd1==""||pwd1.length<6)	{
		alert("密码不能为空，且大于6位");
		document.getElementById("pwd").focus();
		return false;
	}
	if(loginpage.login.dl(uid1,pwd1).value)
	{
	    denglu.style.display="none";
	    window.location.reload();
	    return false;
	}
	else
	{
	    alert("用户名或密码错误");
	    return false;
	}
	
function us_zc()
{
    var userid=document.getElementById("Text2").value;
    var password=document.getElementById("Password2").value;
    var password2=document.getElementById("Password3").value;
}
}
