﻿document.write('<script language="javascript">function document.onkeydown(){if (document.getElementById("popcontent").style.display!="none"){if(event.keyCode==13){document.getElementById("LinkButton1").click();return false;}}}</script>');

document.write('<div style="display:none;z-index:3001;position:absolute; top:0px; left:0px; width:100%; height:100%; " id="popcontent" >');
document.write('<div id="reg" class=" len_user_login pop_border" style="margin:auto; width:600px; height:280px;background: url(/images/Lenovo-Signup_01_09.jpg) repeat-x left bottom;" >');
document.write('   								<div class="inner" style="float:left; width:600px; height:250px;" >');
document.write('                                <p class="pop_del"><a href="#" onclick="disableBodyArea(false);return false;"><img src="/Images/Lenovo-Signup_01_06.jpg" alt="" /></a></p>');
document.write('                                <p class="pop_title len_magrin_top_add10" style="float:left; text-align:left; font-size:18px; font-family:"黑体"; width:100%; text-indent:38px; margin-bottom:29px; padding-left:38px;"><br>&nbsp;&nbsp;用户登录');
document.write('                                </p>');
                               
document.write('                                <div class="left" style=" float:left; display:inline; padding-left:38px; width:300px; text-align:left; ">');
document.write('                                <Table ID="Table1" >');
                                
document.write('                                 <tr><td width="48px" style="padding-bottom:4px; *padding-bottom:2px;">用户名：</td>');

document.write('                                 <td colspan="2" style="padding-bottom:4px; *padding-bottom:2px;"><input name="txtUserName" type="text" id="txtUserName" class="pop_form_w_178 form_border" style=" border:1px solid #ADBFD5; height:19px;" /></td></tr>');
document.write('                                 <tr><td  style="padding-bottom:4px; *padding-bottom:2px;">密&#12288;码：</td><td colspan="2"><input name="txtPWD" type="password" id="txtPWD" class="pop_form_w_178 form_border"  style=" border:1px solid #ADBFD5; height:19px;"/></td></tr>');
document.write('                                  <tr>');
document.write('                                    <td  style="padding-bottom:4px; *padding-bottom:2px;">验证码：</td><td width="76" style="padding-bottom:4px; *padding-bottom:2px;"><input name="textValidateCode" type="text" id="textValidateCode"  maxlength="4" size="10" class="pop_form_w_76 form_border"  style=" border:1px solid #ADBFD5; height:19px;"/></td>');
document.write('                                    <td style="padding-bottom:4px; *padding-bottom:2px;"> <img src="/formcode.aspx" alt="验证码" style="cursor: hand; margin-bottom: -5px;"      id="imgVali" onclick="GetCode();"alt="点击更换验证码" />');
document.write('                                                         <a href="#" onclick="GetCode();return false;">更换验证码</a></td>');
document.write('                                  </tr>');

document.write('                                   <tr>');
document.write('                                     <td align="right" style="padding-bottom:4px; *padding-bottom:2px;">&nbsp; &nbsp;</td>');
document.write('                                  <td colspan="2" style="padding-bottom:4px; *padding-bottom:2px;"><a id="LinkButton1" href="#" onclick="javascript:login();"><img src="/Images/EUSS_r11_c5.jpg" border="0" align="absmiddle" /></a>');
document.write('                                  &nbsp;&nbsp;<a href="/Forgetpwd.aspx" \>忘记密码？</a>');
                                  
document.write('                                 <div id="resLogin" style="color:Red;"></div>');
document.write('                                  </td>');

document.write('                                  </tr>');
document.write('                                </Table>');
                                
document.write('                                  <span id="information" style="color:Red;"></span>');
                              
                               
document.write('                                </div>');
                                
document.write('                                <div class="right" style=" float:left; width:190px; border:1px solid #82B3CD; line-height:24px; text-align:left; background-color:#FFFEEA; padding:19px 15px;">');
document.write('                                *  请正确输入您的用户名和密码。');
document.write('                                </div>');
document.write('                               <div style="clear:both; text-align:left; padding:10px 0 0 90px;"></div> ');
document.write('                            </div>');
document.write('                  </div>');
document.write('</div>');

document.write('  <div id="topCoverDiv" style="display:none;float:left;z-index:3000;position:absolute;top:0px; left:0px;width:100%;height:100%;;filter:alpha(opacity=80);_moz-opacity:0.8;opacity:0.8;background-image: url(/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png);" ></div>');

function disableBodyArea(f){
//var h = document.body.clientHeight;					//body区域高度 720
var h = document.documentElement.clientWidth ;			//body区域高 998

var pop_posistion =200;		//滚动后pop出现的位置
var appName=navigator.appName;				//浏览器名称
	var hh = h+140; 
	document.getElementById('topCoverDiv').style.height=hh+"px" ;
	document.getElementById('popcontent').style.top=pop_posistion+"px" ;
	document.getElementById('popcontent').style.display = f? '':'none';

	document.getElementById('topCoverDiv').style.display = f? '':'none';
	document.getElementById('reg').style.display = f? '':'none';

}


function showProductList(pageno)
{
if (pageno=="")
{
    pageno=1;
}
	$.ajax({
		type:"POST",
		url:"/getProductList.aspx",
		data:"pageno="+pageno,
		success:function(data)
		{
		var strdata=data;
		document.getElementById('d1').innerHTML=strdata;
		}
	});
}

function showCodeList(pageno)
{
if (pageno=="")
{
    pageno=1;
}
	$.ajax({
		type:"POST",
		url:"/getProductList.aspx",
		data:"pagecode="+pageno,
		success:function(data)
		{
		var strdata=data;
		document.getElementById('d1').innerHTML=strdata;
		}
	});
}

document.write('<div style="display:none;z-index:3002;position:absolute; top:0px; left:0px; width:100%; height:100%; "  id="popProductList" >');
document.write('<!--pop-->');
document.write('<div id="popProductDiv" class=" len_user_login pop_border"  style="background:none;background-color:#eff3f6;height:340px;border-color:#62BBE8;">');
document.write('<div class="inner">');
document.write('<h1 style=" background:#62BBE8; height:23px; line-height:23px;">&nbsp;&nbsp;请选择您所需要的服务产品：<a href="javascript:void(0)" onclick="disableProductList(false);" onmouseover=document.getElementById("img1").src="/Images/bgwhite.jpg" onmouseout=document.getElementById("img1").src="/Images/bgloginpan2.jpg"><img id="img1" src="/Images/bgloginpan2.jpg" alt=""  style=" margin-left:400px; width:18px; margin-top:1px;"/></a></h1>');
document.write('<ul id="u1" style=" margin:0px; padding:0px; margin-top:2px;">');
document.write('<li><div id="d1" style="text-align:center;"><img src="/images/Ajax_Loading.gif" alt="" /></div></li>');
showProductList(1);
document.write('<li style="text-align:center; width:100%; margin-top:5px;"><input type="image" src="/images/close.jpg"  onclick="disableProductList(false)" /></li>');
document.write('</ul>');
document.write('    </div>');
document.write('   </div>');
document.write('</div>');

function funchangePno(ProductNo)
{
    //var ProductNo="";
    //var list=document.getElementById('d1').getElementsByTagName('input');
    //for (var i=0;i<list.length;i++)
    //{
    //    if (list[i].checked)
    //    {
    //        ProductNo=list[i].value;
    //    }
    //}
    
$.ajax({
		type:"POST",
		url:"/changeProNo.aspx",
		data:"ProNo="+ProductNo,
		success:function(data)
		{
            if (data=="1")
            {
                alert('此服务不存在，请重新选择！');
                return false;
            }
            else if(data=="2")
            {
                alert('请重新登录');
                disableProductList(false);
                return false;
            }
			else if (data=="3")
			{
				alert('请选择您要使用的服务产品！');
                return false;
			}
            else
            {
                disableProductList(false);
                window.location.reload();
            }


		}
	});
}

function disableProductList(f){
//var h = document.body.clientHeight;					//body区域高度 720
var h = document.documentElement.clientWidth ;			//body区域高 998
var pop_posistion =140;		//滚动后pop出现的位置
var appName=navigator.appName;				//浏览器名称
	var hh = h+140;
	document.getElementById('topCoverDiv').style.height=hh+"px" ;
	document.getElementById('popProductList').style.top=pop_posistion+"px" ;
	document.getElementById('popProductList').style.display = f? '':'none';

	document.getElementById('topCoverDiv').style.display = f? '':'none';
	document.getElementById('popProductDiv').style.display = f? '':'none';
}
	
	
	
	
function funchangeCode(Code)
{
$.ajax({
		type:"POST",
		url:"/changeProCode.aspx",
		data:"Code="+Code,
		dataType:"json",
		success:function(msg)
		{
           if (msg.Status=="101")
           {
            alert(msg.Message);
           }
           else if (msg.Status=="102")
           {
            alert(msg.Message);
           }
           else if (msg.Status=="103")
           {
            alert(msg.Message);
           }
           else
           {
                disableProductList(false);
                window.location.reload();
           }
		},
		error:function(msg)
		{
		 alert('error');
		}		
	});
}

