function sw(a){if(dg(a)){if(dg(a).style.display=="none"){so(a)}else{ho(a)}}}function ho(a){dg(a).style.display="none"}function so(a){dg(a).style.display=""}function dg(a){return document.getElementById(a)}var xmlHttp, d; function aj(n,k,j,m,p,l,c,i,f,o){clearTimeout(d); if(m&&m!=0){dg(j).innerHTML=m}if(p&&l&&p!=0&&l!=0){colorFade(j,"background",p,l,c,1)}try{xmlHttp=new XMLHttpRequest()}catch(h){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(h){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(h){alert("Your browser does not support AJAX!");return false}}}xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){clearTimeout(d);if(i&&f&&i!=0&&f!=0){colorFade(j,"background",i,f,o,1)}dg(j).innerHTML=xmlHttp.responseText}};xmlHttp.open("POST",n,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");xmlHttp.send(k); d=setTimeout('ajaxTimeout("'+n+'", "'+k+'", "'+j+'", "'+isdefined(m)+'", "'+isdefined(p)+'", "'+isdefined(l)+'",'+isdefined(c)+',"'+isdefined(i)+'","'+isdefined(f)+'",'+isdefined(o)+")",15000)}function ajaxTimeout(k,h,f,j,m,i,c,e,d,l){xmlHttp.abort();dg(f).innerHTML+='
زمان انتظار بیشتر از حد معمول شده است، تکرار دستور
'}function isdefined(a){return(typeof(a)==undefined)?a:0}function add_to_cart(a){window.scrollTo(0,0);aj("/shop/_add_to_cart.asp","id="+a,"t",'

loading... چند لحظه... افزودن محصول به سبدخرید

',"ffffff","FFFF99",10,"FFFF99","ffffff",500)}function cart_refresh(){aj("/shop/_wide_cart_refresh.asp","","t")}function colorFade(c,j,d,h,o,f){var k,a,q,i,m,e,p,n,s,e;var l=document.getElementById(c);o=o||20;f=f||20;clearInterval(l.timer);a=colorConv(h);q=a[0];i=a[1];m=a[2];if(!l.r){k=colorConv(d);r=k[0];g=k[1];b=k[2];l.r=r;l.g=g;l.b=b}p=Math.round(Math.abs(l.r-q)/o);n=Math.round(Math.abs(l.g-i)/o);s=Math.round(Math.abs(l.b-m)/o);if(p==0){p=1}if(n==0){n=1}if(s==0){s=1}l.step=1;l.timer=setInterval(function(){animateColor(c,j,o,q,i,m,p,n,s)},f)}function animateColor(c,f,m,o,e,j,n,k,p){var i=document.getElementById(c);var d;if(i.step<=m){var a=i.r;var h=i.g;var l=i.b;if(a>=o){a=a-n}else{a=parseInt(a)+parseInt(n)}if(h>=e){h=h-k}else{h=parseInt(h)+parseInt(k)}if(l>=j){l=l-p}else{l=parseInt(l)+parseInt(p)}d="rgb("+a+","+h+","+l+")";if(f=="background"){i.style.backgroundColor=d}else{if(f=="border"){i.style.borderColor=d}else{i.style.color=d}}i.r=a;i.g=h;i.b=l;i.step=i.step+1}else{clearInterval(i.timer);d="rgb("+o+","+e+","+j+")";if(f=="background"){i.style.backgroundColor=d}else{if(f=="border"){i.style.borderColor=d}else{i.style.color=d}}}}function colorConv(a){var c=[parseInt(a.substring(0,2),16),parseInt(a.substring(2,4),16),parseInt(a.substring(4,6),16)];return c};function addListener(b,c,d,a){a=a||false;if(window.addEventListener){b.addEventListener(c,d,a);return true;}else{if(window.attachEvent){b.attachEvent("on"+c,d);return true;}else{return false;}}}