function closeothers(thisid) {
  if (thisid.style.display=="") { 
	gnjp.style.display="none";
	gjjp.style.display="none";
	lypd.style.display="none";
	
    thisid.style.display="";
  }
  else{
  thisid.style.display="";
  }
}
function search_click(name)
{
	if (document.getElementById(name).id=='gnjp2'){
	document.getElementById('gnjp2').className='focusgn';
	document.getElementById('gjjp2').className='';
	document.getElementById('lypd2').className='';
	//alert('gnjp');
	//gnjp2.style.classname='focusgn';
	//gjjp2.style.classname='';
	//lypd2.style.classname='';
	}
	else if (document.getElementById(name).id=='gjjp2'){

	document.getElementById('gnjp2').className='';
	document.getElementById('gjjp2').className='focusgj';
	document.getElementById('lypd2').className='';
	//alert('gjjp');
	//gnjp2.style.classname='';
	//gjjp2.style.classname='focusgj';
	//lypd2.style.classname='';
	}
	else if (document.getElementById(name).id=='lypd2'){

	document.getElementById('gnjp2').className='';
	document.getElementById('gjjp2').className='';
	document.getElementById('lypd2').className='focusjd';
	//alert('jdyd');
	//gnjp2.style.classname='';
	//gjjp2.style.classname='';
	//lypd2.style.classname='focusjd';
	}
	
}




function showfancheng(){

if (document.dcform.radio.value=="2")
  {
	document.dcform.StrDate03.disabled=false;
   }
 else
 {
 document.dcform.StrDate03.disabled=true;
 }  	
	
}
		
function CheckPara(strform){
  if(strform.StartCity01.value == ""){
    alert("您没有选择出发城市,请选择!");
	strform.StartCity01.focus();
    return false;
  }
  if(strform.StrDate01.value == "yyyy-mm-dd" || strform.StrDate01.value == ""){
    alert("您没有选择出发日期,请选择!");
	strform.StrDate01.focus();
    return false;
  }
  
    if(!isDateString(strform.StrDate01.value)){
  alert("出发日期不是一个合法的日期，请更正，正确时间格式：YYYY-MM-DD");
  strform.StrDate01.focus();
  return false;
  }
  
  if(stringToDate(strform.StrDate01.value) < stringToDate(strform.today.value)){
     alert("出发日期不能小于现在日期,请检查重输!");
	 strform.StrDate01.focus();
     return false;
   }
  
  if(strform.EndCity01.value == ""){
    alert("您没有选择目的城市,请选择!");
	strform.EndCity01.focus();
    return false;
  }
  
  
  if(strform.EndCity01.value == strform.StartCity01.value){
    alert("出发城市和到达城市不能相同,请更正!");
	strform.EndCity01.focus();
    return false;
  }

  //对往返程进行验证
//  if(strform.radio[1].checked){
//    if(strform.StrDate03.value == ""){
//      alert("您还没有输入返程日期,请输入（日期格式：YYYY-MM-DD）!");
//	  strform.StrDate03.focus();
//      return false;
//    }
//    if(!isDateString(strform.StrDate03.value)){
//      alert("返程日期不是一个合法的日期，请更正，正确时间格式：YYYY-MM-DD");
//	  strform.StrDate03.focus();
//      return false;
//    }
//    if(stringToDate(strform.StrDate03.value) < stringToDate(strform.today.value)){
//     alert("返程日期不能小于现在日期,请检查重输!");
//	 strform.StrDate03.focus();
//     return false;
//   }
//   if(stringToDate(strform.StrDate03.value) < stringToDate(strform.StrDate01.value)){
//     alert("返程日期不能小于出发日期,请检查重输!");
//	 strform.StrDate03.focus();
//     return false;
//   }
//  }
return true;
}


function CheckHotel(strform){
  if(strform.city.value == ""){
    alert("您还没有输入入住城市,请输入!");
	strform.city.focus();
    return false;
  }
  if(strform.checkIn.value == ""){
    alert("您还没有输入入住日期,请输入!");
	strform.checkIn.focus();
    return false;
  }
  
  if(!isDateString(strform.checkIn.value)){
  alert("入住日期不是一个合法的日期，请更正，正确时间格式：YYYY-MM-DD");
  strform.checkIn.focus();
  return false;
  }
  if(stringToDate(strform.checkIn.value) < stringToDate(strform.today.value)){
     alert("入住日期不能小于现在日期,请检查重输!");
	 strform.checkIn.focus();
     return false;
   }
  if(strform.checkOut.value == ""){
    alert("您还没有输入离店日期,请输入!");
	strform.checkOut.focus();
    return false;
  }
  
  if(!isDateString(strform.checkOut.value)){
  alert("离店日期不是一个合法的日期，请更正，正确时间格式：YYYY-MM-DD");
  strform.checkOut.focus();
  return false;
  }
  
  if(stringToDate(strform.checkOut.value) < stringToDate(strform.today.value)){
     alert("离店日期不能小于现在日期,请检查重输!");
	 strform.checkOut.focus();
     return false;
   }
   
  if(stringToDate(strform.checkOut.value) < stringToDate(strform.checkIn.value)){
     alert("离店日期不能小于入住日期,请检查重输!");
	 strform.checkOut.focus();
     return false;
   }
 
return true;
}



