﻿//国内查询
function checkgn()
{
if(gnjp.txt_begionCity.value==""||gnjp.txt_begionCity.value=="输入中文/拼音/三字码")//
{
 alert("请填写出发城市");gnjp.txt_begionCity.focus();
 return false;
}
if(gnjp.txt_endCity.value==""||gnjp.txt_endCity.value=="输入中文/拼音/三字码")
{
 alert("请填写到达城市");gnjp.txt_endCity.focus();
 return false;
}
var jstarttime=gnjp.d1.value
	var jendtime=gnjp.d2.value
for (var i=0;i<3;i++){
		if(gnjp.radio[i].checked)
		{
			dx=gnjp.radio[i].value;
			break;
		}
	}
if(dx=='wangfan'){
		begindate = jstarttime.replace(/-/,"\/");
		enddate = jendtime.replace(/-/,"\/");
		if(new Date(begindate)>new Date(enddate)){
			alert("所选的返程日期小于出发日期，请返回重新选择！")
			gnjp.d2.focus();
			return false;
		}
	}
if(dx=='liancheng'){
		begindate = jstarttime.replace(/-/,"\/");
		enddate = jendtime.replace(/-/,"\/");
		if(new Date(begindate)>new Date(enddate)){
			alert("所选的回程日期小于出发日期，请返回重新选择！")
			gnjp.d2.focus();
			return false;
		}
	}
}

function checkgn2(){
    if(gnjp.txt_begionCity.value==""||gnjp.txt_begionCity.value=="输入中文/拼音/三字码")//
    {
         alert("请填写出发城市");gnjp.txt_begionCity.focus();
         return false;
    }
    if(gnjp.txt_endCity.value==""||gnjp.txt_endCity.value=="输入中文/拼音/三字码")
    {
         alert("请填写到达城市");gnjp.txt_endCity.focus();
         return false;
    }
    return true;
}