var footer_open=true;var display_dapei=0;var hide_dapei=1;var __S1=false,FAV="",AT=2,TAR="";var current_submenu=1;var current_submenu_left=0;var current_brand_left=0;var current_color_left=0;var current_menu_left=0;var cdn_cookie=getCookie("HSCDN");var reg=new RegExp('"',"g");cdn_cookie=cdn_cookie.replace(reg,"");if(cdn_cookie=="CDN1"){cdn="http://cdn3.hsgh.com"}else{cdn="http://cdn3.hsgh.com"}function addMenuLinks(b){var a=document.getElementById(b);switch(b){case"cat_menu_1":a.innerHTML="<a href='http://www.hsgh.com/waitao.html'>女式外套</a> | <a href='http://www.hsgh.com/mianfu.html'>女式棉服</a> | <a href='http://www.hsgh.com/qunku.html'>女式裤装</a> | <a href='http://www.hsgh.com/banqun.html'>女式半裙</a> | <a href='http://www.hsgh.com/lianyiqun.html'>女式连衣裙</a> | <a href='http://www.hsgh.com/maoyi.html'>女式毛衣</a> | <a href='http://www.hsgh.com/kaishan.html'>女式开衫</a> | <a href='http://www.hsgh.com/tshirt.html'>女式T恤</a> | <a href='http://www.hsgh.com/chenshan.html'>女式衬衫</a> | <a href='http://www.hsgh.com/jeans.html'>女式牛仔裤</a> | <a href='http://www.hsgh.com/neiyi.html'>女式内衣</a> | <a href='http://www.hsgh.com/weiyi.html'>女式卫衣</a> | <a href='http://www.hsgh.com/nvshi_yundong.html'>女式运动服</a> | <a href='http://www.hsgh.com/siwa.html'>丝袜连裤袜</a>";break;case"cat_menu_2":a.innerHTML="<a href='http://www.hsgh.com/jiake.html'>男士夹克</a> | <a href='http://www.hsgh.com/nanshi_chenshan.html'>男士衬衫</a> | <a href='http://www.hsgh.com/changku.html'>男士长裤</a> | <a href='http://www.hsgh.com/nanshi_jeans.html'>男士牛仔裤</a> | <a href='http://www.hsgh.com/maoshan.html'>男士毛衫</a> | <a href='http://www.hsgh.com/nanshi_tshirt.html'>男士T恤</a> | <a href='http://www.hsgh.com/yurongfu.html'>男士羽绒服</a> | <a href='http://www.hsgh.com/nanshi_yundong.html'>男士运动服</a>";break;case"cat_menu_3":a.innerHTML="<a href='http://www.hsgh.com/ertong_waitao.html'>儿童外套</a> | <a href='http://www.hsgh.com/ertong_taozhuang.html'>儿童套装</a> | <a href='http://www.hsgh.com/yinger.html'>婴儿服装</a> | <a href='http://www.hsgh.com/ertong_kuzi.html'>儿童裤子</a> | <a href='http://www.hsgh.com/ertong_shangyi.html'>儿童上衣</a> | <a href='http://www.hsgh.com/ertong_qunzi.html'>儿童裙子</a>";break;case"cat_menu_4":a.innerHTML="<a href='http://www.hsgh.com/nvxie.html'>女式单鞋</a> | <a href='http://www.hsgh.com/nvliangxie.html'>女式凉鞋</a> | <a href='http://www.hsgh.com/duanxue.html'>女式短靴</a> | <a href='http://www.hsgh.com/changxue.html'>女式长靴</a> | <a href='http://www.hsgh.com/liangtuo.html'>女式凉拖</a> | <a href='http://www.hsgh.com/nvyudongxie.html'>女式运动鞋</a> | <a href='http://www.hsgh.com/fanbuxie.html'>女式帆布鞋</a> | <a href='http://www.hsgh.com/zhengzhuangxie.html'>男士正装鞋</a> | <a href='http://www.hsgh.com/xiuxianxie.html'>男士休闲鞋</a> | <a href='http://www.hsgh.com/yudongxie.html'>男士运动鞋</a> | <a href='http://www.hsgh.com/huwaixie.html'>男士户外鞋</a>";break;case"cat_menu_5":a.innerHTML="<a href='http://www.hsgh.com/nvbao.html'>女包</a> | <a href='http://www.hsgh.com/nanbao.html'>男包</a> | <a href='http://www.hsgh.com/qianbao.html'>钱包钥匙包</a> | <a href='http://www.hsgh.com/lvxingxiang.html'>旅行箱</a> | <a href='http://www.hsgh.com/qitabao.html'>其他</a>";break;case"cat_menu_6":a.innerHTML="<a href='http://www.hsgh.com/xianglian.html'>项链</a> | <a href='http://www.hsgh.com/erhuan.html'>耳环</a> | <a href='http://www.hsgh.com/shoulian.html'>手链手镯</a> | <a href='http://www.hsgh.com/jiezhi.html'>戒指</a> | <a href='http://www.hsgh.com/qitashoushi.html'>其他</a>";break;case"cat_menu_7":a.innerHTML="<a href='http://www.hsgh.com/maozi.html'>帽子</a> | <a href='http://www.hsgh.com/toushi.html'>头饰</a> | <a href='http://www.hsgh.com/yaodai.html'>腰带</a> | <a href='http://www.hsgh.com/weijin.html'>围巾</a> | <a href='http://www.hsgh.com/shoubiao.html'>手表</a> | <a href='http://www.hsgh.com/qitapeishi.html'>其他</a>";break}}function flipMenu(b){targetElement="cat_menu_1";switch(b){case"女装":targetElement="cat_menu_1";break;case"男装":targetElement="cat_menu_2";break;case"童装":targetElement="cat_menu_3";break;case"鞋":targetElement="cat_menu_4";break;case"包":targetElement="cat_menu_5";break;case"首饰":targetElement="cat_menu_6";break;case"配饰":targetElement="cat_menu_7";break}var a=document.getElementById(targetElement);var e=a.childNodes;if(e.length>0){var f=e.length;for(var d=f-1;d>=0;d--){a.removeChild(e[d])}}else{addMenuLinks(targetElement)}}function toggle_submenu(a){var b="submenu_id"+a;var d=document.getElementById(b);if(d.style.display=="none"){display_submenu(a)}else{hide_submenus()}}function display_submenu(e){if(current_submenu!=e){current_submenu_left=0;current_brand_left=0}var a=dojo.byId("sub_view_id"+current_submenu);var d=dojo.byId("hot_brand_id"+current_submenu);if(a!=null){dojo.style(a,"left",0)}if(d!=null){dojo.style(d,"left",0)}current_submenu=e;hide_submenus();var h="submenu_id"+e;var k=document.getElementById(h);var m="a_id"+e;if(e==20){var b=document.getElementById("a_id8")}else{var b=document.getElementById(m)}var g="hot_brand_id"+e;var f=document.getElementById(g);if(b!=null){dojo.attr(b,"class","onmenu")}if(f!=null){f.style.display="inline"}if(!k){return}k.style.display="block";k.style.zIndex="100";var l=document.getElementById("submenu_bg");l.style.display="block";l.style.zIndex="99"}function hide_submenus(){var b=20;for(var e=1;e<=b;e++){var g="submenu_id"+e;var m="a_id"+e;if(e==20){var a=document.getElementById("a_id8")}else{var a=document.getElementById(m)}var f="hot_brand_id"+e;var d=document.getElementById(f);if(dojo.byId("submenu_id"+e)!=null&&dojo.style("submenu_id"+e,"height")>70){1==1}if(a!=null){dojo.attr(a,"class","")}if(d!=null){d.style.display="none"}if(e!=1){var h=document.getElementById(g);if(h!=null){h.style.display="none";h.style.zIndex="-1"}g="red_box_id"+e;h=document.getElementById(g);if(h!=null){h.style.display="none"}}}var k=document.getElementById("submenu_bg");if(k!=null){k.style.display="none";k.style.zIndex="-1"}var l=document.getElementById("submenu_trigger");if(l!=null){l.style.zIndex="-1"}}function hide_top_dapei_images(){var d=20;for(var b=0;b<=d;b++){var a="top_dapei_"+b;var e=document.getElementById(a);if(e!=null){e.style.display="none"}}}function display_top_dapei(b){hide_top_dapei_images();var a=document.getElementById(b);if(a){a.style.display="inline"}}function recordLike2(e,b,d){var a=document.getElementById("beyond_footer_div");new_fragment="<img src='http://www.hsgh.com/static/images/single_pixel.png?method=like&id="+e+"' />";if(d){a.innerHTML=new_fragment;if(b>=99){d.innerHTML="<span>99+<span>"}else{d.innerHTML="<span>"+(b+1)+"</span>"}}else{}}function recordLike3(f,b,e){var d=dojo.query("."+e)[0];var a=document.getElementById("beyond_footer_div");new_fragment="<img src='http://www.hsgh.com/static/images/single_pixel.png?method=like&id="+f+"' />";if(d){a.innerHTML=new_fragment;if(b>=99){d.innerHTML="99+ 喜欢"}else{d.innerHTML=(b+1)+" 喜欢"}}}function recordFav(g,e,a){var d=1;var b="";if(typeof(FAVDAPEI)!="undefined"){FAV="dapei";d=2;b=currDapeiId}else{if(a==3){return}if(!g){b=FAV;a=AT}else{b=g;FAV=g;AT=a}if(e){TAR=e}else{e=TAR}}postData='{"method":"add_favorite","tid":"'+b+'","tt":'+d+',"at":'+a+"}";var f={url:"SrvFav",handleAs:"json",postData:postData,load:function(h){if(!h){return}else{if(a==2&&h.status=="NEEDLOGIN"){logdialog.disLogin("fav")}else{if(h.status=="OK"){if(a==1){if(d==1){}else{}}else{if(a==2){if(d==1){if(e){var k=parseInt(dojo.attr(e,"num"));if(k>=99){e.innerHTML="<span>99+</span>"}else{e.innerHTML="<span>"+(k+1)+"</span>"}}logdialog.disPopupDialog("fav_danpin")}else{logdialog.disPopupDialog("fav_dapei");if(dojo.byId("dapei_fav")){var l=parseInt(dojo.byId("dapei_fav").innerHTML);l+=1;dojo.byId("dapei_fav").innerHTML=l}}}}}else{if(h.status=="EXIST"){if(a==1){if(d==1){}else{}}else{if(a==2){if(d==1){logdialog.disPopupDialog("repeat_fav_danpin")}else{logdialog.disPopupDialog("repeat_fav_dapei")}}}}}}}}};dojo.xhrPost(f)}function recordFav2(e){var b=1;var a="";if(typeof(FAVDAPEI)!="undefined"){b=2;a=currDapeiId}else{if(!e){a=FAV}else{a=e;FAV=e}}postData='{"method":"add_favorite","targetid":"'+a+'","type":'+b+"}";var d={url:"SrvMember",handleAs:"json",postData:postData,load:function(f){if(!f){return}else{if(f.status=="NEEDLOGIN"){logdialog.disLogin("fav")}else{if(f.status=="OK"){if(b==1){alert("当前单品已经被收藏，可以在我的页面中查看。")}else{alert("当前搭配已经被收藏，可以在我的页面中查看。")}}else{if(f.status=="EXIST"){if(b==1){alert("当前单品无法被重复收藏，请在我的页面中查看。")}else{alert("当前搭配无法被重复收藏，请在我的页面中查看。")}}}}}},error:function(){},handle:function(){__S1=false}};if(!__S1){dojo.xhrPost(d);__S1=true}}function jumpToPage(){var a=document.getElementById("page_number_pulldown_select");var b=a.selectedIndex;var d=a.options[b].value;window.location.href=d}function display_goto_logo(b){goto_logo="goto_logo_"+b;vendor_logo="vendor_logo_"+b;var a=document.getElementById(goto_logo);var d=document.getElementById(vendor_logo);if(a){a.style.display="inline"}if(vendor_logo){d.style.display="none"}}function hide_goto_logo(b){goto_logo="goto_logo_"+b;vendor_logo="vendor_logo_"+b;var a=document.getElementById(goto_logo);var d=document.getElementById(vendor_logo);if(a){a.style.display="none"}if(d){d.style.display="inline"}}function show_new(){var b=document.getElementById("new_button");var a=b.childNodes[0].childNodes[0];window.location=a.getAttribute("href")}function displayFilterOptions(d){undisplayFilterOptions("1");var b="attr"+d+"s";var a=document.getElementById(b);if(d==4){a.style.zIndex="100"}if(d==1){a.style.zIndex="102"}a.style.display="block"}function undisplayFilterOptions(d){var b="attr"+d+"s";var a=document.getElementById(b);a.style.display="none"}function displayFilterHover(a){dojo.attr(dojo.byId("attr4s"),"class","txt attr4s_on")}function undisplayFilterHover(a){dojo.attr(dojo.byId("attr4s"),"class","txt attr4s_out")}function cross2red(a){dojo.style(a,"background-position","")}function cross2grey(a){dojo.style(a,"background-position","")}function new_button_change(){var a=document.getElementById("new_button");a.style.background="url(/static/images/new2.jpg)"}function new_button_2_moto(){var a=document.getElementById("new_button");a.style.background="url(/static/images/new1.jpg)"}var objId=0;var nowId=0;var sliderNum=4;var sliderWidth=380;var v=0;var count=0;function sliderMove(e,f){var d=dojo.byId("slider_banner");var b=dojo.style(d,"top");var a=getObjLeft(f);v=getV(b,a,v,f);if(b>a&&e==1){b-=v;dojo.style(d,"top",b+"px");setTimeout("sliderMove(1,"+f+")",10)}else{if(b<a&&e==0){b+=v;dojo.style(d,"top",b+"px");setTimeout("sliderMove(0,"+f+")",10)}else{dojo.style(d,"top",a+"px");if(objId==sliderNum-1){dojo.style("top_dapei_0","top",sliderNum*sliderWidth+"px")}else{if(nowId==sliderNum-1){dojo.style("top_dapei_0","top","0px");if(objId==0&&f==1){dojo.style("slider_banner","top","0")}}}nowId=objId;v=0}}}function getObjLeft(b){var a=objId*(-sliderWidth);if(objId==0&&nowId==sliderNum-1&&b==1){a=-sliderNum*sliderWidth}return a}function getV(e,f,b,h){var a=Math.abs(nowId*(-sliderWidth)-getObjLeft(h));var g=Math.abs(e-f);if(b==0){b=a/20}if(g<(a/3)&&g<500){b/=1.2}if(b<5){b=5}return parseInt(b)}function display_top_dapei(b,a){count=0;objId=parseInt(b);for(i=0;i<sliderNum;i++){dojo.attr("slider_d"+i,"class","d"+(i+1))}dojo.attr("slider_d"+objId,"class","d"+(objId+1)+"_hover");if(objId==0&&a==0){dojo.style("top_dapei_0","top","0")}if(objId>nowId){sliderMove(1,a)}else{if(objId<nowId&&a==0){sliderMove(0,a)}else{if(objId==0&&(nowId==sliderNum-1)&&a==1){sliderMove(1,a)}}}}function top_dapei_fadein(){var e=0;e=getScrollTop();var a=dojo.byId("addToFavBtn");var d=dojo.byId("fav_gotop_float");dojo.style(d,"display","block");var b=dojo.style(d,"opacity")*10;if(b<10&&e>0){b++;dojo.style(d,"opacity",b/10);setTimeout("fadein()",50)}}function top_dapei_fadeout(){var d=0;d=getScrollTop();var e=dojo.byId("pikaLogin");var b=dojo.byId("fav_gotop_float");var a=parseInt(dojo.style(b,"opacity")*10);if(a>0&&d==0){a--;dojo.style(b,"opacity",a/10);dojo.style(e,"opacity",a/10);setTimeout("fadeout()",50)}else{dojo.style(b,"display","none");dojo.style(e,"display","none")}}function display_top_dapei_new(b,a){objId=parseInt(b);if(objId!=nowId){nid=nowId.toString();dojo.removeClass("top_dapei","top_dapei"+nid);dojo.addClass("top_dapei","top_dapei"+b);dojo.removeClass("slider_d"+nid,"d"+nid+"_hover");dojo.addClass("slider_d"+nid,"d"+nid);dojo.removeClass("slider_d"+b,"d"+b);dojo.addClass("slider_d"+b,"d"+b+"_hover");dojo.byId("top_dapei_"+nid).style.display="none";dojo.byId("top_dapei_"+b).style.display="inline";nowId=objId}}function autoSlider(){count+=1;if(count==4){oid=nowId+1;if(oid==sliderNum){oid=0}objid=oid.toString();display_top_dapei_new(objid,1);count=0}setTimeout("autoSlider()",1000)}function moreSite(e){if(dojo.byId("submenu_id"+e)==null){return}var d=dojo.query("UL",dojo.byId("submenu_id"+e)).length;var b=dojo.byId("moreSiteBtn"+e);var a=dojo.byId("submenu_id"+e);if(d<4){return}if(b.innerHTML=="更多"){dojo.style(a,"height",(10+20*d)+"px");dojo.style(a,"zIndex","1002");dojo.style(b,"top",(20*d-10)+"px");dojo.attr(b,"class","moreSite_open");b.innerHTML="收起"}else{dojo.style(a,"zIndex","100");dojo.style(b,"top","50px");dojo.attr(b,"class","moreSite");b.innerHTML="更多"}}function go_to_page(){var n=document.getElementById("dest_page");var b=dojo.query(".page_total")[0];var e=b.innerHTML;e=e.slice(1,-1);var k=n.value;var m=parseInt(k)-1;var a=document.URL;var g="";var d="-p_"+m+".html";var f=a.indexOf("-p_");if(f==-1){var l=a.indexOf(".html");var h=a.length-l;g=a.slice(0,-h);g=g+d}else{g=a.substring(0,f);g=g+d}if((isNaN(k))||k>(parseInt(e))){window.location.href=document.URL}else{window.location.href=g+"?tagid=search_gotopage"}}function gotop(){if(dojo.isWebKit){document.body.scrollTop=0}else{document.documentElement.scrollTop=0}}function obeyOrDie(){var a=0;a=getScrollTop();if(a>400){obey()}if(a<400){die()}scanAllImage()}function obey(){var b=dojo.byId("fav_gotop_float");if(window.XMLHttpRequest){var d=document.documentElement.clientHeight;var a=document.body.clientWidth;dojo.style(b,"top",d-230+"px");dojo.style(b,"left",(a/2+500)+"px")}if(dojo.style(b,"display")=="none"){fadein()}}function die(){fadeout()}function getObjPoint(b){var a=y=0;do{a+=b.offsetLeft||0;y+=b.offsetTop||0;b=b.offsetParent}while(b);return y}function scanAllImage(){var d=dojo.query(".goods_img");var g=d.length;var f=0;var e=getScrollTop()+document.documentElement.clientHeight;var h="";var b="";var a=0;for(f=0;f<g;f++){image=d[f];if(getObjPoint(image)<e){b=dojo.attr(image,"lazyload");h=dojo.attr(image,"src");if(h==""||h==null){dojo.attr(image,"src",b);dojo.attr(image,"lazyload","lazyloading")}else{if(b=="lazyloading"){a=1}}}else{if(getObjPoint(image)<e+700){b=dojo.attr(image,"lazyload");h=dojo.attr(image,"src");if((h==""||h==null)&&a==0){dojo.attr(image,"src",b);dojo.attr(image,"lazyload","preloading")}}}}}function imgRefresh(b){var d=b.src;var a=b.onerror;dojo.removeAttr(b,"src");dojo.attr(b,"src",d);dojo.removeAttr(b,"onerror");dojo.attr(b,"onerror",'this.src="'+cdn+'/static/images/nopic.png"')}function getScrollTop(){var a=0;if(dojo.isWebKit){a=document.body.scrollTop}else{a=document.documentElement.scrollTop}return a}function obeyOrDieInit(){if(dojo.query(".goods_img").length>0){dojo.query(".goods_img").connect("onload",function(a){dojo.attr(a.target,"lazyload","loaded")})}noPika=parseInt(getCookie("nopika"));scanAllImage()}function AddFavorite(b,a){try{window.external.addFavorite(b,a)}catch(d){try{window.sidebar.addPanel(a,b,"")}catch(d){alert("加入收藏失败，请使用Ctrl+D进行添加")}}}function fadein(){var d=0;d=getScrollTop();var b=dojo.byId("fav_gotop_float");dojo.style(b,"display","block");var a=dojo.style(b,"opacity")*10;if(a<10&&d>0){a++;dojo.style(b,"opacity",a/10);setTimeout("fadein()",50)}}function fadeout(){var d=0;d=getScrollTop();var e=dojo.byId("pikaLogin");var b=dojo.byId("fav_gotop_float");var a=parseInt(dojo.style(b,"opacity")*10);if(a>0&&d==0){a--;dojo.style(b,"opacity",a/10);dojo.style(e,"opacity",a/10);setTimeout("fadeout()",50)}else{dojo.style(b,"display","none");dojo.style(e,"display","none")}}function open_close(){if(dojo.byId("fenlei_all_div_id")==null){return}var a=dojo.style("fenlei_all_div_id",a);var b=dojo.byId("fenlei_all_div_id");if(footer_open==true){footer_open=false;dojo.style(b,"height","530px");dojo.removeClass("open_close_id","open_close1");dojo.addClass("open_close_id","open_close2")}else{footer_open=true;dojo.style(b,"height","135px");dojo.removeClass("open_close_id","open_close2");dojo.addClass("open_close_id","open_close1")}}function setCookie(d,f,a,k,e,h){var b=new Date();b.setTime(b.getTime());if(a){a=a*1000*60*60*24}var g=new Date(b.getTime()+(a));document.cookie=d+"="+escape(f)+((a)?";expires="+g.toGMTString():"")+((k)?";path="+k:"")+((e)?";domain="+e:"")+((h)?";secure":"")}function getCookie(b){var a=document.cookie.match(new RegExp("(^| )"+b+"=([^;]*)(;|$)"));if(a!=null){return unescape(a[2])}return null}function delCookie(a){var d=new Date();d.setTime(d.getTime()-1);var b=this.getCookie(a);if(b!=null){document.cookie=a+"="+b+";expires="+d.toGMTString()}}function submenu_page(b){var f=86;var h=1;var k=3;var d=b.target;var e=dojo.byId("sub_view_id"+current_submenu);var a=current_submenu_left;var g=dojo.query("#sub_view_id"+current_submenu+">ul").length;if(dojo.attr(b.target,"id")=="submenu_next"){a-=f*h;if(a<-(g-k)*f){a=-(g-k)*f}}if(dojo.attr(b.target,"id")=="submenu_pre"){a+=f*h;if(a>0){a=0}}current_submenu_left=a;dojo.animateProperty({easing:dojo.fx.easing.backInOut,node:dojo.byId(e),properties:{left:a},duration:300}).play()}function f_link_roll(){var d=dojo.byId("link_roll");var b=dojo.style(d,"top");var a=b-40;if(a<-160){a=-2}dojo.animateProperty({node:d,properties:{top:a},duration:600}).play();setTimeout("f_link_roll()",3000)}function brand_page(b){var f=68;var h=1;var k=4;var d=b.target;var e=dojo.byId("hot_brand_id"+current_submenu);var a=current_brand_left;var g=dojo.query("#hot_brand_id"+current_submenu+">div").length;if(dojo.attr(b.target,"id")=="brand_next"){a-=f*h;if(a<-(g-k)*f){a=-(g-k)*f}}if(dojo.attr(b.target,"id")=="brand_pre"){a+=f*h;if(a>0){a=0}}current_submenu_left=a;dojo.animateProperty({easing:dojo.fx.easing.backInOut,node:dojo.byId(e),properties:{left:a},duration:300}).play()}function color_page(b){var f=10;var h=1;var k=16;var d=b.target;var e=dojo.byId("color_selection");var a=current_color_left;var g=dojo.query("#color_selection>div").length;if(dojo.attr(b.target,"id")=="color_next"){a-=f*h;if(a<-(g-k)*f){a=-(g-k)*f}}if(dojo.attr(b.target,"id")=="color_pre"){a+=f*h;if(a>0){a=0}}current_color_left=a;dojo.animateProperty({easing:dojo.fx.easing.backInOut,node:dojo.byId(e),properties:{top:a},duration:300}).play()}function menu_page(b){var f=20;var h=1;var k=7;var d=b.target;var e=dojo.byId("menu_view");var a=current_menu_left;var g=dojo.query("#menu_view>li").length;if(dojo.attr(b.target,"id")=="menu_next"){a-=f*h;if(a<-(g-k)*f){a=-(g-k)*f}}if(dojo.attr(b.target,"id")=="menu_pre"){a+=f*h;if(a>0){a=0}}current_menu_left=a;dojo.animateProperty({easing:dojo.fx.easing.backInOut,node:dojo.byId(e),properties:{top:a},duration:300}).play()}var bigcolor_url="";function dis_bigcolor(l){var e=l.target;var m=dojo.byId("filter_menu");var a=dojo.attr(e,"name");var d=dojo.byId("bigcolor");var f=dojo.attr(e,"index");var k=dojo.attr(e,"title");var b=dojo.position(e).y;var h=dojo.position(m).y;var g=b-h-6;bigcolor_url=dojo.attr(e,"href")+"?tagid="+dojo.attr(e,"id");dojo.attr(d,"href","#");dojo.attr(d,"class",a);dojo.attr(d,"title",k);dojo.style(d,"top",g+"px");dojo.style(d,"display","block");hide_smallcolor()}function bigcolor_jump(){window.location.href=bigcolor_url}function hide_bigcolor(a){dojo.style("bigcolor","display","none")}function dis_brand(b){var a=b.target;var e=dojo.attr(a,"id");var d=e.substring(0,e.length-4)+"red";hide_brands(e.substring(0,9));dojo.style(a,"display","none");dojo.style(dojo.byId(d),"display","block")}function hide_brands(e){var b=dojo.query(".logoimg_red");for(i=0;i<b.length;i++){var d=dojo.attr(b[i],"id");if(d.substring(0,9)==e){dojo.style(b[i],"display","none")}var d=dojo.attr(b[i],"id");var a=d.substring(0,d.length-3)+"gray";dojo.style(b[i],"display","none");dojo.style(dojo.byId(a),"display","block")}}function hide_brand(d){var b=d.target;var e=dojo.attr(b,"id");var a=e.substring(0,e.length-3)+"gray";dojo.style(b,"display","none");dojo.style(dojo.byId(a),"display","block")}function dis_smallcolor(){var a=dojo.query(".selectedColorSelectBox");if(a.length>0){var b=a[0];dojo.style(b,"width","32px");dojo.style(b,"margin","1px 0 0 9px")}}function hide_smallcolor(){var a=dojo.query(".selectedColorSelectBox");if(a.length>0){var b=a[0];dojo.style(b,"width","48px");dojo.style(b,"margin","1px 0 0 1px")}}var dapeiCommentCurrentPage=1;function createCommentHTML(f,e){var d='<div class="comment_header">';if(f.member==null){a="游客"}else{var a=f.member.alias;if(!a){a="新花粉"}if(e==f.member.id){d+='<span class="comment_delete" onclick="deleteComment('+f.id+')">X</span>'}}d+="</div>";d+='<table class="comment_body" cellspacing=0 cellpadding=0><tr>';var b=f.member==null?"memberdefpic.jpg":f.member.thumbnail;d+='<td class="comment_thumb_container"><img src="'+cdn+"/static/profilepics/"+b+'" alt="'+a+'" class="comment_author_thumb"/></td>';d+='<td><div class="comment_body_text">'+f.comment+"</div></td>";d+='<td><div class="comment_author_container"><div class="comment_author">'+a+"</div><div>"+f.uploadtime.substring(0,16).replace("T"," ")+"</div></div></td>";d+="</tr></table>";return d}function getCommentByProduct(a){dojo.byId("dapei_comment_list").innerHTML="";dojo.style("dapei_comment_loading","display","block");var d={method:"get_item_comment",itemid:currDapeiId,page:a};var b={url:"/comment",handleAs:"json",content:d,load:function(o){dojo.style("dapei_comment_loading","display","none");var l=dojo.byId("dapei_comment_list");var k=o.current_memberid;var h=o.comments;var g,m=h.length;dapeiCommentCurrentPage=o.page;var n=o.total_count;if(n<1){}else{var e=10*(dapeiCommentCurrentPage-1)+1;var f=e+m-1;if(e>1){dojo.style("dapei_comment_prev","display","block")}else{dojo.style("dapei_comment_prev","display","none")}if(f<n){dojo.style("dapei_comment_next","display","block")}else{dojo.style("dapei_comment_next","display","none")}dojo.byId("comment_page_info").innerHTML="第"+e+"-"+f+"/"+n+"条";dojo.style("comment_page_info","display","block");for(g=0;g<m;g++){c=h[g];dojo.create("li",{innerHTML:createCommentHTML(c,k),id:"comment_"+c.id},l,"last")}}},error:function(){},handle:function(){}};dojo.xhrPost(b)}function getCommentByProductPrevious(a){getCommentByProduct(dapeiCommentCurrentPage-1)}function getCommentByProductNext(a){getCommentByProduct(dapeiCommentCurrentPage+1)}function deleteComment(d){if(!confirm("确实要删除这条评论吗？")){return}var a={method:"delete_item_comment",cid:d};var b={url:"/comment",handleAs:"json",content:a,load:function(e){dojo.query("#comment_"+d).orphan()},error:function(){},handle:function(){}};dojo.xhrPost(b)}function submitComment_product(){var a=dojo.byId("product_comment_text").value;if(a==""){alert("请填写评论后再发表");return false}if(a.length>141){alert("评论字数应小于140个。");return false}dojo.byId("comment_did").value=currDapeiId;var b={url:"/comment",handleAs:"json",form:"dapei_comment_form",load:function(d){if(d.status=="need_login"){logdialog.disLogin()}else{if(d.status=="ERROR"&&d.msg=="illegal input"){alert("输入有误，请重新输入!")}else{if(d.comment&&d.comment.member==null){if(d.ipnum=="0"){alert("您现在尚未登录，将使用游客身份发表评论，如果您想管理自己的评论，请注册或登录！")}}}}getCommentByProduct(1)},error:function(){},handle:function(){}};dojo.xhrPost(b);dojo.byId("product_comment_text").value="";return false}function hskaimen(d,a,e){var b=process_pid_url(d,a);newurl=process_hssource_url(b);if(e==0){window.open(newurl)}else{window.location.href=newurl}}function pid_update(d){var a=d.currentTarget;var g=dojo.attr(a,"href");var e=dojo.attr(a,"pid");var b="";if(e==null||e==""){e=dojo.attr(a,"class");if(e==null){e==""}}if(g!=""&&g!=null&&e!=""){var f=process_pid_url(g,e);b=process_hssource_url(f);dojo.attr(a,"href",b)}}function process_hssource_url(b){var a="";var d=window.location.pathname;if(d!=""&&d!=null){if(d=="/"){hssource="home"}else{hssource=(d.split("/")[1]).split(".")[0];if(hssource==""){hssource="all"}}if(b.search(/\?hssource=/)>0||b.search(/&hssource=/)>0||b.search(/javascript/)>=0){a=b}else{if(b.search(/\?/)>0){a=b+"&hssource="+hssource}else{a=b+"?hssource="+hssource}}return a}else{return b}}function process_pid_url(b,d){var a="";if(b.search(/\?tagid=/)>0||b.search(/&tagid=/)>0||b.search(/javascript/)>=0||d==""){a=b}else{if(b.search(/\?/)>0){a=b+"&tagid="+d}else{a=b+"?tagid="+d}}return a}dojo.connect(window,"onscroll","obeyOrDie");dojo.connect(window,"onresize","obeyOrDie");dojo.addOnLoad(function(){obeyOrDieInit()});dojo.addOnLoad(function(){dojo.query("a").connect("onmouseover","pid_update")});dojo.addOnLoad(function(){if(dojo.byId("submenu_next")){dojo.connect(dojo.byId("submenu_next"),"onclick","submenu_page");dojo.connect(dojo.byId("submenu_pre"),"onclick","submenu_page");dojo.connect(dojo.byId("color_next"),"onclick","color_page");dojo.connect(dojo.byId("color_pre"),"onclick","color_page");dojo.query(".colorSelectBox").connect("onmouseover","dis_bigcolor");dojo.query(".selectedColorSelectBox").connect("onmouseover","dis_smallcolor");dojo.query(".selectedColorSelectBox").connect("onmouseout","hide_smallcolor");dojo.query(".logoimg_gray").connect("onmouseover","dis_brand");dojo.query(".logoimg_red").connect("onmouseout","hide_brand");dojo.connect(dojo.byId("bigcolor"),"onmouseout","hide_bigcolor")}});dojo.require("dojo.fx");dojo.require("dojo.fx.easing");function getValue(b,a){var d=null;if(b){d=b.id}for(i=0;i<a;i++){if(i>=20*d&&i<(20*d+20)){document.getElementById("page_"+i).style.display="inline"}else{document.getElementById("page_"+i).style.display="none"}}for(j=0;j<=parseInt(a/20);j++){dojo.removeClass(String(j),"Flip_current");if(j==d){dojo.addClass(String(j),"Flip_current")}}}function getStyle(b,a){b=parseInt(b/20);for(i=0;i<a;i++){if(i>=b*20&&i<(b+1)*20){document.getElementById("page_"+i).style.display="inline"}else{document.getElementById("page_"+i).style.display="none"}}}function getCookie(d){var e=document.cookie.split("; ");for(var b=0;b<e.length;b++){var a=e[b].split("=");if(a[0]==d){return unescape(a[1])}}};
