﻿//公用 JScript 文件
//内容:登录/注册

//相关页面：PersonalInfo.aspx   FinancerRegister.aspx  MemberRegister.aspx  MemberInfo.aspx
//相关事件：onchange/onFocus/onBlur/Onclick

//-------------------------------------------------------------
//功能描述：获得控件套用模板后的头
function GetHead(pagetypeName)
{
    if(pagetypeName==0)
    {
        return "ctl00_ctl00_";
    }
    else if(pagetypeName==1)
    {
        return "ctl00_ContentPlaceHolder1_";
    }
    else if(pagetypeName==2)
    {
        return "ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_";
    }
    else if(pagetypeName==5)
    {
        return "";
    }
    else if(pagetypeName==6)
    {
        return "ctl00_";
    }
}

function GetFocus(strId,pageType,event)
{
    if(event.keyCode==13)
    {
        //alert('ddd');
        var headStr = GetHead(pageType)
        if((strId.indexOf('LinkButton1')!=-1 || strId.indexOf('LinkButton2')!=-1) && pageType=='0')
        {
            if(!document.getElementById(headStr + strId)) pageType = '6';
        }
        else if((strId.indexOf('LinkButton1')!=-1 || strId.indexOf('LinkButton2')!=-1) && pageType=='6')
        {
            if(!document.getElementById(headStr + strId)) pageType = '0';
        }
        
        headStr = GetHead(pageType);
        document.getElementById(headStr + strId).click();
        return false;
    }
}

function GetFocus2(strId,strId2,pageType,event)
{
    var headStr = GetHead(pageType)
    if(event.keyCode==13)
    {
        if(document.getElementById(headStr + strId).style.display=='')
        {
            document.getElementById(headStr + strId).click();
            return false;
        }
        else if(document.getElementById(headStr + strId2).style.display=='')
        {
            document.getElementById(headStr + strId2).click();
            return false;
        }
    }
}

function BXBanksLife_O(thisDrop,DropCompany,hDropCompany,txtCompany,htxtCompany,pageType)
{
    var headStr = GetHead(pageType)
    if(thisDrop.selectedIndex!=2){
//        document.getElementById(headStr + txtCompany).style.display='none';
//        document.getElementById(headStr + htxtCompany).value='none';
        document.getElementById(headStr + DropCompany).style.display='';
        document.getElementById(headStr + hDropCompany).value='';
        BXBanks(thisDrop,headStr + DropCompany);
    }
    else{
//        document.getElementById(headStr + txtCompany).style.display='';
//        document.getElementById(headStr + htxtCompany).value='';
        document.getElementById(headStr + DropCompany).style.display='none';
        document.getElementById(headStr + hDropCompany).value='none';
    }
}

function CheckTemp(info)
{
    return confirm(info);
}

function UpDisAndHid(thisSpan,Dis2,hid1,hid2,hidValue3,pageType)
{
    var headStr = GetHead(pageType)
    document.getElementById(headStr + thisSpan).style.display='none';
    document.getElementById(headStr + Dis2).style.display='';
    document.getElementById(headStr + hid1).style.display='none';
    document.getElementById(headStr + hid2).style.display='none';
    document.getElementById(headStr + hidValue3).value='none';
}

function DivDisPlayAndHidden(divDis,divHid,pageType)
{
    //var tdArray = trAll.all.tags("th")
    //alert(tdArray[0].innerHTML+'|'+tdArray.length);
    var headStr = 'ctl00_ctl00_ContentPlaceHolder1_'
    document.getElementById(headStr + divDis).style.display='';
    document.getElementById(headStr + divHid).style.display='none';
//    trDis.style.background="yellow"; 
//    trHid.style.background="green"; 
}

function DivDisPlayAndHiddenD(divDis,divHid,pageType)
{
    var headStr = 'ctl00_ctl00_ContentPlaceHolder1_'
    document.getElementById(headStr + divDis).style.display='';
    document.getElementById(headStr + divHid).style.display='none';
    SetSession('hPOT',divDis);
    //alert(divHid);
}

function btnClickDisDiv(divDis,bt1,bt2,bt3,pageType)
{
    var headStr = GetHead(pageType)
    divDis.style.display='';
    document.getElementById(headStr + bt1).style.display='none';
    document.getElementById(headStr + bt2).style.display='none';
    document.getElementById(headStr +bt3).style.display='none';
}

function btnClickHidDiv(divHid,bt1,bt2,bt3,pageType)
{
    var headStr = GetHead(pageType)
    divHid.style.display='none';
    document.getElementById(headStr + bt1).style.display='';
    document.getElementById(headStr + bt2).style.display='';
    document.getElementById(headStr +bt3).style.display='';
}

function HighMemberRegisteALL(thisChk,tableHeighID,htableHeighID,pageType)
{
    var headStr = GetHead(pageType)
    if(thisChk.checked){
        document.getElementById(headStr + 'TrLowIndustry').style.display='none';
        document.getElementById(headStr + 'hTrLowIndustry').value='none';
        if(document.getElementById(headStr + 'dropLowIndustry').selectedIndex!=0)//选择了行业
        {
            document.getElementById(headStr + 'dropIndustry').selectedIndex = document.getElementById(headStr + 'dropLowIndustry').selectedIndex;
            dropIndustryChanged(document.getElementById(headStr + 'dropLowIndustry'),'dropIndustry1','divdropIndustry1','hdivdropIndustry1','CompanyTr','hCompanyTr','1');
        }
    }
    else{
        document.getElementById(headStr + 'TrLowIndustry').style.display='';
        document.getElementById(headStr + 'hTrLowIndustry').value='';
            document.getElementById(headStr + 'dropLowIndustry').selectedIndex = document.getElementById(headStr + 'dropIndustry').selectedIndex;
    }
    
    HighMemberRegiste(thisChk,tableHeighID,htableHeighID,pageType);
}

function PcontrolCity(thisDrop,cityID)
{
    if(thisDrop.options[thisDrop.selectedIndex].text !='不限'){
        document.getElementById(cityID).disabled=false;
    }
    else{
        document.getElementById(cityID).disabled=true;
    }
    
    FinPC(thisDrop,cityID);
}

function imgOnclickDisTrM(imgThis,spanThis,hspan,lbl,hSession,pageType)
{
    var headStr = GetHead(pageType)
         document.getElementById(headStr+lbl).innerText = '';
    if(imgThis.src.indexOf('ImportP')!=-1){
         imgThis.src = imgThis.src.replace('ImportP','OutPM');
         document.getElementById(headStr+spanThis).style.display = '';
         document.getElementById(headStr+hspan).value = '';
         document.getElementById(headStr+lbl).innerText = '请在列表中选择要导入的产品';
         if(document.getElementById(headStr+hSession).value !='0'){
             document.getElementById(headStr+lbl).innerText = '请重新选择要导入的产品';
             imgThis.src = imgThis.src.replace('OutPM','ProClear');
         }
    }
    else{
         if(imgThis.src.indexOf('OutPM')!=-1){
             imgThis.src = imgThis.src.replace('OutPM','ImportP');
         }
         if(imgThis.src.indexOf('ProClear')!=-1){
             imgThis.src = imgThis.src.replace('ProClear','ImportP');
         }
         
         document.getElementById(headStr+spanThis).style.display = 'none';
         document.getElementById(headStr+hspan).value = 'none';
         if(document.getElementById(headStr+hSession).value !='0'){
             document.getElementById(headStr+lbl).innerText = '您已经导入了产品';
         }
    }
    return false;
}

function imgOnclickDisTr(imgThis,spanThis,hspan,lbl,hSession,pageType)
{
    var headStr = GetHead(pageType)
         document.getElementById(headStr+lbl).innerText = '';
    if(imgThis.src.indexOf('ImportP')!=-1){
         imgThis.src = imgThis.src.replace('ImportP','OutP');
         document.getElementById(headStr+spanThis).style.display = '';
         document.getElementById(headStr+hspan).value = '';
         document.getElementById(headStr+lbl).innerText = '请在列表中选择要导入的产品';
         if(document.getElementById(headStr+hSession).value !='0'){
             document.getElementById(headStr+lbl).innerText = '请重新选择要导入的产品';
             imgThis.src = imgThis.src.replace('OutP','ProClear');
         }
    }
    else{
         if(imgThis.src.indexOf('OutP')!=-1){
             imgThis.src = imgThis.src.replace('OutP','ImportP');
         }
         if(imgThis.src.indexOf('ProClear')!=-1){
             imgThis.src = imgThis.src.replace('ProClear','ImportP');
         }
         
         document.getElementById(headStr+spanThis).style.display = 'none';
         document.getElementById(headStr+hspan).value = 'none';
         if(document.getElementById(headStr+hSession).value !='0'){
             document.getElementById(headStr+lbl).innerText = '您已经导入了产品';
         }
    }
    return false;
}

function imgOnclickDisHTML(imgThis,spanThis)
{
    if(imgThis.src.indexOf('displayTr')!=-1){
         imgThis.src = imgThis.src.replace('displayTr','hiddenTr');
         spanThis.style.display = '';
    }
    else{
         imgThis.src = imgThis.src.replace('hiddenTr','displayTr');
         spanThis.style.display = 'none';
    }
}

//txtOnblurRegTestFocus(this,'文本','false','^(([1-9][0-9]*)|0)$');"
function txtOnblurRegTestFocus(thisTxt,disInfo,isNeedFill,reg)
{
    var boolTemp = true;
    if('false'!=isNeedFill && thisTxt.value.length==0){
        boolTemp = false;
        alert(disInfo+"不可为空");
        thisTxt.focus();
    }
   
    if(thisTxt.value.length!=0 && !txtMatchReg(thisTxt.value,reg)){
        alert(disInfo);
        thisTxt.focus();
    }
}
//txtOnblurRegTestFocus(this,'文本','false','^(([1-9][0-9]*)|0)$');"
function txtOnblurRegTestTempFocus(thisTxt,disInfo,isNeedFill,reg)
{
    var boolTemp = true;
    if('false'!=isNeedFill && thisTxt.value.length==0){
        boolTemp = false;
        alert(disInfo+"不可为空");
        thisTxt.focus();
    }
   
    if(thisTxt.value.length!=0 && !txtMatchRegTemp(thisTxt.value,reg)){
        alert(disInfo);
        thisTxt.focus();
    }
}

//验证正规式的使用/^***$/g，符合规则返回true
function txtMatchReg(str,strReg)
{
    //alert(str + '*'+ strReg);
    var re= new RegExp(strReg ,"ig");
   //alert(re);
    return re.test(str)?true:false;
}

function txtMatchRegTemp(str,strReg)
{
    return strReg.test(str)?true:false;
}

function DisAndCloseTRVote(thisSpan,spandis,mainID,hid,pageType)
{
    var headStr = GetHead(pageType)
    var mainBody = document.getElementById(headStr+mainID);
    var hidTd = document.getElementById(headStr+hid);
    for(var i = 0;i < thisSpan.childNodes.length;i++)
    {
        if(thisSpan.childNodes[i].nodeName=='IMG' || thisSpan.childNodes[i].nodeName=='img'){
            if(thisSpan.childNodes[i].src.indexOf('/displayTr.gif')!=-1){
                thisSpan.childNodes[i].src = '../images/hiddenTr.gif';
                spandis.innerText = '隐藏';
                mainBody.style.display = '';
                hidTd.value = '';
            }
            else if(thisSpan.childNodes[i].src.indexOf('/hiddenTr.gif')!=-1){
                thisSpan.childNodes[i].src = '../images/displayTr.gif';
                spandis.innerText = '添加';
                mainBody.style.display = 'none';
                hidTd.value = 'none';
            }
        }
    }
}

function DisAndChangeBody(thisSpan,mainBody,mainTese)
{
    for(var i = 0;i < thisSpan.childNodes.length;i++)
    {
        if(thisSpan.childNodes[i].nodeName=='IMG' || thisSpan.childNodes[i].nodeName=='img'){
            if(thisSpan.childNodes[i].src.indexOf('/displayTr.gif')!=-1){
                thisSpan.childNodes[i].src = '../images/hiddenTr.gif';
                mainBody.style.display = '';
                mainTese.style.display = '';
            }
            else if(thisSpan.childNodes[i].src.indexOf('/hiddenTr.gif')!=-1){
                thisSpan.childNodes[i].src = '../images/displayTr.gif';
                mainBody.style.display = 'none';
                mainTese.style.display = 'none';
            }
        }
    }
}

function DisAndChangeTese(thisSpan,mainTese)
{
    if(thisSpan.innerText == '- 产品特色'){
        thisSpan.innerText = '+ 产品特色';
        mainTese.style.display = 'none';
    }
    else if(thisSpan.innerText == '+ 产品特色'){
        thisSpan.innerText = '- 产品特色';
        mainTese.style.display = '';
    }
}

function ImgClickDisSpan(thisBtn,spanBtn,spanID,hID,pageType)
{
    var headStr = GetHead(pageType)
    thisBtn.style.display='none';
    document.getElementById(headStr + spanBtn).value='none';
    document.getElementById(headStr + spanID).style.display='';
    document.getElementById(headStr + hID).value='';
}

function DisAndChangeTrInfo(thisSpan,tr)
{
    var info = thisSpan.innerText.substring(2,thisSpan.innerText.length);
    if(thisSpan.innerText == '- '+ info){
        thisSpan.innerText = '+ '+ info;
        tr.style.display = 'none';
    }
    else if(thisSpan.innerText == '+ '+ info){
        thisSpan.innerText = '- '+ info;
        tr.style.display = '';
    }
}

function ChekGJJ(text,info,valueStr)
{
    if(txtPageStyleTestReturn(text,info,'false','int'))
    {
        ChekGJJM(text,info,valueStr);
    }
}

function ChekGJJM(text,info,valueStr)
{
    var year=parseInt(text.value);
    if(year>parseInt(valueStr))
    {
        alert(info+'不得超过'+ valueStr+'年');
        text.focus();
    }
}
//使控件获得焦点
function TxtOnFocusComment(txtID,pagetype)
{
    var headStr = GetHead(pagetype)
    document.getElementById(headStr+txtID).focus();
}
//选择头像
function GenderControlPhotoM(thisRadio,imgID,hgender,pagetype)
{
    var headStr = GetHead(pagetype)
    var headPhoto = '';
    if(pagetype==2) headPhoto = '../';
    if(document.getElementById(thisRadio.id+'_0').checked==true)
    {
        document.getElementById(headStr+imgID).src=headPhoto + 'userface/Member.gif';
        document.getElementById(headStr+hgender).value='userface/Member.gif';
    }
    else
    {
        document.getElementById(headStr+imgID).src=headPhoto + 'userface/MemberGirl.gif';
        document.getElementById(headStr+hgender).value='userface/MemberGirl.gif';
    }
}
//选择头像
function GenderControlPhoto(thisRadio,imgID,hgender,pagetype)
{
    var headStr = GetHead(pagetype)
    var headPhoto = '';
    if(pagetype==2) headPhoto = '../';
    if(document.getElementById(thisRadio.id+'_0').checked==true)
    {
        document.getElementById(headStr+imgID).src=headPhoto + 'userface/FinancerBoy.gif';
        document.getElementById(headStr+hgender).value='userface/FinancerBoy.gif';
    }
    else
    {
        document.getElementById(headStr+imgID).src=headPhoto + 'userface/FinancerGirl.gif';
        document.getElementById(headStr+hgender).value='userface/FinancerGirl.gif';
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)：onchange="IndustryTypeChange('DropDownList6','divIndustryType','hdivIndustryType','2')"
//--------------------------------------------------------------------------------------------
//相关页面：PersonalInfo.aspx
//功能描述：当drop改变时触发，且值为其他时隐藏的层显示    选择''行业类别''
function IndustryTypeChange(dropName,divName,hName,pagetype)
{
    var headStr = GetHead(pagetype)
    var dropValue =document.getElementById(headStr+dropName).options[document.getElementById(headStr+dropName).selectedIndex].value
    document.getElementById(headStr+divName).style.display='none';
    document.getElementById(headStr+hName).value = 'none';
    if(dropValue=="其他")
    {
        document.getElementById(headStr+divName).style.display='';
        document.getElementById(headStr+hName).value = '';
    }
    else
    {
        document.getElementById(headStr+divName).style.display='none';
        document.getElementById(headStr+hName).value = 'none';
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)：OnChange = "CompanyTypeChange(this,'jobLevel','hiddenJob','dropLevelState','2');"
//--------------------------------------------------drop----div-------hidden---------drop------pageType-------------
//相关页面：PersonalInfo.aspx
//功能描述：当drop改变时触发，且值为其他时隐藏的层显示并且为层中的drop赋值    选择''单位性质--职位状况''
function CompanyTypeChange(thisDrop,divJobLevelID,hiddenJobID,dropLevelStateID,pagetype)
{
    var headStr = GetHead(pagetype)
    var dropComapanyTypeValue = thisDrop.options[thisDrop.selectedIndex].value
    var jobLevel = document.getElementById(headStr+divJobLevelID)
    var dropLevelState = document.getElementById(headStr+dropLevelStateID)
    var hiddenJob = document.getElementById(headStr+hiddenJobID)
    dropLevelState.length =0;
    jobLevel.style.display='none';
    hiddenJob.value='none';
    if(dropComapanyTypeValue=="政府机关/事业单位"|| dropComapanyTypeValue=="军队" )
    {
        jobLevel.style.display='';
        hiddenJob.value='';
        dropLevelState.length =0;
        dropLevelState.options[dropLevelState.length] = new Option("--请选择--");
        dropLevelState.options[dropLevelState.length] = new Option("（副）厅/局级以上");
        dropLevelState.options[dropLevelState.length] = new Option("（副）处级");
        dropLevelState.options[dropLevelState.length] = new Option("（副）科级");
        dropLevelState.options[dropLevelState.length] = new Option("科员");
        dropLevelState.selectedIndex = 0;
    }
    else if(dropComapanyTypeValue=="国营企业"|| dropComapanyTypeValue=="外资/合资企业" || dropComapanyTypeValue=="私营企业" || dropComapanyTypeValue=="个体经营/自由职业" || dropComapanyTypeValue=="其他")
    {
        jobLevel.style.display='';
        hiddenJob.value='';
        dropLevelState.length =0;
        dropLevelState.options[dropLevelState.length] = new Option("--请选择--");
        dropLevelState.options[dropLevelState.length] = new Option("董事长/（副）总经理");
        dropLevelState.options[dropLevelState.length] = new Option("总监/高级经理");
        dropLevelState.options[dropLevelState.length] = new Option("经理/主管");
        dropLevelState.options[dropLevelState.length] = new Option("普通员工");
        dropLevelState.selectedIndex = 0;
    }
}
function CompanyTypeChangeObj(thisDrop,divJobLevelID,hiddenJobID,dropLevelStateID,pagetype)
{
    var headStr = GetHead(pagetype)
    var dropComapanyTypeValue = thisDrop.options[thisDrop.selectedIndex].value
    var jobLevel = document.getElementById(headStr+divJobLevelID)
    var dropLevelState = document.getElementById(headStr+dropLevelStateID)
    var hiddenJob = document.getElementById(headStr+hiddenJobID)
    dropLevelState.length =0;
    jobLevel.style.display='none';
    hiddenJob.value='none';
    if(dropComapanyTypeValue=="政府机关/事业单位"|| dropComapanyTypeValue=="军队" )
    {
        jobLevel.style.display='';
        hiddenJob.value='';
        dropLevelState.length =0;
        dropLevelState.options[dropLevelState.length] = new Option("--请选择--");
        dropLevelState.options[dropLevelState.length] = new Option("（副）厅/局级以上");
        dropLevelState.options[dropLevelState.length] = new Option("（副）处级");
        dropLevelState.options[dropLevelState.length] = new Option("（副）科级");
        dropLevelState.options[dropLevelState.length] = new Option("科员");
        dropLevelState.selectedIndex = 0;
    }
    else if(dropComapanyTypeValue=="国营企业"|| dropComapanyTypeValue=="外资/合资企业" || dropComapanyTypeValue=="私营企业" || dropComapanyTypeValue=="个体经营/自由职业" || dropComapanyTypeValue=="其他")
    {
        jobLevel.style.display='';
        hiddenJob.value='';
        dropLevelState.length =0;
        dropLevelState.options[dropLevelState.length] = new Option("--请选择--");
        dropLevelState.options[dropLevelState.length] = new Option("董事长/（副）总经理");
        dropLevelState.options[dropLevelState.length] = new Option("总监/高级经理");
        dropLevelState.options[dropLevelState.length] = new Option("经理/主管");
        dropLevelState.options[dropLevelState.length] = new Option("普通员工");
        dropLevelState.selectedIndex = 0;
    }
    else if(dropComapanyTypeValue=='学生/无工作')
    {
        jobLevel.style.display='none';
        hiddenJob.value='none';
    }
}

function CompanyTypeChangePer(thisDrop,divJobLevelID,hiddenJobID,dropLevelStateID,pagetype)
{
    var headStr = GetHead(pagetype)
    var dropComapanyTypeValue = thisDrop.options[thisDrop.selectedIndex].value
    var jobLevel = document.getElementById(headStr+divJobLevelID)
    var dropLevelState = document.getElementById(headStr+dropLevelStateID)
    var hiddenJob = document.getElementById(headStr+hiddenJobID)
    dropLevelState.length =0;
    jobLevel.style.display='none';
    hiddenJob.value='none';
    if(dropComapanyTypeValue=="政府机关/事业单位"|| dropComapanyTypeValue=="军队" )
    {
        jobLevel.style.display='';
        hiddenJob.value='';
        dropLevelState.length =0;
        dropLevelState.options[dropLevelState.length] = new Option("--职位级别--");
        dropLevelState.options[dropLevelState.length] = new Option("（副）厅/局级以上");
        dropLevelState.options[dropLevelState.length] = new Option("（副）处级");
        dropLevelState.options[dropLevelState.length] = new Option("（副）科级");
        dropLevelState.options[dropLevelState.length] = new Option("科员");
        dropLevelState.selectedIndex = 0;
    }
    else if(dropComapanyTypeValue=="国营企业"|| dropComapanyTypeValue=="外资/合资企业" || dropComapanyTypeValue=="私营企业" || dropComapanyTypeValue=="个体经营/自由职业" || dropComapanyTypeValue=="其他")
    {
        jobLevel.style.display='';
        hiddenJob.value='';
        dropLevelState.length =0;
        dropLevelState.options[dropLevelState.length] = new Option("--职位级别--");
        dropLevelState.options[dropLevelState.length] = new Option("董事长/（副）总经理");
        dropLevelState.options[dropLevelState.length] = new Option("总监/高级经理");
        dropLevelState.options[dropLevelState.length] = new Option("经理/主管");
        dropLevelState.options[dropLevelState.length] = new Option("普通员工");
        dropLevelState.selectedIndex = 0;
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)： OnChange = "SetDropsHiddenValue(this,'hdropLevelStateValue','2');"
//-----------------------------------------------------drop--------hidden-------PageType------------------------
//相关页面：PersonalInfo.aspx
//功能描述：当drop改变时触发，获得drop选定值放入hiddenValue    选择''职位状况''
function SetDropsHiddenValue(thisDrop,hdropLevelStateValueID,pagetype)
{
    var headStr = GetHead(pagetype)
    var dropLevelStateValue = thisDrop.options[thisDrop.selectedIndex].value
    document.getElementById(headStr+hdropLevelStateValueID).value=dropLevelStateValue;
}

//-------------------------------------------------------------
//调用方法(主调函数)： OnChange = "HouseTypeChange(this,'zu','hzu','gong','hgong','2');"
//-------------------------------------------------drop--div-hidden--div--hidden-PageType------------------------
//相关页面：PersonalInfo.aspx
//功能描述：当drop改变时触发   选择''住宅状况''
function HouseTypeChange(thisDrop,divZuID,hDivZuID,divGongID,hDivGongID,pagetype)
{
    var headStr = GetHead(pagetype)
    var drop9Value = thisDrop.options[thisDrop.selectedIndex].value
    var zu = document.getElementById(headStr+divZuID)
    var gong = document.getElementById(headStr+divGongID)
    var hzu = document.getElementById(headStr+hDivZuID)
    var hgong = document.getElementById(headStr+hDivGongID)
    zu.style.display='none';
    gong.style.display='none';
    hzu.value = 'none';
    hgong.value = 'none';
    if(drop9Value=="租房")
    {
        zu.style.display='';
        gong.style.display='none';
        hzu.value = '';
        hgong.value = 'none';
    }
    else if(drop9Value=="产权房有贷款")
    {
        zu.style.display='none';
        gong.style.display='';
        hzu.value = 'none';
        hgong.value = '';
    }
}

function HouseTypeChangeC(thisDrop,divZuID,hDivZuID,divGongID,hDivGongID,divRightID,hDivRightID,pagetype)
{
    var headStr = GetHead(pagetype)
    var drop9Value = thisDrop.options[thisDrop.selectedIndex].value
    var zu = document.getElementById(headStr+divZuID)
    var gong = document.getElementById(headStr+divGongID)
    var hzu = document.getElementById(headStr+hDivZuID)
    var hgong = document.getElementById(headStr+hDivGongID)
    var right = document.getElementById(headStr+divRightID)
    var hright = document.getElementById(headStr+hDivRightID)
    zu.style.display='none';
    gong.style.display='none';
    hzu.value = 'none';
    hgong.value = 'none';
    right.style.display='none';
    hright.value = 'none';
    if(drop9Value=="租房")
    {
        zu.style.display='';
        gong.style.display='none';
        right.style.display='none';
        hzu.value = '';
        hgong.value = 'none';
        hright.value = 'none';
    }
    else if(drop9Value=="产权房有贷款")
    {
        zu.style.display='none';
        gong.style.display='';
        right.style.display='';
        hzu.value = 'none';
        hgong.value = '';
        hright.value = '';
    }
    
    if(drop9Value=="产权房无贷款")
    {
        right.style.display='';
        hright.value = '';
    }
    
}

//-------------------------------------------------------------
//调用方法(主调函数)：  OnChange = "dropCarStateChange(this,'CarCredit','hCarCredit','2');"
//-----------------------------------------------------drop-----div--------hidden---PageType------------------------
//相关页面：PersonalInfo.aspx
//功能描述：当drop改变时触发   选择''汽车状况''
function dropCarStateChange(thisDrop,divCarCreditID,hDivCarCreditID,pagetype)
{
    var headStr = GetHead(pagetype)
    var dropCarStateValue = thisDrop.options[thisDrop.selectedIndex].value
    var CarCredit = document.getElementById(headStr+divCarCreditID)
    var hCarCredit = document.getElementById(headStr+hDivCarCreditID)
    if(dropCarStateValue=="有汽车有贷款")
    {
        CarCredit.style.display='';
        hCarCredit.value='';
    }
    else
    {
        CarCredit.style.display='none';
        hCarCredit.value='none';
    }
}
//-------------------------------------------------------------
//调用方法(主调函数)：  OnChange = "dropChangeDivDisByValue(this,'1','CarCredit','hCarCredit','2');"
//-----------------------------------------------------drop-----div--------hidden---PageType------------------------
//相关页面：PersonalInfo.aspx
//功能描述：当drop改变时触发   
function dropChangeDivDisByValue(thisDrop,dropIndex,divID,hDivID,pagetype)
{
    var headStr = GetHead(pagetype)
    var Index = thisDrop.selectedIndex
    var div = document.getElementById(headStr+divID)
    var hdiv = document.getElementById(headStr+hDivID)
    if(Index==dropIndex)
    {
        div.style.display='';
        hdiv.value='';
    }
    else
    {
        div.style.display='none';
        hdiv.value='none';
    }
}

function dropChangeDivDisByValueP(thisDrop,dropIndex,divID,hDivID,pagetype)
{
    dropChangeDivDisByValue(thisDrop,dropIndex,divID,hDivID,pagetype);
    ProductLinkageCard(thisDrop,'keyWordInfo','htemp2','1');
}

function ProductLinkageCardP(thisDrop,spanID,pageType)
{
    var headStr = GetHeadV(pageType)
    var htempName = document.getElementById(headStr + 'htemp2')
    var spanDis = document.getElementById(headStr + spanID)
    if(htempName!='undefined')
    {
        if(thisDrop.selectdIndex!='undefined')
        {
            var spans=spanDis.all.tags("span")
            for(var i = 0; i < spans.length; i++)
            {  
                obj=spans[i];
                if(obj.innerText==htempName.value){  obj.innerText=thisDrop.options[thisDrop.selectedIndex].text;htempName.value=obj.innerText;}
            } 
        }
    }
}

// onchange="dropSpansDis(this,'0*1*2*3,'spanOther1Lines1','spanOther1Lines2','1');"
//-------------------------------------------------------------
function dropSpansDis(thisDrop,item1s,div1ID,div2ID,pagetype)
{
    var headStr = GetHead(pagetype)
    var div1 = document.getElementById(headStr+div1ID)
    var hDiv1 = document.getElementById(headStr+'h'+div1ID)
    var div2 = document.getElementById(headStr+div2ID)
    var hDiv2 = document.getElementById(headStr+'h'+div2ID)
    
    div1.style.display='none';
    hDiv1.value='none';
    div2.style.display='none';
    hDiv2.value='none';
    
    if(IsInArrayL(thisDrop.selectedIndex,item1s))
    {
        div1.style.display='';
        hDiv1.value='';
    }
    else
    {
        div2.style.display='';
        hDiv2.value='';
    }
}

function IsInArrayL(index,itemsStr)
{
    var itemsArray = itemsStr.split('*')
    for(var i = 0;i<itemsArray.length;i++)
    {
        if(itemsArray[i]==index) return true;
    }
    return false;
}
//-------------------------------------------------------------
//调用方法(主调函数)：onFocus = "onFocusDis('PersonInfoMobile','111')"
//----------------------------------------------span--------PageType------------------------
//相关页面：PersonalInfo.aspx
//功能描述： 功能指控件获得焦点则另一个控件显示  ''手机号码''
function onFocusDis(controlsName,pagetype)
{
    if(pagetype==111)
    {
        document.getElementById(controlsName).style.display = '';
    }
    else
    {
        var headStr = GetHead(pagetype);
        var controls = document.getElementById(headStr+controlsName)
        controls.style.display = '';
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)：  OnChange="DefineSpanDis(this,'DefineSpan','hfDefineSpan','1');"
//----------------------------------------------drop-----div----------hidden----PageType------------------------
//相关页面：FinancerRegister.aspx
//功能描述："密码查询问题" 当drop改变时触发选择
function DefineSpanDis(thisDrop,divDefineSpanID,hfDefineSpanID,pagetype)
{
    var headStr = GetHead(pagetype)
    var dropPwdQuestionValue = thisDrop.options[thisDrop.selectedIndex].value
    var DefineSpan = document.getElementById(headStr+divDefineSpanID)
    var hfDefineSpan = document.getElementById(headStr+hfDefineSpanID)
    if(dropPwdQuestionValue=='--自定义问题--')
    {
        DefineSpan.style.display='';
        hfDefineSpan.value='';
    }
    else
    {
        DefineSpan.style.display='none';
        hfDefineSpan.value='none';
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)：  OnChange="dropIndustryChanged(this,'dropIndustry1','divdropIndustry1','hdivdropIndustry1','CompanyTr','hCompanyTr','1');"
//----------------------------------------------------drop------drop-------------div------------------hidden----------div--------hidden--PageType------------------------
//相关页面：FinancerRegister.aspx
//功能描述：当drop改变时触发   银行3级联动
function dropIndustryChanged(thisDrop,dropIndustry1ID,divdropIndustry1ID,hdivdropIndustry1ID,divCompanyTrID,hDivCompanyTrID,pagetype)
{
    var headStr = GetHead(pagetype)
    var strValue=thisDrop.options[thisDrop.selectedIndex].value
    
    var Industry1 = document.getElementById(headStr+dropIndustry1ID)
    var divdropIndustry1 = document.getElementById(headStr+divdropIndustry1ID)
    var hdivdropIndustry1 = document.getElementById(headStr+hdivdropIndustry1ID)
    
    var CompanyTr = document.getElementById(headStr+divCompanyTrID)
    var hCompanyTr = document.getElementById(headStr+hDivCompanyTrID)
    
    document.getElementById(headStr+"divdropIndustry2").style.display='none';
    document.getElementById(headStr+"hdivdropIndustry2").value='none';
    
    CompanyTr.style.display='none';
    hCompanyTr.value='none';
    
    divdropIndustry1.style.display='none';
    hdivdropIndustry1.value='none';
    Industry1.length=0;
    
     if(strValue=="--请选择--")
    {
        divdropIndustry1.style.display='none';
        hdivdropIndustry1.value='none';
        Industry1.length=0;
    }
    else if(strValue=="1")//银行机构分类
    {
        divdropIndustry1.style.display='';
        hdivdropIndustry1.value='';
        Industry1.length=0;
        Industry1.options[Industry1.length] = new Option("--请选择--","--请选择--");
        Industry1.options[Industry1.length] = new Option("全国性银行","全国性银行");
        Industry1.options[Industry1.length] = new Option("地区性银行","地区性银行");
        Industry1.options[Industry1.length] = new Option("外资商业银行","外资商业银行");
        Industry1.options[Industry1.length] = new Option("汽车金融公司","汽车金融公司");
        Industry1.options[Industry1.length] = new Option("担保公司","担保公司");
        Industry1.options[Industry1.length] = new Option("贷款中介机构","贷款中介机构");
        Industry1.options[Industry1.length] = new Option("信用卡代理机构","信用卡代理机构");
        Industry1.options[Industry1.length] = new Option("其他","其他");
        Industry1.selectedIndex = 0;
    }
    else if(strValue=="2")//保险机构分类
    {
        divdropIndustry1.style.display='';
        hdivdropIndustry1.value='';
        Industry1.length=0;
        Industry1.options[Industry1.length] = new Option("--请选择--","--请选择--");
        Industry1.options[Industry1.length] = new Option("中资寿险公司","中资寿险公司");
        Industry1.options[Industry1.length] = new Option("外资/合资寿险公司","外资/合资寿险公司");
        Industry1.options[Industry1.length] = new Option("中资产险公司","中资产险公司");
        Industry1.options[Industry1.length] = new Option("外资产险公司","外资产险公司");
        Industry1.options[Industry1.length] = new Option("保险经纪公司","保险经纪公司");
        Industry1.options[Industry1.length] = new Option("保险代理公司","保险代理公司");
        Industry1.options[Industry1.length] = new Option("其他","其他");
        Industry1.selectedIndex = 0;
    }
    else if(strValue=="3")//券商分类
    {
        divdropIndustry1.style.display='';
        hdivdropIndustry1.value='';
        Industry1.length=0;
        Industry1.options[Industry1.length] = new Option("--请选择--","--请选择--");
        Industry1.options[Industry1.length] = new Option("上海证券机构","上海证券机构");
        Industry1.options[Industry1.length] = new Option("深圳证券机构","深圳证券机构");
        Industry1.options[Industry1.length] = new Option("北京证券机构","北京证券机构");
        Industry1.options[Industry1.length] = new Option("江苏证券机构","江苏证券机构");
        Industry1.options[Industry1.length] = new Option("广东证券机构","广东证券机构");
        Industry1.options[Industry1.length] = new Option("浙江证券机构","浙江证券机构");
        Industry1.options[Industry1.length] = new Option("四川证券机构","四川证券机构");
//      Industry1.options[Industry1.length] = new Option("山东证券机构","山东证券机构");
        Industry1.options[Industry1.length] = new Option("其他地区券商","其他地区券商");
        Industry1.selectedIndex = 0;
    }
    else if(strValue=="4")//基金分类
    {
        divdropIndustry1.style.display='';
        hdivdropIndustry1.value='';
        Industry1.length=0;
        Industry1.options[Industry1.length] = new Option("--请选择--","--请选择--");
        Industry1.options[Industry1.length] = new Option("宝盈基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("博时基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("长城基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("长盛基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("长信基金管理有限责任公司");
        Industry1.options[Industry1.length] = new Option("大成基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("富国基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("广发基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("国联安基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("国泰基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("海富通基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("华安基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("华夏基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("嘉实基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("金鹰基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("南方基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("鹏华基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("融通基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("申万巴黎基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("泰信基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("天同基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("天治基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("泰达荷银基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("易方达基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("银河基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("银华基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("中融基金管理有限公司");
        Industry1.options[Industry1.length] = new Option("中信基金管理有限责任公司");
        Industry1.options[Industry1.length] = new Option("其他","其他");
        Industry1.selectedIndex = 0;
    }
    else//其他无下级分类的一级分类
    {
        CompanyTr.style.display='';
        hCompanyTr.value="";
        divdropIndustry1.style.display='none';
        hdivdropIndustry1.value='none';
        Industry1.length=0;
    }
}
//--------------------------------------------------------更改只是改变了dropIndustry1Changed的内容
//OnChange="dropIndustry1Changed(this,'dropIndustry','divdropIndustry1','hdivdropIndustry1','dropIndustry2','divdropIndustry2','hdivdropIndustry2','CompanyTr','hCompanyTr','1');"
function dropIndustry1Changed(thisDrop,dropIndustryID,divdropIndustry1ID,hdivdropIndustry1ID,dropIndustry2ID,divdropIndustry2ID,hdivdropIndustry2ID,divCompanyTrID,hDivCompanyTrID,pagetype)
{
    var headStr = GetHead(pagetype)
    var IndustryValue=document.getElementById(headStr+dropIndustryID).options[document.getElementById(headStr+dropIndustryID).selectedIndex].value
    var Industry1Value=thisDrop.options[thisDrop.selectedIndex].value
    var hdivdropIndustry1Value = document.getElementById(headStr+hdivdropIndustry1ID)
        
    var divdropIndustry2 = document.getElementById(headStr+divdropIndustry2ID)
    var hdivdropIndustry2 = document.getElementById(headStr+hdivdropIndustry2ID)
    var Industry2 = document.getElementById(headStr+dropIndustry2ID)
    
    var CompanyTr = document.getElementById(headStr+divCompanyTrID)
    var hCompanyTr = document.getElementById(headStr+hDivCompanyTrID)

    hdivdropIndustry1Value.value = Industry1Value;
    divdropIndustry2.style.display='none';
    hdivdropIndustry2.value='none';
    Industry2.length=0;
    
    CompanyTr.style.display='none';
    hCompanyTr.value='none';
    
    if(IndustryValue=="1")//银行A类:
    {
        CompanyTr.style.display='none';
        hCompanyTr.value='none';
        if(Industry1Value=="全国性银行")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("中国工商银行");
            Industry2.options[Industry2.length] = new Option("中国农业银行");
            Industry2.options[Industry2.length] = new Option("中国银行");
            Industry2.options[Industry2.length] = new Option("中国建设银行");
            Industry2.options[Industry2.length] = new Option("交通银行");
            Industry2.options[Industry2.length] = new Option("招商银行");
            Industry2.options[Industry2.length] = new Option("民生银行");
            Industry2.options[Industry2.length] = new Option("中信银行");
            Industry2.options[Industry2.length] = new Option("兴业银行");
            Industry2.options[Industry2.length] = new Option("上海浦东发展银行");
            Industry2.options[Industry2.length] = new Option("深圳发展银行");
            Industry2.options[Industry2.length] = new Option("广东发展银行");
            Industry2.options[Industry2.length] = new Option("华夏银行");
            Industry2.options[Industry2.length] = new Option("中国光大银行");
            Industry2.options[Industry2.length] = new Option("渤海银行");
            Industry2.options[Industry2.length] = new Option("浙商银行");
            Industry2.options[Industry2.length] = new Option("徽商银行");
            Industry2.options[Industry2.length] = new Option("江苏银行");
            Industry2.options[Industry2.length] = new Option("恒丰银行");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="外资商业银行")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("汇丰银行");
            Industry2.options[Industry2.length] = new Option("花旗银行");
            Industry2.options[Industry2.length] = new Option("渣打银行");
            Industry2.options[Industry2.length] = new Option("荷兰银行");
            Industry2.options[Industry2.length] = new Option("东亚银行");
            Industry2.options[Industry2.length] = new Option("恒生银行");
            Industry2.options[Industry2.length] = new Option("永亨银行");
            Industry2.options[Industry2.length] = new Option("瑞穗实业银行");
            Industry2.options[Industry2.length] = new Option("三菱东京日联银行");
            Industry2.options[Industry2.length] = new Option("星展银行");
            Industry2.options[Industry2.length] = new Option("巴黎国民银行");
            Industry2.options[Industry2.length] = new Option("华侨银行");
            Industry2.options[Industry2.length] = new Option("南洋银行");
            Industry2.options[Industry2.length] = new Option("大华银行");
            Industry2.options[Industry2.length] = new Option("丰业银行");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
       else if(Industry1Value=="地区性银行")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("上海银行");
            Industry2.options[Industry2.length] = new Option("北京银行");
            Industry2.options[Industry2.length] = new Option("广州市商业银行");
            Industry2.options[Industry2.length] = new Option("深圳平安银行");
            Industry2.options[Industry2.length] = new Option("宁波银行");
            Industry2.options[Industry2.length] = new Option("南京银行");
            Industry2.options[Industry2.length] = new Option("江苏银行");
            Industry2.options[Industry2.length] = new Option("浙商银行");
            Industry2.options[Industry2.length] = new Option("恒丰银行");
            Industry2.options[Industry2.length] = new Option("徽商银行");
            Industry2.options[Industry2.length] = new Option("渤海银行");
            Industry2.options[Industry2.length] = new Option("天津市商业银行");
            Industry2.options[Industry2.length] = new Option("苏州市商业银行");
            Industry2.options[Industry2.length] = new Option("无锡市商业银行");
            Industry2.options[Industry2.length] = new Option("常州市商业银行");
            Industry2.options[Industry2.length] = new Option("杭州市商业银行");
            Industry2.options[Industry2.length] = new Option("温州市商业银行");
            Industry2.options[Industry2.length] = new Option("绍兴市商业银行");
            Industry2.options[Industry2.length] = new Option("台州市商业银行");
            Industry2.options[Industry2.length] = new Option("浙江泰隆商业银行");
            Industry2.options[Industry2.length] = new Option("浙江民泰商业银行");
            Industry2.options[Industry2.length] = new Option("佛山市商业银行");
            Industry2.options[Industry2.length] = new Option("东莞市商业银行");
            Industry2.options[Industry2.length] = new Option("珠海市商业银行");
            
            Industry2.options[Industry2.length] = new Option("成都市商业银行");
            Industry2.options[Industry2.length] = new Option("重庆市商业银行");
            Industry2.options[Industry2.length] = new Option("西安市商业银行");
            Industry2.options[Industry2.length] = new Option("沈阳市商业银行");
            Industry2.options[Industry2.length] = new Option("大连市商业银行");
            Industry2.options[Industry2.length] = new Option("济南市商业银行");
            Industry2.options[Industry2.length] = new Option("青岛市商业银行");
            Industry2.options[Industry2.length] = new Option("福州市商业银行");
            Industry2.options[Industry2.length] = new Option("厦门市商业银行");
            Industry2.options[Industry2.length] = new Option("武汉市商业银行");
            Industry2.options[Industry2.length] = new Option("长沙市商业银行");
            Industry2.options[Industry2.length] = new Option("合肥市商业银行");
            Industry2.options[Industry2.length] = new Option("南昌市商业银行");
            Industry2.options[Industry2.length] = new Option("郑州市商业银行");
            Industry2.options[Industry2.length] = new Option("石家庄市商业银行");
            Industry2.options[Industry2.length] = new Option("长春市商业银行");
            Industry2.options[Industry2.length] = new Option("哈尔滨市商业银行");
            Industry2.options[Industry2.length] = new Option("中德住房储蓄银行");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="汽车金融公司")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("上汽通用汽车金融","上汽通用汽车金融");
            Industry2.options[Industry2.length] = new Option("丰田汽车金融","丰田汽车金融");
            Industry2.options[Industry2.length] = new Option("大众汽车金融","大众汽车金融");
            Industry2.options[Industry2.length] = new Option("福特汽车金融","福特汽车金融");
            Industry2.options[Industry2.length] = new Option("戴-克汽车金融","戴-克汽车金融");
            Industry2.options[Industry2.length] = new Option("东风标致雪铁龙汽车金融","东风标致雪铁龙汽车金融");
            Industry2.options[Industry2.length] = new Option("东风日产汽车金融","东风日产汽车金融");
            Industry2.options[Industry2.length] = new Option("沃尔沃汽车金融","沃尔沃汽车金融");
            Industry2.options[Industry2.length] = new Option("现代汽车金融","现代汽车金融");
            Industry2.selectedIndex = 0;
        }
       else
        {
            divdropIndustry2.style.display='none';
            hdivdropIndustry2.value='none';
            Industry2.length=0;
            CompanyTr.style.display='';
            hCompanyTr.value="";
        }
    }
    else if(IndustryValue=="2")//保险A类:
    {
        CompanyTr.style.display='none';
        hCompanyTr.value='none';
        if(Industry1Value=="中资寿险公司")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("中国人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国平安人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("新华人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("泰康人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国太平洋人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("太平人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("生命人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("东方人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("民生人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("合众人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("华泰人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国人保寿险有限公司");
            Industry2.options[Industry2.length] = new Option("长城人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("国民人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("正德人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国人民健康保险股份有限公司");
            
            Industry2.options[Industry2.length] = new Option("平安健康保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("瑞福德健康保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("昆仑健康保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("平安养老保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("太平养老保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国人寿保险(海外)股份有限公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
            
        }
        else if(Industry1Value=="外资/合资寿险公司")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("美国友邦保险有限公司");
            Industry2.options[Industry2.length] = new Option("太平洋安泰人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("中宏人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("中德安联人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("海尔纽约人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("联泰大都会人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("海康人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("中美大都会人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("光大永明人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("招商信诺人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("恒康天安人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("金盛人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("中法人寿保险有限责任公司");
            Industry2.options[Industry2.length] = new Option("中意人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("信诚人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("广电日生保险有限公司");
            
            Industry2.options[Industry2.length] = new Option("中英人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("恒安标准人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("首创安泰人寿保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中保康联人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("瑞泰人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("国泰人寿保险有限责任公司");
            Industry2.options[Industry2.length] = new Option("中新大东方人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("中航三星人寿保险有限公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="中资产险公司")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("中国人民财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国平安财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国太平洋财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("华泰财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("太平保险有限公司");
            Industry2.options[Industry2.length] = new Option("天安保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国大地财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("大众保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("永安财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("华安财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("都邦财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("永诚财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("华农财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("安邦财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("民安保险（中国）有限公司");
            Industry2.options[Industry2.length] = new Option("阳光财产保险股份有限公司");
            
            Industry2.options[Industry2.length] = new Option("中华联合财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("渤海财产保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("天平汽车保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("上海安信农业保险股份有限公司");
            Industry2.options[Industry2.length] = new Option("中国出口信用保险公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="外资产险公司")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("美国美亚保险公司");
            Industry2.options[Industry2.length] = new Option("利宝互助保险公司");
            Industry2.options[Industry2.length] = new Option("日本东京海上日动火灾保险株式会社");
            Industry2.options[Industry2.length] = new Option("三井住友海上火灾保险有限公司");
            Industry2.options[Industry2.length] = new Option("三星火灾海上保险有限公司");
            Industry2.options[Industry2.length] = new Option("日本财产保险公司");
            Industry2.options[Industry2.length] = new Option("中银集团保险有限公司");
            Industry2.options[Industry2.length] = new Option("丰泰保险（亚洲）有限公司");
            Industry2.options[Industry2.length] = new Option("安联保险公司");
            Industry2.options[Industry2.length] = new Option("苏黎世保险公司");
            Industry2.options[Industry2.length] = new Option("法国安盟保险公司");
            Industry2.options[Industry2.length] = new Option("皇家太阳联合保险公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="保险经纪公司")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("恒泰保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("长安保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("华泰保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("长城保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("江泰保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("达信保险与风险管理咨询有限公司");
            Industry2.options[Industry2.length] = new Option("民生保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("中怡保险经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("安邦国际保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("安诺保险经纪有限公司");
            
            Industry2.options[Industry2.length] = new Option("上海电气保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("上海东大保险经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("上海华一保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("上海共和保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("上海环亚保险经纪有限公司");
            
            Industry2.options[Industry2.length] = new Option("上海国民保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("上海至诚保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("上海盛大保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("韦莱浦东保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("上海仁信保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("上海中嘉国泰保险经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("北京汇丰保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("北京新世界保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("北京华育保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("北京百合保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("北京天和保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("北京联合保险经纪有限公司");
            
            Industry2.options[Industry2.length] = new Option("北京东方时代保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("北京大润保险经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("北京明亚保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("广东恒寿安保险经纪有限公司");
            Industry2.options[Industry2.length] = new Option("深圳市阳光保险经纪有限公司   ");
            Industry2.options[Industry2.length] = new Option("广州大成保险经纪有限公司");
            
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="保险代理公司")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("上海东方保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海丰盛保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海国瀚保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海富安保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海合泰保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海恒泰保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海金诚保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海美满人生保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海盛平保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海四海联众保险代理有限公司");
            
            Industry2.options[Industry2.length] = new Option("上海盛平保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海祥生保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海亚太保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海鑫诚保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("上海东太保险公估有限公司");
            
            Industry2.options[Industry2.length] = new Option("上海天顺保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京安惠保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京阳光三泰保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京信安保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京嘉信保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京益远保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京国民保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京泛联保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京联众保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京君安保险代理公司");
            Industry2.options[Industry2.length] = new Option("北京未然保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("北京国诚国际保险代理有限公司");
            
            Industry2.options[Industry2.length] = new Option("广东省粤联合保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("广州裕泰保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("广东国顺保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("广州健生保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("广东省富民保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("广州市国泰保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("广州粤泰保险代理有限公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else
        {
            divdropIndustry2.style.display='none';
            hdivdropIndustry2.value='none';
            Industry2.length=0;
            CompanyTr.style.display='';
            hCompanyTr.value="";
        }
    }
    else if(IndustryValue=="3")//券商A类:
    {
   
        CompanyTr.style.display='none';
        hCompanyTr.value='none';
        if(Industry1Value=="北京证券机构")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("北京高华证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("高盛高华证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("航空证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("民生证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("首创证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("新时代证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("中国国际金融有限公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="上海证券机构")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("爱建证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("长江巴黎百富勤证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("东方证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("光大证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("国泰君安证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("海际大和证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("海通证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("航天证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("华欧国际证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("上海远东证券有限公司");
            Industry2.options[Industry2.length] = new Option("上海证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("申银万国证券股份有限公司");
            
            Industry2.options[Industry2.length] = new Option("中银国际证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="深圳证券机构")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("长城证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("第一创业证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("国都证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("国信证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("华鑫证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("联合证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("平安证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("世纪证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("五矿证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("招商证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("中山证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("中信证券股份有限公司");
            
            Industry2.options[Industry2.length] = new Option("众成证券经纪有限公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="江苏证券机构")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("东海证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("东吴证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("国联证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("华泰证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("南京证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("信泰证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("中期证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="广东证券机构")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("东莞证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("广发证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("广州证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("华林证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("联讯证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("万联证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="浙江证券机构")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("财通证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("方正证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("天和证券经纪有限公司");
            Industry2.options[Industry2.length] = new Option("浙商证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("中信金通证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="四川证券机构")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("川财证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("国金证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("和兴证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("华西证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("四川省天风证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else if(Industry1Value=="其他地区券商")
        {
            divdropIndustry2.style.display='';
            hdivdropIndustry2.value='';
            Industry2.length=0;
            Industry2.options[Industry2.length] = new Option("--请选择--","--请选择--");
            Industry2.options[Industry2.length] = new Option("德邦证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("广发北方证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("沈阳诚浩证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("中天证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("广发华福证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("兴业证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("厦门证券有限公司");
            Industry2.options[Industry2.length] = new Option("陕西开源证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("西安华弘证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("西部证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("长财证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("东北证券有限责任公司");
            
            Industry2.options[Industry2.length] = new Option("国元证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("国盛证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("齐鲁证券有限公司青岛");
            Industry2.options[Industry2.length] = new Option("中信万通证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("中原证券股份有限公司");
            
            Industry2.options[Industry2.length] = new Option("恒泰证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("日信证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("江海证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("天元证券经纪有限公司");
            Industry2.options[Industry2.length] = new Option("长江证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("财富证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("泰阳证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("国海证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("金元证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("万和证券经纪有限公司");
            Industry2.options[Industry2.length] = new Option("华创证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("红塔证券股份有限公司");
            
            Industry2.options[Industry2.length] = new Option("太平洋证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("西藏证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("华龙证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("三江源证券经纪有限公司");
            Industry2.options[Industry2.length] = new Option("宏源证券股份有限公司");
            Industry2.options[Industry2.length] = new Option("渤海证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("河北财达证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("大同证券经纪有限责任公司");
            Industry2.options[Industry2.length] = new Option("山西证券有限责任公司");
            Industry2.options[Industry2.length] = new Option("其他","其他");
            Industry2.selectedIndex = 0;
        }
        else
        {
            divdropIndustry2.style.display='none';
            hdivdropIndustry2.value='none';
            Industry2.length = 0;
            CompanyTr.style.display='';
            hCompanyTr.value="";
        }
    }
    else if(IndustryValue =="4")//基金B类:无drop2
    {
        CompanyTr.style.display='none';
        hCompanyTr.value='none';
        if(Industry1Value=="其他")
        {
             CompanyTr.style.display='';
             hCompanyTr.value="";
        }
    }
    else//C类:并不存在,因此时drop1并不显示,也就没有select事件
    {
        CompanyTr.style.display='none';
        hCompanyTr.value='none';
        
        divdropIndustry1.style.display='none';
        hdivdropIndustry1.value='none';
        Industry1.length=0;
        
        divdropIndustry2.style.display='none';
        hdivdropIndustry2.value='none';
        Industry2.length=0;
    }
}
//----------------------------------------------------
//OnChange="dropIndustry2Changed(this,'hdivdropIndustry2','CompanyTr','hCompanyTr','1');"
function dropIndustry2Changed(thisDrop,hdivdropIndustry2ID,divCompanyTrID,hDivCompanyTrID,pagetype)
{
    var headStr = GetHead(pagetype);
    var Industry2Value=thisDrop.options[thisDrop.selectedIndex].value
    var hdivdropIndustry2Value = document.getElementById(headStr+hdivdropIndustry2ID)
    
    var CompanyTr = document.getElementById(headStr+divCompanyTrID)
    var hCompanyTr = document.getElementById(headStr+hDivCompanyTrID)

    CompanyTr.style.display='none';
    hCompanyTr.value='none';
    hdivdropIndustry2Value.value = Industry2Value;
    if(Industry2Value=="其他")
    {
        CompanyTr.style.display='';
        hCompanyTr.value="";
    }
    else
    {
        CompanyTr.style.display='none';
        hCompanyTr.value='none';
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)： Onclick = "HighMemberRegiste(this,'tableHeigh','hfChkHeigh','1');"
//---------------------------------------------------chk-----table-------hidden--PageType------------------------
//相关页面：MemberRegister.aspx
//功能描述：当chk改变时触发   高级用户必填
function HighMemberRegiste(thisChk,tableHeighID,hfChkHeighID,pagetype)
{
    var headStr = GetHead(pagetype)
    var chkHeigh = thisChk.checked
    var tableHeigh = document.getElementById(headStr+tableHeighID)
    var hfChkHeigh = document.getElementById(headStr+hfChkHeighID)
    if(chkHeigh==true)
    {
        tableHeigh.style.display='';
        tableHeigh.value='';
        hfChkHeigh.value='';
    }
    else
    {
        tableHeigh.style.display='none';
        tableHeigh.value='none';
        hfChkHeigh.value='none';
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)：键盘事件--------- onkeyup="TxtLeave(this,'LeaveXUQIU','100','2');"
//----------------------------------------txt----------------------------------------------------
//相关页面：ConsumptionCredit.aspx
//功能描述："当txt有输入时lbl显示所余字数信息"----曾用名  FinFirstTextChange() FinHKYQ() FinHKTS() TextChangeYHCS() TextChangeTSFW() FJSM()
function TxtLeave(thisTxt,LabelID,count,pagetype)
{
    if(pagetype==111)
    {
        var leavenumber = parseInt(count) - parseInt(thisTxt.value.length)
        if(leavenumber<=0)
        {
            thisTxt.value = thisTxt.value.substring(0,parseInt(count));
        }
        document.getElementById(LabelID).innerText = "您还可以输入"+leavenumber+"字";
    }
    else
    {
        var headStr = GetHead(pagetype)
        var leavenumber = parseInt(count) - parseInt(thisTxt.value.length)
        if(leavenumber<=0)
        {
            thisTxt.value = thisTxt.value.substring(0,parseInt(count));
            leavenumber = 0;
        }
        document.getElementById(LabelID).innerText = "您还可以输入"+leavenumber+"字";
    }
}
//-------------------------------------------------------------
//调用方法(主调函数)：onfocus="txtBeControlByChk(this,'CheckBox8','2')"
//--------------------------------------------------------------------------------------------
//相关页面：life.aspx
//功能描述："txt 被 chk 控制 若 chk未选则txt不可以填写"-----曾用名
function txtBeControlByChk(thisTxt,ThatChk,pageType)
{
    var headStr = GetHead(pageType)
    var chk = document.getElementById(headStr+ThatChk)
    if(chk.checked==false)
    {
        this.disabled=true;
    }
    else
    {
        this.disabled=false;
    }
}
//-------------------------------------------------------------
//调用方法(主调函数)：CheckBox2.Attributes.Add("OnClick", "ChkChangeDivDis(this,'CheckBoxList1','hcheck1','2');");
//--------------------------------------------------------------------------------------------
//相关页面：AutomobileCredit.aspx
//功能描述："Chk 控制 层的显示"-----曾用名 NeedBank() DaoQieCheck()
function SpanDisAndHidden(disID,hdisID,hidID,hhidID,pageType)
{
    var headStr = GetHead(pageType)
    document.getElementById(headStr+disID).style.display='';
    document.getElementById(headStr+hdisID).value='';
    document.getElementById(headStr+hidID).style.display='none';
    document.getElementById(headStr+hhidID).value='none';
}

function ChkChangeDivDis(thisChk,divID,hDivID,pageType)
{
    var headStr = GetHead(pageType)
    if(thisChk.checked==true)
    {
        document.getElementById(headStr+divID).style.display='';
        document.getElementById(headStr+hDivID).value='';
    }
    else
    {
         document.getElementById(headStr+divID).style.display='none';
        document.getElementById(headStr+hDivID).value='none';
    }
}

function ChkChangeDivDisR(thisChk,divID,hDivID,pageType)
{
    var headStr = GetHead(pageType)
    if(thisChk.checked==false)
    {
        document.getElementById(headStr+divID).style.display='';
        document.getElementById(headStr+hDivID).value='';
    }
    else
    {
         document.getElementById(headStr+divID).style.display='none';
        document.getElementById(headStr+hDivID).value='none';
    }
}
//-----------------------------------------------
function CheDaiPinIn(thisChk,ShouTianID,hShouTianID,XuanID,hXuanID,pageType)
{
    ChkChangeDivDis(thisChk,ShouTianID,hShouTianID,pageType);
    ChkChangeDivDisR(thisChk,XuanID,hXuanID,pageType);
}
//-------------------------------------------------------------
//调用方法(主调函数)：CheckBox2.Attributes.Add("OnClick", "RadioChangeDivDis(this,'2','RadioButtonList4','hradio4','2');");
//--------------------------------------------------------------------------------------------
//相关页面：AutomobileCredit.aspx  AutomobileCreditO.aspx
//功能描述："Radio 某项选择 控制 层的显示"
//曾用名 FinFangShi() FinHuoBi() SJQT() KaZhongCard() CardLevelCheck() HelpRadio() NewHouse() SFHQ() BXLB()
function RadioChangeDivDis(thisRadio,itemsStr,divID,hDivID,pageType)
{
    var headStr = GetHead(pageType)
    if(document.getElementById(thisRadio.id+'_'+itemsStr).checked==true)
    {
        document.getElementById(headStr+divID).style.display='';
        document.getElementById(headStr+hDivID).value='';
    }
    else
    {
        document.getElementById(headStr+divID).style.display='none';
        document.getElementById(headStr+hDivID).value='none';
    }
}
//房贷中的第几套产权房屋
function RadioChangeDivDisHC(thisRadio,itemsStr,divID,hDivID,pageType)
{
    var headStr = GetHead(pageType)
    if(document.getElementById(thisRadio.id+'_'+1).checked==true)
    {
        RadioChangeDivDis(thisRadio,'1',divID,hDivID,pageType);
    }
    else if(document.getElementById(thisRadio.id+'_'+2).checked==true)
    {
        RadioChangeDivDis(thisRadio,'2',divID,hDivID,pageType);
    }
    else
    {
        RadioChangeDivDis(thisRadio,'1',divID,hDivID,pageType);
    }
}

function RadioChangeDivDisCard(thisRadio,itemsLength,divID,hDivID,pageType)
{
    var headStr = GetHead(pageType)
    
    if(document.getElementById(thisRadio.id+'_'+0).checked==true ){
        RadioChangeDivDis(thisRadio,'1',divID,hDivID,pageType);
    }
    else if(document.getElementById(thisRadio.id+'_'+1).checked==true){
        RadioChangeDivDis(thisRadio,'1',divID,hDivID,pageType);
        document.getElementById(headStr+"spanCarrType").innerText = '如申请金卡的要求银行未能满足，您是否接受普卡？';
    }
    else if(document.getElementById(thisRadio.id+'_'+2).checked==true){
        RadioChangeDivDis(thisRadio,'2',divID,hDivID,pageType);
        document.getElementById(headStr+"spanCarrType").innerText = '如申请白金卡的要求银行未能满足，您是否接受普卡，金卡？';
    }
    else if(document.getElementById(thisRadio.id+'_'+3).checked==true){
        RadioChangeDivDis(thisRadio,'3',divID,hDivID,pageType);
        document.getElementById(headStr+"spanCarrType").innerText = '如申请钻石卡的要求银行未能满足，您是否接受其他卡种？';
    }
}

function RadioChangeDivDisA(thisRadio,itemsStr,divID1,hDivID1,divID2,hDivID2,pageType)
{
    var headStr = GetHead(pageType)
    document.getElementById(headStr+"txtType").style.display='none';
    document.getElementById(headStr+"htxtType").value='none';
    if(document.getElementById(thisRadio.id+'_'+itemsStr).checked==true)
    {
        document.getElementById(headStr+divID1).style.display='';
        document.getElementById(headStr+hDivID1).value='';
        document.getElementById(headStr+"DropDownList3").selectedIndex = 0;
        
        document.getElementById(headStr+divID2).style.display='none';
        document.getElementById(headStr+hDivID2).value='none';
    }
    else
    {
        document.getElementById(headStr+divID1).style.display='none';
        document.getElementById(headStr+hDivID1).value='none';
        
        document.getElementById(headStr+divID2).style.display='';
        document.getElementById(headStr+hDivID2).value='';
        document.getElementById(headStr+"DropDownList4").selectedIndex = 0;
    }
}
//xiaofeidaikuan
function RadioChgConsumption(thisRadio,itemsStr,divID,hDivID,pageType)
{
    var headStr = GetHead(pageType)
    RadioChangeDivDis(thisRadio,itemsStr,divID,hDivID,pageType);
    if(document.getElementById(thisRadio.id+'_2').checked==true)
    {
        RedioSelectItemByIndex(document.getElementById(headStr+'RadioButtonList2'),3,2);
        Tourmudui(document.getElementById(headStr+'RadioButtonList2'),'TypeMoney1*TypeMoney2*TypeMoney1',pageType);
//        document.getElementById(headStr+'RadioButtonList2').disabled=true;
    }
    else
    {
//        document.getElementById(headStr+'RadioButtonList2').disabled=false;
    }
}

function RedioSelectItemByIndex(thisRadio,length,selectItems)
{
    for(var i = 0 ; i< parseInt(length) ;i++)
    {
        if(i==parseInt(selectItems))
        {
            document.getElementById(thisRadio.id+"_"+i).checked=true;
        }
        else
        {
            document.getElementById(thisRadio.id+"_"+i).checked=false;
        }
    }
}

//当选某项时　清除其他情况下选定的值　各种控件由＊隔开　同类由｜隔开
//RadioButtonList1.Attributes.Add("Onclick", "RadioChangeDivDisAndClear(this,'1','oldHouse','holdHouse','2','txt|TextBox4|TextBox12');");
function RadioChangeDivDisAndClear(thisRadio,itemsStr,divID,hDivID,pageType,strID)
{
    RadioChangeDivDis(thisRadio,itemsStr,divID,hDivID,pageType);
    var headStr = GetHead(pageType)
    var controlArray = strID.split('*')
    for(var i=0;i<controlArray.length;i++)
    {
        var inarray = controlArray[i].split('|')
        for(var j= 0;j<inarray.length;j++)
        {
            if((inarray[0]=='txt') && (j>0))
            {
                document.getElementById(headStr+inarray[j]).value="";
            }
        }
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)：CheckBox2.Attributes.Add("OnClick", "RadioChangeDisInfo(this,'0','huanqing','hhuanqing','2');");
//--------------------------------------------------------------------------------------------
//相关页面：AutomobileCredit.aspx  AutomobileCreditO.aspx
//功能描述："Radio 某项选择 控制 层的显示"
//曾用名 jitao()
function RadioChangeDisInfo(thisRadio,itemsStr,lblID,errorID,pageType)
{
    var headStr = GetHead(pageType)
    var errorArray = "温馨提示：根据现行政策，银行可能相应减少您的贷款成数，提高贷款利率"
    if(document.getElementById(thisRadio.id+'_'+itemsStr).checked==true)
    {
        document.getElementById(lblID).innerText="";
    }
    else
    {
        document.getElementById(lblID).innerText=errorArray;
    }
}

//-------------------------------------------------------------
//调用方法(主调函数)：RadioButton3.Attributes.Add("OnClick", "RadioSelectClearTxt('TextBox7','2');");
//--------------------------------------------------------------------------------------------
//相关页面：AutomobileCredit.aspx  AutomobileCreditO.aspx
//功能描述："Radio 选择 控制 txt的内容"-----曾用名 
function RadioSelectClearTxt(txtID,pagetype)
{
    var headStr = GetHead(pagetype)
    document.getElementById(headStr+txtID).value = '';
}
//-------------------------------------------------------------
//调用方法(主调函数)：onblur="txtLengthControl(this,'10');"
//--------------------------------------------------------------------------------------------
//相关页面：
//功能描述："控制 txt的输入长度"-----曾用名 FinCheckCount(text,count)
function txtLengthControl(thisTxt,count)
{
    if(thisTxt.value.length > parseInt(count))
    {
     var str = thisTxt.value.substring(0,parseInt(count));
     thisTxt.value=str;  
    }
}
//-------------------------------------------------------------
//调用方法(主调函数)：onblur="CheckTextLength(this,'用户名','5','15');"
//--------------------------------------------------------------------------------------------
//相关页面：
//功能描述："txt的长度控制"-----曾用名
function CheckTextLength(thisTxt,shuoming,minLength,maxLength)
{
    var headStr = GetHead(pagetype)
    if(thisTxt.length < minLength)
    {
        alert(shuoming+"太短");
        thisTxt.focus();
    }
    else if(thisTxt.length > maxLength)
    {
        alert(shuoming+"太长");
        thisTxt.focus();
    }
}
//-------------------------------------------------------------
//调用方法(主调函数)：onblur="txtValueControl(this,'缴费期限*年','max','60');"
//--------------------------------------------------------------------------------------------
//相关页面：
//功能描述："控制 txt的输入长度"-----曾用名 FinCheckCount(text,count)
function txtValueControl(thisTxt,info,type,compareValue)
{
    var infoArray = info.split('*')
    if(!txtPageStyleTestReturn(thisTxt,infoArray[0],'false','int')){
        thisTxt.focus();
        //alert('请填写实际的'+ infoArray[0] );
    }
    else if(parseFloat(thisTxt.value) > parseFloat(compareValue)&&(type=="max"))
    {
      alert(infoArray[0] + "不可以超过 " + compareValue +" "+ infoArray[1] +""); 
      thisTxt.focus();
    }
    else if(parseFloat(thisTxt.value)< parseFloat(compareValue)&&(type=="min"))
    {
     alert(infoArray[0] + "不可以少于 " + compareValue +" "+ infoArray[1] +"");
     thisTxt.focus();
    }
}
//-------------------------------------------------------------
//调用方法(主调函数)：onchange="dropChangeDivDisByValue(this,'其他职务','TextBox3','hTextBox3','2');"
//--------------------------------------------------------------------------------------------
//相关页面：
//功能描述："层的显示由drop选择值决定"-----曾用名 EntTitle(drop)
function EntTitle(thisDrop,strValue,controlID,hControlID,pagetype)
{
    var headStr = GetHead(pagetype)
    var str=thisDrop.options[thisDrop.selectedIndex].value
    if(str=="其他职务")
    {
         document.getElementById(headStr+controlID).style.display='';
         document.getElementById(headStr+hControlID).value='';
    }
    else
    {
      document.getElementById(headStr+controlID).style.display='none';
      document.getElementById(headStr+hControlID).value='none';
    }
}

//htableTra htableEdu htableTraEdit htableEduEdit hAddEduExp hAddTraExp
function AddExp(type,pagetype)
{
    var headStr = GetHead(pagetype)

    document.getElementById(headStr+"tableEduEdit").style.display='none';
    document.getElementById(headStr+"htableEduEdit").value='none';

    document.getElementById(headStr+"tableTraEdit").style.display='none';
    document.getElementById(headStr+"htableTraEdit").value='none';
    
    document.getElementById(headStr+"tableJobEdit").style.display='none';
    document.getElementById(headStr+"htableJobEdit").value='none';
    if(type=="Edu")
    {  
         
        
        document.getElementById(headStr+"tableEduEdit").style.display='';
        document.getElementById(headStr+"htableEduEdit").value='';
        document.getElementById(headStr+"dateStart").focus();
    }
    else if(type=="Tra")
    {
    
     
        document.getElementById(headStr+"tableTraEdit").style.display='';
        document.getElementById(headStr+"htableTraEdit").value='';
         document.getElementById(headStr+"dateTraStart").focus();
    }
    else if(type=="Job")
    {
    
        
        document.getElementById(headStr+"tableJobEdit").style.display='';
        document.getElementById(headStr+"htableJobEdit").value='';
         document.getElementById(headStr+"dateJobStart").focus();
    }
}
//-------------------------------------------------------------
//CheckBox2.Attributes.Add("OnClick", "chkContorlChkList(this,'CheckBoxList1','hcheck1','CheckBoxList1','4','2');");
//当chk 变化时　控制层的显示　同时　控制　ChkList　项　的选定
//通常与chklistItemsChanged(chklistID,itemsLength,chkAll,pagetype,div,hdiv)同时　使用
function chkContorlChkList(thisChk,div,hdiv,thatChkList,itemsLength,pagetype)
{
    var headStr = GetHeadMem(pagetype)
    ChkChangeDivDis(thisChk,div,hdiv,pagetype);
    if(thisChk.checked==true)
    {
        for(var i = 0;i<itemsLength;i++)
        {
            document.getElementById(headStr+thatChkList+"_"+i).checked=true;
        }
    }
    else
    {
        for(var i = 0;i<itemsLength;i++)
        {
            document.getElementById(headStr+thatChkList+"_"+i).checked=false;
        }
    }
}
//-------------------------------------------------------------
//当Radio的项变化时　引起　起上级　chk 变化
//通常与 chkContorlChkList(thisChk,div,hdiv,thatChkList,itemsLength,pagetype)同时　使用
function chklistItemsChanged(chklistID,itemsLength,chkAll,pagetype,div,hdiv)
{
    var headStr = GetHeadMem(pagetype)
    var flag= false;
    for(var i = 0; i< itemsLength ;i++)
    {
        if(document.getElementById(headStr+chklistID+'_'+i).checked)
        {
            flag = true;
        }
    }
    document.getElementById(headStr+chkAll).checked = flag;
    if(flag==false)
    {
        document.getElementById(headStr+chkAll).checked=false;
        document.getElementById(headStr+div).style.display='none';
        document.getElementById(headStr+hdiv).value='none';
    }
}
//-------------------------------------------------------------
//CheckBox2.Attributes.Add("OnClick", "chkContorlChkList(this,'CheckBoxList1','4','2');")
function chkContorlChkListA(thisChk,thatChkList,itemsLength,pagetype)
{
    var headStr = GetHeadMem(pagetype)
    if(thisChk.checked==true)
    {
        for(var i = 0;i<itemsLength;i++)
        {
            document.getElementById(headStr+thatChkList+"_"+i).checked=true;
        }
    }
    else
    {
        for(var i = 0;i<itemsLength;i++)
        {
            document.getElementById(headStr+thatChkList+"_"+i).checked=false;
        }
    }
    GetChkListValueStr('hStrTemp',pagetype);
}
//-------------------------------------------------------------
//当Radio的项变化时　引起　起上级　chk 变化
function chklistItemsChangedA(chklistID,itemsLength,chkAll,pagetype)
{
    var headStr = GetHeadMem(pagetype)
    var flag= false;
    for(var i = 0; i< itemsLength ;i++)
    {
        if(document.getElementById(headStr+chklistID+'_'+i).checked)
        {
            flag = true;
        }
    }
    document.getElementById(headStr+chkAll).checked = flag;
    if(flag==false)
    {
        document.getElementById(headStr+chkAll).checked=false;
    }
    GetChkListValueStr('hStrTemp',pagetype);
}

function GetChkListValueStr(hstrID,pagetype)
{
    var headStr = GetHeadMem(pagetype)
    hstr = document.getElementById(headStr+hstrID)
    hstr.value = GetChkListValueStrA('CheckBoxList1','1',8,pagetype);
    hstr.value += GetChkListValueStrA('CheckBoxList2','2',9,pagetype);
    hstr.value += GetChkListValueStrA('CheckBoxList3','3',5,pagetype);
    hstr.value += GetChkListValueStrA('CheckBoxList4','4',4,pagetype);
    hstr.value += GetChkListValueStrA('CheckBoxList5','5',4,pagetype);
    hstr.value += GetChkListValueStrA('CheckBoxList6','6',4,pagetype);
    hstr.value += GetChkListValueStrA('CheckBoxList7','7',10,pagetype);
    hstr.value += GetChkListValueStrA('CheckBoxList8','8',5,pagetype);
      hstr.value += GetChkListValueStrA('CheckBoxList9','9',2,pagetype);
    //alert(hstr.value);
}
function GetChkListValueStrA(thatChkList,itemR,itemsLength,pagetype)
{
    var headStr = GetHeadMem(pagetype)
    var strTemp =''
    for(var i = 0; i<itemsLength ;i++)
    {
        if(document.getElementById(headStr+thatChkList+'_'+i).checked)
        {
            var j = i+1
            strTemp+=itemR+"."+ j + ",";
        }
    }
    return strTemp;
}
//-------------------------------------------------------------
//调用方法(主调函数)：onblur="compareTime(this,'min','dateJobStart','2')"
//--------------------------------------------------------------------------------------------
//相关页面：
//功能描述："比较两个时间值的先后"----曾用名
function compareTime(thisTxt,type,thatTxt,pagetype)
{
//    var headStr = GetHead(pagetype)
//    if(type=='min')
//    {
//        var start = thisTxt.value
//        var end = document.getElementById(headStr+thatTxt).value
//    }
//    else if(type=='max')
//    {
//        var end = thisTxt.value
//        var start = document.getElementById(headStr+thatTxt).value
//    }
//    if(start.length!=0)
//    {
//        var startArray = start.split('-')
//        if(end.length==0||end == '至今')
//        {
//            
//        }
//    }
}
//-------------------------------------------------------------
//调用方法(主调函数)：CheckBox2.Attributes.Add("OnClick", "ChkRepeaterAll(this,'MessageGrid','15','CheckBox1','2')");
//ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ MessageGrid _ctl 04 _ CheckBox1
//相关页面：
//功能描述："全选"----曾用名
function ChkRepeaterAll(thisChk,thatGrid,Size,thatChk,pagetype)
{
    var headStr = GetHead(pagetype)
    var count=parseInt(Size)+2
    if(thisChk.checked == true)
    {
        for(var i = 2;i<count;i++)
        {
            index=GetRepeaterIndex(i);
            //alert(headStr+thatGrid+'_ctl'+index+'_'+thatChk);
            document.getElementById(headStr+thatGrid+'_ctl'+index+'_'+thatChk).checked = true;
        }
    }
    else
    {
        for(var i = 2;i<count;i++)
        {
            index=GetRepeaterIndex(i);
            document.getElementById(headStr+thatGrid+'_ctl'+index+'_'+thatChk).checked = false;
        }
    }
}

//Repeater全选 ---> Rep 编号从1开始
function ChkRepeaterAllR(thisChk,thatGrid,Size,thatChk,pagetype)
{
    var headStr = GetHead(pagetype)
    var count=parseInt(Size)+2
    if(thisChk.checked == true)
    {
        for(var i = 0;i<count;i++)
        {
            var index=GetRepeaterIndex(i)
            //alert(headStr+thatGrid+'_ctl'+index+'_'+thatChk);
            document.getElementById(headStr+thatGrid+'_ctl'+index+'_'+thatChk).checked = true;
        }
    }
    else
    {
        for(var i = 0;i<count;i++)
        {
            var index=GetRepeaterIndex(i)
            document.getElementById(headStr+thatGrid+'_ctl'+index+'_'+thatChk).checked = false;
        }
    }
}

//gv全选2 ---> GV 编号从2开始
function ChkgvAll(thisChk,thatGrid,Size,thatChk,pagetype)
{
    var headStr = GetHead(pagetype)
    var count=parseInt(Size)+2
    if(thisChk.checked == true)
    {
        for(var i = 0;i<count;i++)
        {
            var index=GetRepeaterIndex(i+2)
            //alert(headStr+thatGrid+'_ctl'+index+'_'+thatChk);
            document.getElementById(headStr+thatGrid+'_ctl'+index+'_'+thatChk).checked = true;
        }
    }
    else
    {
        for(var i = 0;i<count;i++)
        {
            var index=GetRepeaterIndex(i+2)
            document.getElementById(headStr+thatGrid+'_ctl'+index+'_'+thatChk).checked = false;
        }
    }
}

function ChkToRadio(thisChk,thatGrid,Size,thatChk,pagetype)
{
    //alert(thisChk.id); 
    var headStr = GetHead(pagetype)
    var count=parseInt(Size)
    if(thisChk.checked == true)
    {
        for(var i = 0;i<count;i++)
        {
            var index=GetRepeaterIndex(i)
            //alert(headStr+thatGrid+'_ctl'+index+'_'+thatChk); 
            if(document.getElementById(headStr+thatGrid+'_ctl'+index+'_'+thatChk).checked==true && thisChk.id != headStr+thatGrid+'_ctl'+index+'_'+thatChk)
            { 
                document.getElementById(headStr+thatGrid+'_ctl'+index+'_'+thatChk).checked = false;
            }
        }
    }
}

function GetRepeaterIndex(index)
{
    var str = '0'+index
    if(str.length==2)
    {
        return '0'+index;
    }
    else
    {
        return index;
    }
}

//--------------onclick = "ControlFocus('TextAsk','2')"
//使控件获得焦点
function ControlFocus(thatControl,pagetype)
{
    var headStr = GetHead(pagetype)
    document.getElementById(headStr+thatControl).focus();
}
//------------------------------------------------------------
// onBlur="IsChangeDisBtn(this,'hINFO','ImageButton5','2');"
function IsChangeDisBtn(thisTxt,compareID,thatDisID,pagetype)
{
    var headStr = GetHead(pagetype)
    if(thisTxt.value != document.getElementById(headStr+compareID).value)
    {
        document.getElementById(headStr+thatDisID).style.display='';
    }
    else
    {
        document.getElementById(headStr+thatDisID).style.display='none';
    }
}

// onblur="txtTestExp(this,'固定电话区号','false','\d{3,4}');"
function txtTestExp(thisTxt,shuoming,isNeed,type)
{
    var re=/[\x00-\xff]/g;
    if(type=='tel'){
        re=/^(\d{7,8})$/g;//固定电话
    }
    else if(type=='quhao'){
        re=/^(\d{3,4})$/g;//区号
    }
    else if(type=='fenji'){
        re=/^(\d{0,})$/g;//分机
    }
    
    if(thisTxt.value.length==0 && isNeed=='true')
    {
        thisTxt.focus();
        alert(shuoming+"不可为空");
    }
    if(thisTxt.value.length!=0 && !re.exec(thisTxt.value))
    {
        thisTxt.focus();
        alert(shuoming+"格式有误");
    }
}

//具有默认值的文本格式验证
function txtTestExpDefault(thisTxt,shuoming,defaultValue,isNeed,type)
{
    if(thisTxt.value.length == 0)
    {
        thisTxt.value = defaultValue;
    }
    else
    {
        txtTestExp(thisTxt,shuoming,isNeed,type);
//        txtPageTestFocus(thisTxt,shuoming,isNeed,type);
    }
}

//<asp:FileUpload ID="FileUpload1" runat="server" onblur="DisplayTuToImg(this,'Image1','2');"/>
function DisplayTuToImg(thisUpload,ImgID,pagetype)
{
    var headStr = GetHead(pagetype)
    txtPageStyleTestFocus(thisUpload,'头像','false','img');
    if(thisUpload.value.length!=0 && txtMatch(thisUpload.value,'img'))
    {
        document.getElementById(headStr + ImgID).src=thisUpload.value;
        //alert(document.getElementById(headStr + ImgID).src +'|' +thisUpload.value);
        document.getElementById(headStr + 'RadioButton1').checked=false;
        document.getElementById(headStr + 'RadioButton2').checked=true;
        if(document.getElementById(headStr+ImgID).fileSize>300*1024){
            alert('图片大小不能超过300k');
            
            thisUpload.focus();
        }
    }
}

function ImgAutoChange(imgID)
{
    alert(imgID);
    var imgArray = ['flash.gif','flash.gif','flash.gif','flash.gif','flash.gif']
    var indexTemp;
    var thisImg =document.getElementById(imgID)
    var recur_call = "ImgAutoChange('"+imgID+"')"
    for(var i = 0 ;i < imgArray.length ; i++){
        if(thisImg.src.indexOf(imgArray[i])!=-1){
            indexTemp = i;
        }
    }
    var numberTemp = Math.round(Math.random()*1000)%5
    thisImg.src = thisImg.src.replace(imgArray[indexTemp],imgArray[numberTemp]);
    setTimeout(recur_call,3000);
}

function ConsumpEnableF1(thisChk,chk2ID,chk3ID,txtID,spanID,hspanID,pageType)
{
    ConsumpEnable(thisChk,chk2ID,chk3ID,txtID,pageType);
    ChkChangeDivDis(thisChk,spanID,hspanID,pageType);
}

//ConsumpEnable('CheckBox1','CheckBox4','CheckBox5','txtOtherF')
function ConsumpEnable(thisChk,chk2ID,chk3ID,txtID,pageType)
{
    var headStr = GetHead(pageType)
    var chk2 = document.getElementById(headStr+chk2ID)
    var chk3 = document.getElementById(headStr+chk3ID)
    var txt = document.getElementById(headStr+txtID)
    if(thisChk.checked)
    {
        chk2.disabled =true;
        chk3.disabled=true;
        txt.disabled=true;
        if(thisChk.id.indexOf('CheckBox5')!=-1)
        {
            txt.disabled=false;
        }
    }
    else
    {
        chk2.disabled =false;
        chk3.disabled=false;
        txt.disabled=true;
    }
}
 
function COL(thisRadio,divID,hDivID,pageType)
{
    var headStr = GetHead(pageType)
    if(thisRadio.checked==true)
    {
        document.getElementById(headStr+divID).style.display='';
        document.getElementById(headStr+hDivID).value='';
    }
    else
    {
        document.getElementById(headStr+divID).style.display='none';
        document.getElementById(headStr+hDivID).value='none';
    }
}

//消费贷款部分
function RadioGroupChangeDivDis(Radio1ID,Radio2ID,Radio3ID,pageType)
{
    var headStr = GetHead(pageType)
    var Radio1 = document.getElementById(headStr+Radio1ID)
    var Radio2 = document.getElementById(headStr+Radio2ID)
    var Radio3 = document.getElementById(headStr+Radio3ID)
    
    COL(Radio1,'fangchan','hfangchan',pageType);
    COL(Radio3,'spanOtherF','hspanOtherF',pageType);
}
