var CA_USItimerID = ''; var CA_properClickThrough = false; var CA_USIdone = false; var void_verify = false; var ca_total_chk = 0; //cart total amount check: ca_total_chk = 0; // checks if customer is logged in via the CUSTOMERID cookie, if its present or not customer_cookie_check = ''; // checks whether traffic is from Affiliate ws_is_affiliate = false; // checks whether traffic is from PPC ws_is_ppc = false; // checks whether traffic is from e-mail ws_is_email = false; // checks whether vovici popup was previously fired vovici_loaded = false; //check whether user has completed checkout checkout_completed = false; window.onunload = function() { organic_traffic = true; ws_enable = false; //visitors who were excluded from CAS conditions if(ws_is_affiliate||ws_is_ppc||ws_is_email) { organic_traffic = false; } //visitors from organic traffic but with no items in their cart if(organic_traffic && ca_total_chk==0) { ws_enable = true; } //visitors that were excluded from CAS conditions and with no items in their cart that leaves if(!organic_traffic && ca_total_chk==0) { ws_enable = true; } //alert('Traffic:\nfrom affiliate:'+ws_is_affiliate+'\nfrom ppc:'+ws_is_ppc+'\nfrom ppc:'+ws_is_email+'\n\norganic traffic:'+organic_traffic+'\nws enable:'+ws_enable+'\nvovici has loaded:'+vovici_loaded+'\nproper clicks:'+CA_properClickThrough+'\nmouse Y axis check:'+yBasedSuppress+'\nalready checkout:'+checkout_completed); if( ws_enable && !vovici_loaded && (!CA_properClickThrough && !yBasedSuppress) && !checkout_completed ) { /* sets the cookie expiration to one day */ today = new Date(); today.setTime( today.getTime() ); expires = 1; expires = expires * 1000 * 60 * 60 * 24; expires_date = new Date( today.getTime() + (expires) ); document.cookie = "vas=true;expires="+expires_date.toGMTString()+";path=/;domain=.partstrain.com"; /* end - set cookie expiration */ ws_window=window.open('https://vovici.com/wsb.dll/s/15241g33809','','width=620,height=600'); } }