﻿// JScript 文件


    function isTrueid(s)   
    {   

//alert(s.value);
        var patrn=/^[0-9]*[0-9][0-9]*$/;
        if(s.value.substring(0,1)=="0" &&  s.value.length>1)
        {
                     s.value="";
             return false  ;
        }   
        else
        {
        if (!patrn.exec(s.value))
        {
         
             s.value="";
             return false  ;
         }
         else
         {
 
            return true ;
        } 
        }

    } 
    
//验证后台登陆用户名和密码是否填写    
function ValidateUser()
{
   var user= document.getElementById("TextBox1");
   var pwd = document.getElementById("TextBox2");
   var cod = document.getElementById("TextBox3");
   if(user.value == null || user.value == "")
   {
    alert("用户名必填!");
    document.getElementById("TextBox1").focus();
    return false;
   }
   if(pwd.value == null || pwd.value == "")
   {
   alert("密码必填!");
   document.getElementById("TextBox2").focus();
   return false;
   }
   if(cod.value==null  || cod.value=="")
   {
      alert("验证码必填！");
      document.getElementById("TextBox3").focus();
   return false;
   }
   return true;
}

function ChengShi()
{
    var scity = document.getElementById("depart_city");
    var ecity = document.getElementById("arrive_city");
    var stime = document.getElementById("depart_dateqa");
    var etime = document.getElementById("depart_dateqa0");
    
    if(scity.value == "中文/拼音"||scity.value==""|| scity.value==null)
    {
        alert("请您填写出发城市！");
        return false;
    }   
     if(ecity.value == "中文/拼音"||ecity.value==""|| ecity.value==null)
    {
        alert("请您填写到达城市！");
        return false;
    }
    
    if(stime.value==""||stime.value==null)
    {
    alert("请您填写出发时间！");
        return false;
    }  
    
  return true;
}