﻿// JScript File
function ShowDivision(area)
    {
        var ds = expert_navigation.Get_all_division(area).value;
        var ddl = document.getElementById("ddl_Division");
        ddl.length=0;
        if(ds)
        {
            ddl.options.add(new Option("请选择","请选择"));
            
            for(var i=0;i<ds.Tables[0].Rows.length;i++)
            {
                ddl.options.add(new Option(ds.Tables[0].Rows[i].division,ds.Tables[0].Rows[i].division));
            }
        }
    }
    
    function Admin_ShowDivision(area)
    {
        var ds = Management_admin_expert_navigation_manage.Get_all_division(area).value;
        var ddl = document.getElementById("ctl00_ContentRight_ddl_Division");
        ddl.length=0;
        if(ds)
        {
            ddl.options.add(new Option("请选择","请选择"));
            
            for(var i=0;i<ds.Tables[0].Rows.length;i++)
            {
                ddl.options.add(new Option(ds.Tables[0].Rows[i].division,ds.Tables[0].Rows[i].division));
            }
        }
    }
    
    function GetDivision()
    {
        document.getElementById("txt_division").value = document.getElementById("ddl_Division").value;
    }
    
    function Admin_GetDivision()
    {
        document.getElementById("ctl00_ContentRight_txt_division").value = document.getElementById("ctl00_ContentRight_ddl_Division").value;
    }
    
    function BatchValidate()
    {
        if (document.getElementById("ctl00_ContentRight_txt_area").value.length ==0)
        {
	        alert("请输入地区！");
	        document.getElementById("ctl00_ContentRight_txt_area").focus();
	        return false;
        }
        if(document.getElementById("ctl00_ContentRight_txt_hospital").value.length ==0)
        {
	        alert("请输入医院名称！");
	        document.getElementById("ctl00_ContentRight_txt_hospital").focus();
	        return false;
        }
        if(document.getElementById("ctl00_ContentRight_txt_divi").value.length ==0)
        {
	        alert("请输入科室！");
	        document.getElementById("ctl00_ContentRight_txt_divi").focus();
	        return false;
        }
        if(document.getElementById("ctl00_ContentRight_txt_expert_name").value.length ==0)
        {
	        alert("请输入专家姓名！");
	        document.getElementById("ctl00_ContentRight_txt_expert_name").focus();
	        return false;
        }
        if(document.getElementById("ctl00_ContentRight_txt_doctor_title").value.length ==0)
        {
	        alert("请输入专家职称！");
	        document.getElementById("ctl00_ContentRight_txt_doctor_title").focus();
	        return false;
        }
        if(document.getElementById("ctl00_ContentRight_txt_consulting_hour").value.length ==0)
        {
	        alert("请输入专家门诊时间！");
	        document.getElementById("tctl00_ContentRight_xt_consulting_hour").focus();
	        return false;
        } 
	}
   
