document.writeln('<script type="text/javascript" src="http://resource.elong.com/webunion/searchboxjs/cities.js"></script>');
document.writeln('<script type="text/javascript" src="http://resource.elong.com/webunion/searchboxjs/jquery.datePicker.min-2.1.2.js"></script>');
document.writeln('<link href="http://resource.elong.com/webunion/searchboxjs/jquery.datePicker.css" rel="stylesheet" type="text/css" />');
document.writeln('');
document.writeln('<style type="text/css">');
document.writeln('#searchbox_elong *{padding:0;margin:0; font-size:12px; font-family:Arial, Helvetica, sans-serif; line-height:1.5em;}');
document.writeln('#searchbox_elong img{border:0;}');
document.writeln('/*set width*/');
document.writeln('#searchbox_elong{min-width:200px;width:200px;}');
document.writeln('#searchbox_elong .title_l,#searchbox_elong .title_r,#searchbox_elong .footer_l,#searchbox_elong .footer_r{width:6px;height:34px;background:url(http://resource.elong.com/webunion/searchboxjs/diy/air/lblue/images/bg.gif) no-repeat; overflow:hidden;}');
document.writeln('#searchbox_elong .title_r{background-position:-6px 0px;}');
document.writeln('#searchbox_elong .footer_l{background-position:0px -34px;height:6px;}');
document.writeln('#searchbox_elong .footer_r{background-position:-6px -34px;height:6px;}');
document.writeln('#searchbox_elong .footer_bg{border-bottom:1px solid #c6dcf1;background:#fff;height:5px;overflow:hidden;clear:both;margin:0;padding:0;}');
document.writeln('#searchbox_elong .title_box{background:url(http://resource.elong.com/webunion/searchboxjs/diy/air/lblue/images/title_bg.gif) repeat-x;height:34px;overflow:hidden;}');
document.writeln('#searchbox_elong h3{display:block;float:left;width:74px;height:13px;background:url(http://resource.elong.com/webunion/searchboxjs/diy/air/lblue/images/bg.gif) 0px -40px no-repeat;margin-left:5px;margin-top:11px;_display:inline;overflow:hidden;}');
document.writeln('#searchbox_elong .e_logo{display:block;background:url(http://resource.elong.com/webunion/searchboxjs/diy/air/lblue/images/bg.gif) 0px -76px no-repeat;width:74px;height:17px;overflow:hidden;margin-top:5px;float:right;margin-top:11px;}');
document.writeln('/*set height*/');
document.writeln('#searchbox_elong #elong_cont{border-left:1px solid #c6dcf1; border-right:1px solid #c6dcf1; background:#fff;width:auto;height:180px; overflow:hidden;}');
document.writeln('#searchbox_elong dl{margin:8px auto 5px;clear:both;zoom:1;width:93%;padding-left:5px;}');
document.writeln('#searchbox_elong dt{float:left;width:35%;display:inline;text-align:center;height:23px;line-height:23px;}');
document.writeln('#searchbox_elong dd{float:left;width:64%;_width:62%;height:23px;line-height:23px;text-align:left;}');
document.writeln('#searchbox_elong dd select{font-size:12px;*font-family:"宋体";width:95%;_width:96%;height:20px;_height:18px;border:1px solid #7ebfcf;*margin-top:-3px;_margin-top:0px;}');
document.writeln('#searchbox_elong dd input{padding-left:1%;height:15px;line-height:15px;width:93%;_width:64%;border:1px solid #7ebfcf;*border:1px solid #7f9db9;margin-top:2px;*margin-top:-2px;_margin-top:0px;}');
document.writeln('#searchbox_elong .searchbtn{margin:0px auto;width:66px;height:25px;text-align:center;padding-top:6px;*margin-top:-5px;clear:both;}');
document.writeln('#searchbox_elong .searchbtn input{width:66px;height:21px;border:none;margin:0;padding:0; background:url(http://resource.elong.com/webunion/searchboxjs/diy/air/lblue/images/bg.gif) 0px -54px no-repeat;cursor:pointer;}');
document.writeln('');
document.writeln('</style>');
document.writeln('');
document.writeln('');
document.writeln('<div id="searchbox_elong">');
document.writeln('  <table width="100%" border="0" cellspacing="0" cellpadding="0">    ');
document.writeln('    <tr>');
document.writeln('      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.writeln('        <tr>');
document.writeln('          <td width="6" class="title_l">&nbsp;</td>');
document.writeln('          <td valign="top" class="title_box"><h3></h3><a href="#" class="e_logo" title="艺龙旅行网"></a></td>');
document.writeln('          <td width="6" class="title_r">&nbsp;</td>');
document.writeln('        </tr>');
document.writeln('      </table></td>');
document.writeln('    </tr>');
document.writeln('    <tr>');
document.writeln('      <td valign="top"><div id="elong_cont">');
document.writeln('        <form onsubmit="pageTracker._linkByPost(this)"  id="form2" action="http://travel.elong.com/flights/TSearch.aspx" method="get" target="_blank">');
document.writeln('            <input type="hidden" id="aircampaign_id" name="campaign_id" value="" />');
document.writeln('            <input type="hidden" name="g" value="result" />');
document.writeln('            <input type="hidden" name="FLY_TYPE" value="0" />');
document.writeln('            <dl>');
document.writeln('              <dt class="DEPART_CITY">出发城市：</dt>');
document.writeln('              <dd class="DEPART_CITY">');
document.writeln('                <select id="fromCities"  name="DEPART_CITY">');
document.writeln('                  <option value="">Beijing 北京</option>');
document.writeln('                </select>');
document.writeln('              </dd>');
document.writeln('              <dt class="DEST_CITY">到达城市：</dt>');
document.writeln('              <dd class="DEST_CITY">');
document.writeln('                <select id="toCities" name="DEST_CITY">');
document.writeln('                  <option value="" selected="selected">Shanghai 上海</option>');
document.writeln('                </select>');
document.writeln('              </dd>');
document.writeln('              <dt class="FLY_DATE">出发日期：</dt>');
document.writeln('              <dd class="FLY_DATE">');
document.writeln('                <input class="date-pick" id="FLY_DATE" name="FLY_DATE" type="text" value="" />');
document.writeln('              </dd>');
document.writeln('              <dt class="FLY_TIME">出发时间：</dt>');
document.writeln('              <dd class="FLY_TIME">');
document.writeln('                <select name="FLY_TIME">');
document.writeln('                  <option value="">全天</option>');
document.writeln('                  <option value="00:01-12:00">00:01-12:00</option>');
document.writeln('                  <option value="12:00-18:00">12:00-18:00</option>');
document.writeln('                  <option value="18:00-24:00">18:00-24:00</option>');
document.writeln('                </select>');
document.writeln('              </dd>');
document.writeln('              <dt class="FCY">舱位等级：</dt>');
document.writeln('              <dd class="FCY">');
document.writeln('                <select name="FCY">');
document.writeln('                  <option value="1" selected="selected">经济舱</option>');
document.writeln('                  <option value="8">商务舱</option>');
document.writeln('                  <option value="16">头等舱</option>');
document.writeln('                </select>');
document.writeln('              </dd>');
document.writeln('              <dt class="DELEVER_CITY">送票城市：</dt>');
document.writeln('              <dd class="DELEVER_CITY">');
document.writeln('                <select id="DELEVER_CITY" name="DELEVER_CITY">');
document.writeln('                  <option value="">Beijing 北京</option>');
document.writeln('                </select>');
document.writeln('              </dd>');
document.writeln('            </dl>');
document.writeln('            <div class="searchbtn">');
document.writeln('              <input type="submit" value=" " />');
document.writeln('            </div>');
document.writeln('          </form>');
document.writeln('        </div></td>');
document.writeln('    </tr>');
document.writeln('    <tr>');
document.writeln('      <td height="6" colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">        ');
document.writeln('        <tr>');
document.writeln('          <td class="footer_l"></td>');
document.writeln('          <td><div class="footer_bg">&nbsp;</div></td>');
document.writeln('          <td class="footer_r"></td>');
document.writeln('        </tr>');
document.writeln('      </table></td>');
document.writeln('    </tr>');
document.writeln('  </table>');
document.writeln('</div>');

var len=5;
$(function(){	
	setairoptions();
	
	$("#elong_cont").height(boxheight-40);
	$("#elong_cont").width(parseInt(boxwidth));
	$("#hotelcampaign_id").val(campaign_id);
	$("#aircampaign_id").val(campaign_id);
	
});

//airoptions
function setairoptions(){
    var all="FLY_DATE,FLY_TIME,FCY,DELEVER_CITY";
    var alloptions = all.split(",");
    jQuery.each(alloptions, function() {
        $("."+this).hide();        
    });
        
    if(airoptions!=''){
		var options = airoptions.split(",");
        jQuery.each(options, function() {
            $("."+this).show();        
        });
    }
}

$(function(){
   if(parseInt(boxwidth)>295 && parseInt(boxwidth)>255){
		$(".date-pick").datePicker({
		clickInput:true,
		startDate:(new Date()).asString()
		});	
  }
})

//google-analytics
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-11239288-2");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
} catch(err) {}


