﻿__events=[];var __xPriceList;Window={Uri:{Referer:function(){return window.location.href},QueryString:{Text:null,Save:function(){var a;a=Window.Uri.Referer().indexOf("?");if(a>-1)Window.Uri.QueryString.Text=Window.Uri.Referer().substring(a+1,Window.Uri.Referer().length);else Window.Uri.QueryString.Text=""},Embbed:function(d,a,c){var b,e;b=a.indexOf("?")>-1?"&":"?";if(""!=Window.Uri.QueryString.Text){a+=b+Window.Uri.QueryString.Text;a=a.indexOf("Ref=")>-1?a:a+"&Ref="+window.location}else a=a.indexOf("?")>-1?a+"&Ref="+window.location:a+"?Ref="+window.location;if(c==true)window.location.href=a;else d.href=a}}},AddEventListnerOnLoad:function(a){__events[__events.length+1]=a},Bind:function(){window.onload=function(){if(__events.length=="undefined")return;for(var index=0;index<__events.length;index++)eval(__events[index])}}};Price={setPrice:function(){if(document.getElementById("CategorPageTitle__"))document.title=document.title+" "+__WebsiteTitle;if(document.getElementById("ProductDetailPageTitle__"))document.title=document.title+" - "+__WebsiteTitle;if(document.getElementById("title__"))document.title=__WebsiteTitle;if(__IWouldLikeToUseATextLogo==true)if(document.getElementById("dvLogo__"))document.getElementById("dvLogo__").innerHTML="<font color="+__LogoTextColor+" size="+__LogoFontSize+">"+__LogoText+"</font>";if(document.getElementById("dvSiteName__"))document.getElementById("dvSiteName__").innerHTML=__WebsiteName;var e,d,m,l,j,h,i=[],f=[],c="dvPrice__",k="dvCompareTo__";d=document.getElementsByTagName("span");e=document.getElementsByTagName("div");for(a=0;a<e.length;a++)if(e[a].id.indexOf(c)>-1){h=e[a].id.indexOf(c)+c.length;j=e[a].id.substring(h,e[a].id.length);i[i.length]=j}else if(e[a].id.indexOf(k)>-1){h=e[a].id.indexOf(k)+k.length;j=e[a].id.substring(h,e[a].id.length);f[f.length]=j}for(a=0;a<d.length;a++)if(d[a].id.indexOf(c)>-1){h=d[a].id.indexOf(c)+c.length;j=d[a].id.substring(h,d[a].id.length);i[i.length]=j}else if(d[a].id.indexOf(k)>-1){h=d[a].id.indexOf(k)+k.length;j=d[a].id.substring(h,d[a].id.length);f[f.length]=j}for(var a=0;a<_Products.length;a++)for(var b=0;b<i.length;b++)if(i[b]==_Products[a].Id){document.getElementById(c+i[b]).innerHTML="$"+_Products[a].Price;priceDivsByName=document.getElementsByName(c+i[b]);for(var g=0;g<priceDivsByName.length;g++)priceDivsByName[g].innerHTML="$"+_Products[a].Price;break}for(var a=0;a<_Products.length;a++)for(var b=0;b<f.length;b++)if(f[b]==_Products[a].Id){document.getElementById(c+f[b]).innerHTML="$"+_Products[a].Price;priceDivsByName=document.getElementsByName(c+f[b]);compareDivsByName=document.getElementsByName(k+f[b]);for(var g=0;g<priceDivsByName.length;g++)priceDivsByName[g].innerHTML="$"+_Products[a].Price;for(var g=0;g<compareDivsByName.length;g++)compareDivsByName[g].innerHTML="$"+_Products[a].CompareTo;break}},youSave:function(a,b){a=document.getElementById(a);a.innerHTML="$"+(Price.Items["Id:"+b][Price.Type["CompareTo"]]-Price.Items["Id:"+b][Price.Type["Price"]]).toFixed(2)}};Window.Uri.QueryString.Save();function SayHello(){__xPriceList="../PriceList.xml"}function CJL_loadXmlDocument(c,b){b(a);var a;if(window.ActiveXObject&&/Win/.test(navigator.userAgent)){a=new ActiveXObject("Microsoft.XMLDOM");a.async=false;a.load(c);b(a);return true}else if(document.implementation&&document.implementation.createDocument){a=document.implementation.createDocument("","",null);a.load(c);a.onload=function(){b(a)};return true}else return false}function writeCookie(c,b,a){document.cookie=c+"="+escape(b)+(typeof a=="date"?"expires="+a.toGMTString():"")}var g_queryString=document.location.search,g_arrVars=g_queryString.split("&");for(var i=0;i<g_arrVars.length;i++){var bits=g_arrVars[i].split("=");bits[0]=bits[0].replace("?","");bits[0]=bits[0].replace("&","");if(bits[0].toUpperCase()=="cmp".toUpperCase())writeCookie("cmp",bits[1],500)}for(var i=0;i<g_arrVars.length;i++){var bits=g_arrVars[i].split("=");bits[0]=bits[0].replace("?","");bits[0]=bits[0].replace("&","");if(bits[0].toUpperCase()=="cpn".toUpperCase())writeCookie("cpn",bits[1],500)}function ReadCookie(b){var a=""+document.cookie,d=a.indexOf(b);if(d==-1||b=="")return "";var c=a.indexOf(";",d);if(c==-1)c=a.length;return unescape(a.substring(d+b.length+1,c))}function updateURL(a){try{onlyURL=a.href.toString().split("?")[0];queryString=a.href.toString().split("?")[1];allParameters=queryString.split("&");for(i=0;i<allParameters.length;i++)if(allParameters[i].split("=")[1].toUpperCase()=="fromJs".toUpperCase()||allParameters[i].split("=")[1].toUpperCase()==""){if(allParameters[i].toUpperCase()=="Ohp=fromJs".toUpperCase())queryString=queryString.replace(allParameters[i],"Ohp="+__Ohp+"");if(allParameters[i].split("=")[0].toUpperCase()=="cmp".toUpperCase())if(ReadCookie("cmp")!="")queryString=queryString.replace(allParameters[i],"cmp="+ReadCookie("cmp")+"");if(allParameters[i].split("=")[0].toUpperCase()=="cpn".toUpperCase())if(ReadCookie("cpn")!="")queryString=queryString.replace(allParameters[i],"cpn="+ReadCookie("cpn")+"");if(allParameters[i].toUpperCase()=="Wsid=fromJs".toUpperCase())queryString=queryString.replace(allParameters[i],"WsId="+__WebsiteID+"")}finalurl=onlyURL+"?"+queryString;a.href=finalurl}catch(b){alert("Following problem occured, something must be wrong with your browser's javascript processing capabilities.\n"+b.toString())}}