﻿// JScript 文件
var act;
var cat;
var jj;
var ii;
var xmlHttp;
function createXMLHttpRequest()
{
    if(window.ActiveXObject)
    {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if(window.XMLHttpRequest)
    {
        xmlHttp = new XMLHttpRequest();
    }
}
function createXMLHttpRequest_1()
{
    if(window.ActiveXObject)
    {
        jj = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if(window.XMLHttpRequest)
    {
        jj = new XMLHttpRequest();
    }
}
function createXMLHttpRequest_2()
{
    if(window.ActiveXObject)
    {
        ii = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if(window.XMLHttpRequest)
    {
        ii = new XMLHttpRequest();
    }
}
function sendpass()
{
    createXMLHttpRequest_1();
    var s_2 = document.getElementById("UserAccount");
    var input = s_2.value;
        url= "Ajax/Ajax_Login.ashx?input="+input+"";
    if(url!="" )
    {
        jj.open("GET",url,true);
        jj.onreadystatechange=ShowResult_111;
        jj.send(null);
    }
}
function sendpass2()
{
    createXMLHttpRequest_2();
    var s_2 = document.getElementById("Login_Zhuce1_UserAccount");
    var input = s_2.value;
        url= "Ajax/Ajax_Login.ashx?input="+input+"";
    if(url!="" )
    {
        ii.open("GET",url,true);
        ii.onreadystatechange=ShowResult2;
        ii.send(null);
    }
}

function close_div()
{
    var bgObj=document.getElementById("bgDiv_2");
    var obj  = document.getElementById("pop");
    bgObj.style.display  = "none";
    obj.style.display  = "none";
    
}
function ShowResult_111()
{
    var SendPassMessage = document.getElementById("SendPassMessage");
    var SendPassMessage_1 = document.getElementById("SendPassMessage_1");
    if(jj.readyState==1)
    {
        SendPassMessage.innerText = "正在处理，请销等..";
    }
    if(jj.readyState==2)
    {
        SendPassMessage.innerText = "正在处理，请销等...";
    }
    if(jj.readyState==3)
    {
        SendPassMessage.innerText = "正在处理，请销等....";
    }
        if(jj.readyState==4)
    {
            if(jj.status==200)//Distric
        {
            SendPassMessage.innerText = jj.responseText;
            SendPassMessage_1.innerText = "或拨打4006666869与我们的客服中心联系，谢谢！";
            if(jj.responseText != "你输入的信息有误，请重新输入")
            {
                
                SendPassMessage.style.color = 'green';
            }
            else
            {
                SendPassMessage.style.color = 'red';
            }
            
        }
    }
}
function ShowResult2()
{
    var SendPassMessage = document.getElementById("Login_Zhuce1_SendPassMessage");
    var SendPassMessage_1 = document.getElementById("Login_Zhuce1_SendPassMessage_1");
    if(ii.readyState==1)
    {
        SendPassMessage.innerText = "正在处理，请销等..";
    }
    if(ii.readyState==2)
    {
        SendPassMessage.innerText = "正在处理，请销等...";
    }
    if(ii.readyState==3)
    {
        SendPassMessage.innerText = "正在处理，请销等....";
    }
        if(ii.readyState==4)
    {
            if(ii.status==200)//Distric
        {
            SendPassMessage.innerText = ii.responseText;
            SendPassMessage_1.innerText = "或拨打4006666869与我们的客服中心联系，谢谢！";
            if(ii.responseText != "你输入的信息有误，请重新输入")
            {
                
                SendPassMessage.style.color = 'green';
            }
            else
            {
                SendPassMessage.style.color = 'red';
            }
            
        }
    }
}
function over(s,wMax,hMax){
  var obj=document.getElementById(s);
  var h = parseInt(obj.offsetHeight);
  var w = parseInt(obj.offsetWidth);
  if (h < hMax && w < wMax){
    obj.style.height = (h + 2)+"px";
    obj.style.width = (w + 2)+"px";
    clearTimeout(act);
    act = setTimeout("over('"+s+"',"+wMax+","+hMax+")", 10);
  }
}
function out(s){
  var obj=document.getElementById(s);
  var h = parseInt(obj.offsetHeight);
  var w = parseInt(obj.offsetWidth);
  if (h > 0 && w > 0){
    obj.style.height = (h - 2)+"px";
    obj.style.width = (w - 2)+"px";
    clearTimeout(cat);
    cat = setTimeout("out('"+s+"')", 10);
  }
  else
  {
    document.getElementById("pop").style.display = "none";
  }
}
function getPosition() {
var top    = document.documentElement.scrollTop;
var left   = document.documentElement.scrollLeft;
var height = document.documentElement.clientHeight;
var width  = document.documentElement.clientWidth;
return {top:top,left:left,height:height,width:width};
}
function showPop(){
    /*
    把窗体其他控件锁死
    */
    close_Alldiv();
    var msgw,msgh,bordercolor;
    msgw=400;//提示窗口的宽度
    msgh=100;//提示窗口的高度
    titleheight=25 //提示窗口标题高度
    bordercolor="#336699";//提示窗口的边框颜色
    titlecolor="#99CCFF";//提示窗口的标题颜色

    var sWidth,sHeight;
    sWidth=document.body.offsetWidth;
    sHeight=document.body.offsetHeight;
    var bgObj=document.getElementById("bgDiv_2");
    bgObj.style.position="absolute";
    bgObj.style.display  = "block";
    bgObj.style.top="0";
    bgObj.style.background="#777";
    bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
    bgObj.style.opacity="0.6";
    bgObj.style.left="0";
    bgObj.style.width=document.body.offsetWidth + "px";
    bgObj.style.height=document.body.offsetHeight + "px";
    bgObj.style.zIndex = "10000";
    
    var alldivTags=document.getElementById("yincang");
    if(alldivTags != null)
    {
            alldivTags.style.display='none';
    }
			//var downdrop = document.getElementById("ProDetialControl1_cboSize");
			//downdrop.style.visibility="hidden";
			//downdrop.style.zIndex = 100000;
			
/*
弹出框的宽度
*/
var width  = 500;
var height = document.getElementById("pop").style.height;  //弹出框的高度
//var width  = 300;  //弹出框的宽度
//var height = 300;  //弹出框的高度
var obj    = document.getElementById("pop");
obj.style.display  = "block";
obj.style.position = "absolute";
obj.style.zIndex   = "10001";
//滑动弹出效果
//over('pop',width,height);
//obj.style.width    = width + "px";clientWidth
//obj.style.height   = height + "px";
var Position = getPosition();
leftadd = (Position.width-width)/2+100;
topadd  = (Position.height-height)/2-100;
obj.style.top  = (document.body.clientHeight -obj.clientHeight)/2  + "px";
obj.style.left = (document.body.clientWidth -obj.clientWidth)/2 + "px";
window.onscroll = function (){
//var Position   = getPosition();
//obj.style.top  = (Position.top  + topadd)  +"px";
//obj.style.left = (Position.left + leftadd) +"px";
obj.style.top  = (document.body.clientHeight -obj.clientHeight)/2  + "px";
obj.style.left = (document.body.clientWidth -obj.clientWidth)/2 + "px";
};
window.onresize = function(){
obj.style.top  = (document.body.clientHeight -obj.clientHeight)/2  + "px";
obj.style.left = (document.body.clientWidth -obj.clientWidth)/2 + "px";
};
}
function hidePop(){
out('pop');
}


