var fMinValue=0;var fMaxValue=10;var cardPicArr=new Array();cardPicArr["2"]="high";cardPicArr["3"]="vip";var b_callFlag=false;function calAuctionPrice(B){var A=B.curDiscount;var C=0;if(A!=""){try{C=parseFloat(A)}catch(D){}if(C>0&&C<10){showUserCardInfo(B);showAuctionPrice(C,unescape(B.curGradeName),B.isUserLogon)}}}function showUserCardInfo(B){var A=unescape(B.curGradeIndex);var D="\u60a8\u62e5\u6709\u8be5\u5e97\u7684"+unescape(B.curGradeName)+"\u5361,";D+="\u53ef<span>"+B.curDiscount+"\u6298</span>\u4eab\u53d7\u8be5\u5e97\u5b9d\u8d1d(\u9664\u4e0d\u6253\u6298\u5b9d\u8d1d)";if(cardPicArr[A]){D+='<img height="15" width="25" src="http://pics.taobao.com/bao/album/sys/misc/'+cardPicArr[A]+'.gif">'}var C=document.getElementById("VipCardTitle");if(C){C.style.display="";C.innerHTML=D}}function showAuctionPrice(A,I,Q){var H=document.getElementsByTagName("div");if(H&&H.length>0){for(var P=0;P<H.length;P++){var F=null;try{var F=H[P];if(F.tagName.toLowerCase()!="div"){continue}}catch(N){}if(F){var L=F.getAttribute("id");if(L&&L.indexOf("id_div_")>-1){var O=F.getAttribute("price");var C=F.getAttribute("tp");var G=F.getAttribute("promoted");var M=processPrice(O,A);var B=F.getAttribute("actype");if(M){if(C){var R=F.className;if(C=="list"){if(Q&&Q=="true"&&G=="true"&&B=="b"){F.className=R+" Through"}var D=L.substring("id_div_".length,L.length);try{var K=document.getElementById("id_price_"+D);if(K){if(Q&&Q=="true"&&G=="true"&&B=="b"){K.className="Fixprice Ordinarily"}}var J=document.getElementById("id_nprice_"+D);if(J){if(G=="true"&&B=="b"){J.style.display="";J.className="Viprice";J.innerHTML=I+"\u4ef7</i><span>"+M+"\u5143</span>"}else{if(B=="b"){J.style.display="";J.className="Remark";J.innerHTML="\u7279\u4ef7\u5b9d\u8d1d\uff0c\u4e0d\u53c2\u52a0\u6d3b\u52a8"}}}}catch(N){}}else{if(C=="grid"){if(Q&&Q=="true"&&G=="true"&&B=="b"){F.className=R+" Through"}var D=L.substring("id_div_".length,L.length);try{var K=document.getElementById("id_price_"+D);if(K){if(Q&&Q=="true"&&G=="true"&&B=="b"){K.className="Fixprice Ordinarily"}}var J=document.getElementById("id_nprice_"+D);var E=document.getElementById("id_track_"+D);if(J){if(G=="true"&&B=="b"){J.style.display="";J.className="Viprice";J.innerHTML="<i>"+I+"\u4ef7</i><em>"+M+"\u5143</em>";if(E){E.style.display="none"}}else{if(B=="b"){J.style.display="";J.className="Remark";J.innerHTML="<i>\u7279\u4ef7\u5b9d\u8d1d\uff0c\u4e0d\u53c2\u52a0\u6d3b\u52a8</i>";if(E){E.style.display="none"}}}}}catch(N){}}}}}}}}}}function processPrice(B,F){var A=0;var C;try{A=parseFloat(B)}catch(E){}if(A>0){var D=A*F/10;if(D>100){A=Math.round(D);var G=new Number(A);C=G.toString()+".00"}else{D=D*100;A=Math.round(D);A=A/100;var G=new Number(A);C=G.toString();if(C.indexOf(".")==-1){C+=".00"}else{if(((C.length)-(C.indexOf(".")))!=3){C+="0"}}}}return C}function checkTrackNick(){var A=false;try{var B=tracenick;if(B&&B.length>0){A=true}}catch(C){}return A}function handleGetUserCard(res){if(b_callFlag){return }b_callFlag=true;var uc=null;if(res){try{var resData=res.responseText;if(resData){resData=trim(resData);if(resData.length>0){uc=new Array();eval(resData)}}}catch(e){}}if(!isArrayEmpty(uc)){calAuctionPrice(uc)}}function getTimestamp(){var A=new Date();return A.getTime()}function handleGetUserCardExcep(A){}function initShopView(A,C){var B=window.location.href;if(B.indexOf("http://wui.")!=-1){return }var F;F=A;if(F=="true"&&(checkTrackNick()||(nick&&nick.length>0))){var D="/shop/get_user_card.htm?seller_id="+C;D+="&t="+getTimestamp();try{sAJAX(handleGetUserCard,"GET",D,null,handleGetUserCardExcep)}catch(E){}}};
