function getSelectedAttributes(B){var D=new Array();var C=0;for(i=0;i<B.elements.length;i++){var A=B.elements[i].name.substr(0,5);if(A=="spec_"&&(((B.elements[i].type=="radio"||B.elements[i].type=="checkbox")&&B.elements[i].checked)||B.elements[i].tagName=="SELECT")){D[C]=B.elements[i].value;C++}}return D}function signInResponse(B){toggleLoader(false);var A=B.substr(0,1);var C=B.substr(2);if(A==1){document.getElementById("member-zone").innerHTML=C}else{alert(C)}}function gotoPage(A,C,B){Ajax.call("comment.php?act=gotopage","page="+A+"&id="+C+"&type="+B,gotoPageResponse,"GET","JSON")}function gotoPageResponse(A){document.getElementById("ECS_COMMENT").innerHTML=A.content}function getAttr(D){var A=document.getElementsByTagName("tbody");for(i=0;i<A.length;i++){if(A[i].id.substr(0,10)=="goods_type"){A[i].style.display="none"}}var B="goods_type_"+D;try{document.getElementById(B).style.display=""}catch(C){}}function advFormatNumber(C,F){var A=formatNumber(C,F);var B=parseFloat(A);if(C.toString().length>A.length){var H=C.toString().substring(A.length,A.length+1);var D=parseFloat(H);if(D<5){return A}else{var G,I;if(F==0){I=1}else{G="0.";for(var E=1;E<F;E++){G+="0"}G+="1";I=parseFloat(G)}A=formatNumber(B+I,F)}}return A}function formatNumber(A,F){var B,C,D,E;B=A.toString();C=B.indexOf(".");D=B.length;if(F==0){if(C!=-1){B=B.substring(0,C)}}else{if(C==-1){B=B+".";for(E=1;E<=F;E++){B=B+"0"}}else{B=B.substring(0,C+F+1);for(E=D;E<=C+F;E++){B=B+"0"}}}return B}function fixpng(){var I=navigator.appVersion.split("MSIE");var G=parseFloat(I[1]);if((G>=5.5)&&(document.body.filters)){for(var A=0;A<document.images.length;A++){var B=document.images[A];var E=B.src.toUpperCase();if(E.substring(E.length-3,E.length)=="PNG"){var J=(B.id)?"id='"+B.id+"' ":"";var H=(B.className)?"class='"+B.className+"' ":"";var C=(B.title)?"title='"+B.title+"' ":"title='"+B.alt+"' ";var F="display:inline-block;"+B.style.cssText;if(B.align=="left"){F="float:left;"+F}if(B.align=="right"){F="float:right;"+F}if(B.parentElement.href){F="cursor:hand;"+F}var D="<span "+J+H+C+' style="width:'+B.width+"px; height:"+B.height+"px;"+F+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+B.src+"', sizingMethod='scale');\"></span>";B.outerHTML=D;A=A-1}}}}function stringxor(A,G){var B="";var D="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var F=Math.max(A.length,G.length);for(var E=0;E<F;E++){var C=A.charCodeAt(E)^G.charCodeAt(E);B+=D.charAt(C%52)}return B}var evalscripts=new Array();function evalscript(A){if(A.indexOf("<script")==-1){return A}var C=/<script[^\>]*?src=\"([^\>]*?)\"[^\>]*?(reload=\"1\")?(?:charset=\"([\w\-]+?)\")?><\/script>/ig;var B=new Array();while(B=C.exec(A)){appendscript(B[1],"",B[2],B[3])}return A}function $$(A){return document.getElementById(A)}function appendscript(G,B,A,D){var F=hash(G+B);if(!A&&in_array(F,evalscripts)){return}if(A&&$$(F)){$$(F).parentNode.removeChild($$(F))}evalscripts.push(F);var E=document.createElement("script");E.type="text/javascript";E.id=F;try{if(G){E.src=G}else{if(B){E.text=B}}$$("append_parent").appendChild(E)}catch(C){}}function in_array(B,A){if(typeof B=="string"||typeof B=="number"){for(var C in A){if(A[C]==B){return true}}}return false}function docEle(){return document.getElementById(arguments[0])||false}function openSpeDiv(D,I){var J="speDiv";var B="mask";if(docEle(J)){document.removeChild(docEle(J))}if(docEle(B)){document.removeChild(docEle(B))}var K;if(typeof window.pageYOffset!="undefined"){K=window.pageYOffset}else{if(typeof document.compatMode!="undefined"&&document.compatMode!="BackCompat"){K=document.documentElement.scrollTop}else{if(typeof document.body!="undefined"){K=document.body.scrollTop}}}var A=0;var C=document.getElementsByTagName("select");while(C[A]){C[A].style.visibility="hidden";A++}var E=document.createElement("div");E.id=J;E.style.position="absolute";E.style.zIndex="10000";E.style.width="300px";E.style.height="260px";E.style.top=(parseInt(K+200))+"px";E.style.left=(parseInt(document.body.offsetWidth)-200)/2+"px";E.style.overflow="auto";E.style.background="#FFF";E.style.border="3px solid #59B0FF";E.style.padding="5px";E.innerHTML='<h4 style="font-size:14; margin:15 0 0 15;">'+select_spe+"</h4>";for(var G=0;G<D.length;G++){E.innerHTML+='<hr style="color: #EBEBED; height:1px;"><h6 style="text-align:left; background:#ffffff; margin-left:15px;">'+D[G]["name"]+"</h6>";if(D[G]["attr_type"]==1){for(var H=0;H<D[G]["values"].length;H++){E.innerHTML+="<input style='margin-left:15px;' type='radio' name='spec_"+D[G]["attr_id"]+"' value='"+D[G]["values"][H]["id"]+"' id='spec_value_"+D[G]["values"][H]["id"]+"' /><font color=#555555>"+D[G]["values"][H]["label"]+"</font> ["+D[G]["values"][H]["format_price"]+"]</font><br />"}E.innerHTML+="<input type='hidden' name='spec_list' value='"+H+"' />"}else{for(var H=0;H<D[G]["values"].length;H++){E.innerHTML+="<input style='margin-left:15px;' type='checkbox' name='spec_"+D[G]["attr_id"]+"' value='"+D[G]["values"][H]["id"]+"' id='spec_value_"+D[G]["values"][H]["id"]+"' /><font color=#555555>"+D[G]["values"][H]["label"]+" ["+D[G]["values"][H]["format_price"]+"]</font><br />"}E.innerHTML+="<input type='hidden' name='spec_list' value='"+H+"' />"}}E.innerHTML+="<br /><center>[<a href='javascript:submit_div("+I+")' class='f6' >"+btn_buy+"</a>]&nbsp;&nbsp;[<a href='javascript:cancel_div()' class='f6' >"+is_cancel+"</a>]</center>";document.body.appendChild(E);var F=document.createElement("div");F.id=B;F.style.position="absolute";F.style.zIndex="9999";F.style.width=document.body.scrollWidth+"px";F.style.height=document.body.scrollHeight+"px";F.style.top="0px";F.style.left="0px";F.style.background="#FFF";F.style.filter="alpha(opacity=30)";F.style.opacity="0.40";document.body.appendChild(F)}function cancel_div(){document.body.removeChild(docEle("speDiv"));document.body.removeChild(docEle("mask"));var A=0;var B=document.getElementsByTagName("select");while(B[A]){B[A].style.visibility="";A++}};
