'; catecnt = catecnt + 1; } gscnt = gscnt +1; var searchgscnt = obj.list[i].pcnt; var showsearchgscnt = searchgscnt;//\¦ if(obj.list[i].pkind=='1'){ //TWFXg if(showsearchgscnt=='0'){ txt = txt + '
'; } else { txt = txt + '
'; } } else { if(showsearchgscnt=='0'){ txt = txt + '
'; } else { txt = txt + '
'; } } } txt = txt + ''; } suggestin.innerHTML = txt; suggest.style.display = 'block'; // ÎÛðzñ» elm = j$('ul#keywordsearchlist > li > a'); elm.each(function(indx){ var num = indx; elm_arr[indx] = j$(this); fcs_flg[indx] = false; j$(this).focusin(function(){ fcs_num = num; if( fcs_flg[indx] === false ){ fcs_flg[indx] = true; } fcs_flg[indx] = true; }).blur(function(){ fcs_flg[indx] = false; if( fcs_flg.indexOf(true) < 0 ) { fcs_num = 0; } }); }); //key_decision(); //1ÔÚÌõÊð\¦ showsuggestinner('sug0'); j$('ul#keywordsearchlist > li > a#sug0').css('background-color', '#eef3f9'); }}}}}, onFailure: function(request) { //alert('onFailure/'+ request.responseText); }, onException: function (request,e) { //alert('onException/'+ e); } } ); } else {suggestin.innerHTML = "";suggest.style.display = 'none';hidediv('suggest');}}function stopSuggestSearch() { if(sugReq !=null) sugReq.transport.abort();}//window.onload = function(){//initParm();var oldvalue = "";var keywordtxt = document.getElementById("txtGoodsSearchKeyword");var suggest = document.getElementById("suggest");var suggestsend_timeoutid = null;function checkKeyword(evt){evt = (evt) ? evt : event;var charCode = getKEYCODE(evt);if(Number(charCode) == 40){if(elm_arr[1]){ j$('ul#keywordsearchlist > li > a').css('background-color', '#ffffff'); j$('ul#categorysearchlist > li > a').css('background-color', '#ffffff'); elm_arr[1].css('background-color', '#eef3f9');elm_arr[1].focus();} else {elm_arr[0].focus();}} else { if(suggestsend_timeoutid){clearTimeout(suggestsend_timeoutid);} suggestsend_timeoutid = setTimeout(function() {if(j$('#txtKeyword')){var keyword = j$('#txtKeyword').val();keyword = keyword.replace("@", "");keyword = keyword.replace(/^\s+/, "");keyword = keyword.replace(/\s+$/, "");if((keyword == "" && suggest && suggest.style.display == 'block') || (oldvalue != j$('#txtKeyword').val())){suggestSearch(keywordtxt);oldvalue = j$('#txtKeyword').val();}} }, 500);}//setTimeout(check,100);}//checkKeyword();//}var timerIdsuggestSearchhide=0;var nowshowtsuggest='';function inKeywordSearch(id){clearTimeout(timerIdsuggestSearchhide);j$('#'+id).attr('bufkw')nowshowtsuggest=j$('#'+id).attr('bufkw');//0.1bÔÆÇÜÁ½ê®ìtimerIdsuggestSearchhide = setTimeout(function() {showsuggestinner(id);}, 100);}var suginReq = null;function showsuggestinner(id){ var nowdatetime = getNowDateTime(); stopSuggestInSearch(); var sugobj = j$('#'+id); var kw = sugobj.attr('bufkw'); var keyword = sugobj.attr('bufkeyword'); var category = sugobj.attr('bufcate'); var sugsearchcnt = sugobj.attr('bufcnt'); var searchurl = sugobj.attr('href'); keyword = encodeURL(keyword); var suggestinner = document.getElementById("suggestinner"); if(kw != ""){ suginReq = new Ajax.Request( "/coco/ajaxrequest/", { "method": "get", "parameters": "DateTime="+nowdatetime+"&Mode=9"+category+"&q="+keyword, onSuccess: function(request) { }, onComplete: function(request) { if ((request.readyState == 4) && (request.status == 200)){ var result = request.responseText.trim();if(result != null && result != '') {var obj = YAHOO.lang.JSON.parse(result); //G[bZ[WªéêA[gð\¦·é(G[R[h0ÈOA©Â\¦pG[bZ[W¶Ý) if(obj.errcd && obj.errcd != 0){// if(obj.errcd != obj.errmsg){// showAlert('G[', obj.dspmsg+'\n\n'+obj.errmsg);// } else {// showAlert('G[', obj.dspmsg);// } alert('G[Å·'); } else { var listcnt = 0; if(obj.list){ listcnt = obj.list.length; } var txt = ''; if(sugsearchcnt=='0'){ txt = txt + '
'+kw+'
'; } else { txt = txt + '
'+kw+' ('+sugsearchcnt+'¤i)
'; } if(listcnt==0){ txt = txt + '
ÎÛf[^ªèܹñ
'; } //¤iê if(listcnt>0){ txt = txt + '
'; txt = txt + ' | '+obj.list[i].gnm+' | '; txt = txt + '(Å) | '; txt = txt + '
'; } txt = txt + 'õÊð©é'; suggestinner.innerHTML = txt; suggestinner.style.display = 'block'; showdiv('suggestinner'); }}}}}); } else {suggestinner.innerHTML = "";suggestinner.style.display = 'none';hidediv('suggestinner');} clearTimeout(timerIdsuggestSearchhide);}function outsuggestinner(keyword){if(nowshowtsuggest == keyword){clearTimeout(timerIdsuggestSearchhide);stopSuggestInSearch();}}function stopSuggestInSearch() { if(suginReq !=null) suginReq.transport.abort();}function cpnon(serialno, obj){var couponid = 'cpnd'+serialno;var buffcpndiv = document.getElementById('copycpnd'+serialno);if(!buffcpndiv) {var cpndiv = document.createElement('div');cpndiv.id = 'copycpnd'+serialno;cpndiv.className = 'couponballoon';} else {cpndiv = buffcpndiv;hidediv(cpndiv.id);}cpndiv.innerHTML = document.getElementById(couponid).innerHTML;document.getElementById('coupon').appendChild(cpndiv);var parent = j$('#'+obj.id).offsetParent();var py = 0;// XN[Êif( j$("#fixed-header").css("position") == "fixed"){py = j$(window).scrollTop();// XN[Ê}var wra = j$('#wrapper').offset().left;// æʶ©çuwrappervdivÌ£var cenh = j$('#center-header').offset().left;// æʶ©çucenter-headervdivÌ£if ( cenh - wra > 0 ){wra += cenh;}var cpnwktop = j$("#couponwk").offset().top;j$('#copycpnd'+serialno).css("top",Math.round(j$('#'+obj.id).offset().top-py-80)+"px");j$('#copycpnd'+serialno).css("left",Math.round(j$('#'+obj.id).offset().left-wra+100)+"px");showdiv(cpndiv.id);}function cpnout(serialno){var buffcpndiv = document.getElementById('copycpnd'+serialno);if(buffcpndiv){var p = buffcpndiv.parentNode;p.removeChild(buffcpndiv);}}function addCartgoodslist(sAddGoods, sAddCount) {var cartgoodslist = Cookies.get('cartgoodslist');var savelist = '';if(cartgoodslist != '' && cartgoodslist !== undefined){var chklist = cartgoodslist.substr(1);var cartlist = chklist.split('/');var cartlistcnt = cartlist.length;var existGoods = false;for(var j=0; j