var cm_ClientID="90314364";cm_JSFPCookieDomain="diesel-fragrance-factory.com";var CoreCM_CallDefaultTagging=true;var CoreCM_Hosts="diesel-fragrance-factory.com";var CoreCM_PageIdWithGet=true;var CoreCM_Url=document.URL;var CoreCM_PathName=window.location.pathname;CoreCM_Main();function CoreCM_Main(){CoreCM_SetProduction();if(CoreCM_CallDefaultTagging){CoreCM_SetTagging()}}function CoreCM_SetTagging(){if(CoreCM_PathName=="/index.html"||CoreCM_PathName=="/"){cmCreatePageviewTag("HomePage",CoreCM_getCategoryIDFromPath(),null,null)}else{if(CoreCM_Url.indexOf("/news/News.html")!=-1){cmCreatePageviewTag("News",CoreCM_getCategoryIDFromPath(),null,null)}else{if(CoreCM_Url.indexOf("/animations/christmas/2007.html")!=-1){cmCreatePageviewTag("Christmas 2007",CoreCM_getCategoryIDFromPath(),null,null)}else{if(CoreCM_Url.indexOf("/animations/christmas/2008.html")!=-1){cmCreatePageviewTag("Christmas 2008",CoreCM_getCategoryIDFromPath(),null,null)}else{if(CoreCM_Url.indexOf("/catalog/makeup/")!=-1){cmCreatePageviewTag("Category MakeUp",CoreCM_getCategoryIDFromPath(),null,null)}else{if(CoreCM_Url.indexOf("/catalog/skincare/")!=-1){cmCreatePageviewTag("Category SkinCare",CoreCM_getCategoryIDFromPath(),null,null)}else{if(CoreCM_Url.indexOf("/catalog/categoryWithGet.aspx")!=-1){var CatCode=CoreCM_GetCatalogCategoryCodeFromGet("CategoryCode");cmCreatePageviewTag("Category "+CatCode,CatCode,null,null)}else{if(CoreCM_Url.indexOf("/catalog/productWithGet.aspx")!=-1){cmCreateProductviewTag(CoreCM_GetVarFromGet("prdcode"),CoreCM_GetVarFromGet("prdName"),CoreCM_GetCatalogCategoryCodeFromGet("CategoryCode"))}else{if(CoreCM_Url.indexOf("/catalog/productWithDiv.aspx")!=-1){addLoadEvent(function(){cmCreateProductviewTag(CoreCM_GetVarFromDiv("prdcode"),CoreCM_GetVarFromDiv("prdname"),CoreCM_GetVarFromDiv("catcode"))})}else{if(CoreCM_Url.indexOf("/catalog/productWithInputHidden.aspx")!=-1){addLoadEvent(function(){cmCreateProductviewTag(CoreCM_GetVarFromInput("prdcode"),CoreCM_GetVarFromInput("prdname"),CoreCM_GetVarFromInput("catcode"))})}else{if(CoreCM_Url.indexOf("/catalog/productWithTitle.aspx")!=-1){cmCreateProductviewTag(CoreCM_GetVarFromGet("prdcode"),CoreCM_GetVarFromTitle("-"),CoreCM_GetCatalogCategoryCodeFromGet("CategoryCode"))}else{CoreCM_SetDefaultTagging()}}}}}}}}}}}}function CoreCM_SetDefaultTagging(){if(CoreCM_PageIdWithGet){cmCreatePageviewTag(CoreCM_getPageIDWithGet(),CoreCM_getCategoryIDFromPath(),null,null)}else{cmCreatePageviewTag(null,null,null,null)}}function CoreCM_getPageIDWithGet(){var strUrlRacine=window.location.pathname;var strUrlGet=window.location.href;var tempIndex1=strUrlGet.indexOf("?");if(tempIndex1!=-1){strUrlGet=strUrlGet.substr(tempIndex1,strUrlGet.length)}else{strUrlGet=""}var tempIndex2=strUrlGet.indexOf("/");if(tempIndex2!=0){strUrlRacine=strUrlRacine.substr(1,strUrlRacine.length)}return strUrlRacine+strUrlGet}function CoreCM_getCategoryIDFromPath(){var strUrlRacine=window.location.pathname;var tempIndex1=strUrlRacine.lastIndexOf("/");if(tempIndex1!=-1){strUrlRacine=strUrlRacine.substr(0,tempIndex1+1)}return strUrlRacine.replace("ContentManagerData/Sites/aspnet/","")}function CoreCM_GetCatalogCategoryCodeFromGet(nomVariable){var CatalogCategoryCode=CoreCM_GetVarFromGet(nomVariable);var tempIndex1=CatalogCategoryCode.lastIndexOf("^");if(tempIndex1!=-1){CatalogCategoryCode=CatalogCategoryCode.substr(tempIndex1+1,CatalogCategoryCode.length)}if(CatalogCategoryCode==null){CatalogCategoryCode=""}return CatalogCategoryCode}function CoreCM_GetVarFromTitle(separator){var Elem=document.title;if((Elem=="")||(Elem==null)){return""}else{if((separator=="")||(separator==null)){return Elem}else{var tempIndex1=Elem.indexOf(separator);if(tempIndex1!=-1){Elem=Elem.substr(0,tempIndex1)}return CoreCM_TrimAll(Elem)}}}function CoreCM_GetVarFromDiv(nomVariable){var Elem=document.getElementById(nomVariable);if(Elem!=null){Elem=Elem.innerHTML;if(Elem==null){Elem=""}}else{Elem=""}return Elem}function CoreCM_GetVarFromInput(nomVariable){var Elem=document.getElementById(nomVariable);if(Elem!=null){Elem=Elem.value;if(Elem==null){Elem=""}}else{Elem=""}return Elem}function CoreCM_GetVarFromGet(nomVariable){var infos=location.href.substring(location.href.indexOf("?")+1,location.href.length)+"&";if(infos.indexOf("#")!=-1){infos=infos.substring(0,infos.indexOf("#"))+"&"}var variable="";nomVariable=nomVariable+"=";var taille=nomVariable.length;if(infos.indexOf(nomVariable)!=-1){variable=infos.substring(infos.indexOf(nomVariable)+taille,infos.length).substring(0,infos.substring(infos.indexOf(nomVariable)+taille,infos.length).indexOf("&"))}return CoreCM_Decode(variable)}function CoreCM_Decode(tChaine){while(true){var i=tChaine.indexOf("+");if(i<0){break}tChaine=tChaine.substring(0,i)+"%20"+tChaine.substring(i+1,tChaine.length)}return decodeURIComponent(tChaine)}function CoreCM_ValidField(strVal){if((strVal=="")||(strVal==null)){return false}else{if(CoreCM_TrimAll(strVal).length!=0){return true}else{return false}}}function CoreCM_TrimAll(sString){if((sString=="")||(sString==null)){return sString}else{while(sString.substring(0,1)==" "){sString=sString.substring(1,sString.length)}while(sString.substring(sString.length-1,sString.length)==" "){sString=sString.substring(0,sString.length-1)}return sString}}function CoreCM_SetProduction(){var reg=new RegExp("[;]+","g");var tableau=CoreCM_Hosts.split(reg);for(var i=0;i<tableau.length;i++){if(window.location.host.indexOf(tableau[i])!=-1){cmSetProduction()}}}function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!="function"){window.onload=func}else{window.onload=function(){oldonload();func()}}};