if(document.location.href.indexOf("#id=")>0){document.location.href=document.location.href.replace("#","?")}function SetCookie(r,q){var p=new Date();p.setTime(p.getTime()+(365*24*3600*1000));var o=SetCookie.arguments;var n=SetCookie.arguments.length;var m=p;var l='/';var k=null;var j=(n>5)?o[5]:false;document.cookie=r+"="+escape(q)+((m==null)?"":("; expires="+m.toGMTString()))+((l==null)?"":("; path="+l))+((k==null)?"":("; domain="+k))+((j==true)?"; secure":"")}function eraseCookie(name){document.cookie=name+'=;expires=Sun, 1 Jan 1970 00:00:00 UTC';location.reload();}function getCookieVal(d){var c=document.cookie.indexOf(";",d);if(c==-1){c=document.cookie.length}return unescape(document.cookie.substring(d,c))}function GetCookie(f){var e=f+"=";var l=e.length;var k=document.cookie.length;var h=0;while(h<k){var g=h+l;if(document.cookie.substring(h,g)==e){return getCookieVal(g)}h=document.cookie.indexOf(" ",h)+1;if(h==0){break}}return null}function Buy(e){var d=GetCookie("cart");var f=false;if(d==null){SetCookie("cart",e+"j1")}else{x=d.split("i");for(i=0;i<x.length;i++){y=x[i].split("j");if(y[0]==e){f=true;y[1]=parseInt(y[1])+1;x[i]=y[0]+"j"+y[1];break}}if(f){d=x[0];for(i=1;i<x.length;i++){d+="i"+x[i]}SetCookie("cart",d)}else{SetCookie("cart",d+"i"+e+"j1")}}ViewCart()}function ViewCart(){document.location.href="/viewcart.php?"}function ShowCart(){ck=GetCookie("cart")}function checkAffiliate(){var d=document.location.hash;if(d.substr(0,4)=="#id="){var c=d.substr(4);document.location.pathname+="?id="+c}}checkAffiliate();ShowCart();var http=getHttpObject();var ajax_result_function="";var ajax_in_progress=false;if(/Mozilla\/5\.0/.test(navigator.userAgent)){var sendval=false}else{var sendval=null}function ajaxSubmit(a,b,c){if(http==null){return}if(c==null){c=true}ajax_in_progress=true;ajax_result_function=b;http.open("GET",a,c);if(c){http.onreadystatechange=handleHttpResponse}http.send(sendval);if(!c){eval(ajax_result_function+"(http.responseText);");ajax_in_progress=false}}function getHttpObject(d){var c=null;if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{if(window.ActiveXObject){c=new ActiveXObject("Microsoft.XMLHTTP")}}return c}function handleHttpResponse(){if(http.readyState==4){if(ajax_result_function){eval(ajax_result_function+"(http.responseText);")}ajax_in_progress=false}}function friend(){var fe=prompt("Friend's Email Address:","");if(fe!=null){var ye=prompt("Your Email Address:","");if(ye!=null)document.location.href="?fe="+fe+"&ye="+ye;}}

