function cmSetProduction(){cm_HOST="data.coremetrics.com/eluminate?";}function cmCreateTechPropsTag(pageID,categoryID,pageVersion){if(pageID){var cm=new _cm("tid","6","vn2","e3.1");cm.pc="Y";cm.pi=pageID;if(parent.cm_ref!=null){cm.rf=parent.cm_ref;parent.cm_ref=document.URL;}if(pageVersion){cm.pv1=pageVersion;}if(categoryID){cm.cg=categoryID;}cm.addTP();var mmc_string;if(this.gs_mmc_ven){mmc_string=(window.location.href.indexOf("?")==-1?"?":"&")+"cm_ven="+this.gs_mmc_ven;if(this.gs_mmc_cat){mmc_string+="&cm_cat="+this.gs_mmc_cat;}if(this.gs_mmc_pla){mmc_string+="&cm_pla="+this.gs_mmc_pla;}if(this.gs_mmc_ite){mmc_string+="&cm_ite="+this.gs_mmc_ite;}cm.ul=window.location.href+mmc_string;}cm.writeImg();}}function cmCreatePageviewTag(pageID,searchString,categoryID,pageVersion,searchResults){if(pageID==null){pageID=getDefaultPageID();}var cm=new _cm("tid","1","vn2","e3.1");cm.pi=pageID;if(searchString){cm.se=searchString;}cm.sr = searchResults;if(categoryID){cm.cg=categoryID;}if(pageVersion){cm.pv1=pageVersion;}if(parent.cm_ref!=null){cm.rf=parent.cm_ref;parent.cm_ref=document.URL;}if(this.gs_mmc_ven){mmc_string=(window.location.href.indexOf("?")==-1?"?":"&")+"cm_ven="+this.gs_mmc_ven;if(this.gs_mmc_cat){mmc_string+="&cm_cat="+this.gs_mmc_cat;}if(this.gs_mmc_pla){mmc_string+="&cm_pla="+this.gs_mmc_pla;}if(this.gs_mmc_ite){mmc_string+="&cm_ite="+this.gs_mmc_ite;}cm.ul=window.location.href+mmc_string;}cm.writeImg();}function cmCreateDefaultPageviewTag(){cmCreatePageviewTag(getDefaultPageID(),null,null);}function cmCreateProductviewTag(productID,productName,categoryID,pageVersion){var cm=new _cm("tid","5","vn2","e3.1");if(productName==null){productName="";}if(parent.cm_ref!=null){cm.rf=parent.cm_ref;parent.cm_ref=document.URL;}cm.pr=productID;cm.pm=productName;cm.cg=categoryID;cm.pc="Y";cm.pi="PRODUCT: "+productName+" ("+productID+")";if(pageVersion){cm.pv1=pageVersion;}if(this.gs_mmc_ven){mmc_string=(window.location.href.indexOf("?")==-1?"?":"&")+"cm_ven="+this.gs_mmc_ven;if(this.gs_mmc_cat){mmc_string+="&cm_cat="+this.gs_mmc_cat;}if(this.gs_mmc_pla){mmc_string+="&cm_pla="+this.gs_mmc_pla;}if(this.gs_mmc_ite){mmc_string+="&cm_ite="+this.gs_mmc_ite;}cm.ul=window.location.href+mmc_string;}cm.writeImg();}var cmShopProducts=new Array();var cmShopIds=new Array();var cmShopCats=new Array();var cmShopQtys=new Array();var cmShopPrices=new Array();var cmShopSKUs=new Array();var cmShopCounter=0;var cmShopOrderIds=new Array();var cmShopCustomerIds=new Array();var cmShopOrderPrices=new Array();var cmShopAttrib1=new Array();var cmShopAttrib2=new Array();var cmShopAttrib3=new Array();var cmShopAttrib4=new Array();function cmGetProductIndex(id){var i=0;for(i=0;i<cmShopCounter;i++){if(id==cmShopIds[i]){return i;}}return-1;}function cmCreateShopAction5Tag(productID,productName,productQuantity,productPrice,categoryID,attr1,attr2,attr3,attr4){var index=cmGetProductIndex(productID);if(index!=-1){var oldPrice=cmShopPrices[index];var oldQty=cmShopQtys[index];var newQty=oldQty+parseInt(productQuantity);var newPrice=(oldPrice*oldQty+parseInt(productQuantity)*parseFloat(productPrice))/(newQty);cmShopPrices[index]=newPrice;cmShopQtys[index]=newQty;cmShopAttrib1[index]=attr1;cmShopAttrib2[index]=attr2;cmShopAttrib3[index]=attr3;cmShopAttrib4[index]=attr4;}else{if(!categoryID){categoryID="";}cmShopProducts[cmShopCounter]=productName;cmShopIds[cmShopCounter]=productID;cmShopCats[cmShopCounter]=categoryID;cmShopQtys[cmShopCounter]=parseInt(productQuantity);cmShopPrices[cmShopCounter]=parseFloat(productPrice);cmShopAttrib1[cmShopCounter]=attr1;cmShopAttrib2[cmShopCounter]=attr2;cmShopAttrib3[cmShopCounter]=attr3;cmShopAttrib4[cmShopCounter]=attr4;cmShopCounter++;}}function cmDisplayShop5s(){var i;for(i=0;i<cmShopCounter;i++){var cm=new _cm("tid","4","vn2","e3.1");cm.at="5";cm.pr=cmShopIds[i];cm.pm=cmShopProducts[i];cm.cg=cmShopCats[i];cm.qt=cmShopQtys[i];cm.bp=cmShopPrices[i];cm.sx1=cmShopAttrib1[i];cm.sx2=cmShopAttrib2[i];cm.sx3=cmShopAttrib3[i];cm.sx4=cmShopAttrib4[i];cm.pc="N";cm.writeImg();}cmShopCounter=0;}function cmCreateShopAction9Tag(productID,productName,productQuantity,productPrice,customerID,orderID,orderTotal,categoryID,attr1,attr2,attr3,attr4){var index=cmGetProductIndex(productID);if(index!=-1){var oldPrice=cmShopPrices[index];var oldQty=cmShopQtys[index];var newQty=oldQty+parseInt(productQuantity);var newPrice=(oldPrice*oldQty+parseInt(productQuantity)*parseFloat(productPrice))/(newQty);cmShopPrices[index]=newPrice;cmShopQtys[index]=newQty;cmShopSKUs[index]="|"+productID+"|"+newPrice+"|"+newQty+"|";cmShopAttrib1[index]=attr1;cmShopAttrib2[index]=attr2;cmShopAttrib3[index]=attr3;cmShopAttrib4[index]=attr4;}else{if(!categoryID){categoryID="";}cmShopProducts[cmShopCounter]=productName;cmShopIds[cmShopCounter]=productID;cmShopOrderIds[cmShopCounter]=orderID;cmShopOrderPrices[cmShopCounter]=orderTotal;cmShopCustomerIds[cmShopCounter]=customerID;cmShopCats[cmShopCounter]=categoryID;cmShopQtys[cmShopCounter]=parseInt(productQuantity);cmShopPrices[cmShopCounter]=parseFloat(productPrice);cmShopSKUs[cmShopCounter]="|"+productID+"|"+productPrice+"|"+productQuantity+"|";cmShopAttrib1[cmShopCounter]=attr1;cmShopAttrib2[cmShopCounter]=attr2;cmShopAttrib3[cmShopCounter]=attr3;cmShopAttrib4[cmShopCounter]=attr4;cmShopCounter++;}}function cmDisplayShop9s(){var i;for(i=0;i<cmShopCounter;i++){var cm=new _cm("tid","4","vn2","e3.1");cm.at="9";cm.pr=cmShopIds[i];cm.pm=cmShopProducts[i];cm.cg=cmShopCats[i];cm.qt=cmShopQtys[i];cm.bp=cmShopPrices[i];cm.cd=cmShopCustomerIds[i];cm.on=cmShopOrderIds[i];cm.tr=cmShopOrderPrices[i];cm.sx1=cmShopAttrib1[i];cm.sx2=cmShopAttrib2[i];cm.sx3=cmShopAttrib3[i];cm.sx4=cmShopAttrib4[i];cm.pc="N";cm.writeImg();}cmShopCounter=0;}function cmCreateOrderTag(orderID,orderTotal,orderShipping,customerID,customerCity,customerState,customerZIP,orderTax,discount){if(orderID&&orderTotal&&orderShipping&&customerID){var cm=new _cm("tid","3","vn2","e3.1");cm.on=orderID;cm.tr=orderTotal;cm.osk=getOSK();cm.sg=orderShipping;cm.cd=customerID;cm.sa=customerState;cm.ct=customerCity;cm.zp=customerZIP;cm.or1=orderTax;cm.or2=discount;cm.writeImg();}}function getOSK(){var i=0;var result="";for(i=0;i<cmShopCounter;i++){result+=cmShopSKUs[i];}return result;}function cmCreateRegistrationTag(customerID,customerEmail,customerCity,customerState,customerZIP,newsletterName,subscribe){var cm=new _cm("tid","2","vn2","e3.1");cm.cd=customerID;cm.em=customerEmail;cm.sa=customerState;cm.ct=customerCity;cm.zp=customerZIP;if(newsletterName&&subscribe){cm.nl=newsletterName;cm.sd=subscribe;}cm.writeImg();}function cmCreateErrorTag(){var cm=new _cm("tid","404","vn2","e3.1");if(parent.cm_ref!=null){cm.rf=parent.cm_ref;parent.cm_ref=document.URL;}cm.pc="Y";cm.pi=getDefaultPageID();cm.writeImg();}function getDefaultPageID(){var pageName=window.location.pathname;var tempIndex1=pageName.indexOf("?");if(tempIndex1!=-1){pageName=pageName.substr(0,tempIndex1);}var tempIndex2=pageName.indexOf("#");if(tempIndex2!=-1){pageName=pageName.substr(0,tempIndex2);}var tempIndex3=pageName.indexOf(";");if(tempIndex3!=-1){pageName=pageName.substr(0,tempIndex3);}var slashPos=pageName.lastIndexOf("/");if(slashPos==pageName.length-1){pageName=pageName+"default.asp";}while(pageName.indexOf("/")==0){pageName=pageName.substr(1,pageName.length);}return(pageName);}if(defaultNormalize==null){var defaultNormalize=null;}function myNormalizeURL(url,isHref){var newURL=url;var blackList=["O=","I=","Sourceid=","Rdr-1="];var paramString;var paramIndex=newURL.indexOf("?");var params;var keepParams=new Array();var goodParam;if(paramIndex>0){paramString=newURL.substring(paramIndex+1);newURL=newURL.substring(0,paramIndex);params=paramString.split("&");for(var i=0;i<params.length;i++){goodParam=true;for(var j=0;j<blackList.length;j++){if(params[i].indexOf(blackList[j])==0){goodParam=false;}}if(goodParam==true){keepParams[keepParams.length]=params[i];}}newURL+="?"+keepParams.join("&");}if(defaultNormalize!=null){newURL=defaultNormalize(newURL,isHref);}return newURL;}if(document.cmTagCtl!=null){var func=""+document.cmTagCtl.normalizeURL;if(func.indexOf('myNormalizeURL')==-1){defaultNormalize=document.cmTagCtl.normalizeURL;document.cmTagCtl.normalizeURL=myNormalizeURL;}}
function cmSafeFormSubmit(id) {

            CI();
            cO(id,"S");
            CA(1);
            CJ(1);
            CE();

			return true;
}

function cP(e){

            CI();
            if (typeof e == typeof e123_x) {
                        var e = this;
            }
            else {
                        var e=CG(e);
            }
            cO(e?e.cM1:-1,"S");
            CA(1);
            CJ(1);
            CE();
}

