function loadCss(file, id){ var cssTag = document.getElementById(id); var head = document.getElementsByTagName("head")[0]; if(cssTag) head.removeChild(cssTag); css = document.createElement('link'); css.href = file; css.rel = 'stylesheet'; css.type = 'text/css'; css.id = id; head.appendChild(css); } function loadJs(file, id, callback){ var scriptTag = document.getElementById(id); var head = document.getElementsByTagName("head")[0]; if(scriptTag) head.removeChild(scriptTag); script = document.createElement('script'); script.src = file; script.type = 'text/javascript'; script.id = id; head.appendChild(script); script.onreadystatechange = function () { if (script.readyState == 'complete' || script.readyState == 'loaded' || script.readyState == 'interactive') { jQuery(document).ready(function(){ callback(); }); } } script.onload = function () { jQuery(document).ready(function(){ callback(); }); } } loadCss("http://bdoem.kuxun.cn/api/css/autocomplete.css", "kxapi_autocomplete"); loadCss("http://bdoem.kuxun.cn/api/css/hengfu/search.css", "kxapi_search"); loadJs("http://bdoem.kuxun.cn/api/js/all_utf-8.js","kxapi_all_utf-8", function(){ var kxapicon = '

出发城市

到达城市

出发日期

\"选择日期\"

城市

入住日期

\"选择日期\"

离店日期

\"选择日期\"

位置/酒店名称

出发城市

目的城市或车次

 一 二 三 四 五 

 一 二 三 四 五 

'; jQuery("#kxsbox").html(kxapicon); kx_initDate(); //showRadioByType(1); if (typeof YAHOO != 'undefined') KX.AC.init(KX.AC.mychannels); kx_drawfuc(); kx_resizeCalendar(); });