var href=location.href.split("/"),https=href[0],domain=href[2];function inputBox(a,b){var c='<input type="text" size="1" name="product['+a+']" value=1>';document.getElementById(b+a).innerHTML=c}function modifyQty(a,b,c){a=document.getElementById(b).value;if(c=="add")document.getElementById(b).value=Number(a)+1;else if(a>0)document.getElementById(b).value=Number(a)-1} function sendCookie(a,b){for(var c=document.cookie.split(";"),f=c.length,d=0;d<f;d++){var e=c[d].split("=");if(e[0]==" PHPSESSID"){document.getElementById(b).value=e[1];document.forms[a].submit()}}} window.addEvent("domready",function(){$("recentlyViewed")&&location.href!="http://apothica.com/"&&new pScroll({parentDiv:"recentlyViewed",orientation:"vertical",url:https+"//"+domain+"/p_include/ajax_func.html",viewAllLink:"recentlyViewed.html",title:"Recently Viewed",productHeight:150});$("recentlyViewed2")&&new pScroll({parentDiv:"recentlyViewed2",orientation:"horizontal",url:https+"//"+domain+"/p_include/ajax_func.html",title:"Recently Viewed",viewAllLink:"recentlyViewed.html"});$("alsoViewed")&& new pScroll({parentDiv:"alsoViewed",orientation:"horizontal",url:https+"//"+domain+"/p_include/ajax_func.html",title:"Other Customers Also Viewed",viewAllLink:"alsoViewed.html?pid="+$("alsoViewed").lang,func:"getAlsoViewed&product_id="+$("alsoViewed").lang});$("alsoPurchased")&&new pScroll({parentDiv:"alsoPurchased",orientation:"horizontal",url:https+"//"+domain+"/p_include/ajax_func.html",title:"Other Customers Also Purchased",viewAllLink:"alsoPurchased.html?pid="+$("alsoPurchased").lang,func:"getAlsoPurchased&product_id="+ $("alsoPurchased").lang});$("mediaBuzz")&&new mScroll({parentDiv:"mediaBuzz",orientation:"horizontal",url:https+"/p_include/ajax_func.html",title:"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",numberOfProducts:3,viewAllLink:"mediaBuzz.html",productHeight:80,productWidth:130,func:"getMediaBuzzForProductView&productId="+$("mediaBuzz").lang});$("manufacturerMediaBuzz")&&new mScroll({parentDiv:"manufacturerMediaBuzz",orientation:"horizontal",url:https+"/p_include/ajax_func.html",viewAllLink:"mediaBuzz.html", func:"getMediaBuzzForManufacturerView&manufacturerTemplateId="+$("manufacturerMediaBuzz").lang})});window.onbeforeunload=function(){(new Request({url:https+"//"+domain+"/p_include/ajax_func.html",method:"post",async:false,onComplete:function(){}})).send("func=updatePageUnload")};
