﻿window.ysm_customData = new Object();
window.ysm_customData.conversion = 'transId=,currency=,amount=';
var ysm_accountid  = '19NVC1GJ831SNHQCLV2LRQAT4N0';

function ysm0(locUrl, refUrl, customData) {
   var hashValue = 0; 
   var hashString = ''; 
   var maxValue = 16000000; 
   if(customData != null && typeof(hashString.charCodeAt) == 'function') {
      hashString = customData; 
      if(locUrl != null)hashString += locUrl; 
      if(refUrl != null)hashString += refUrl; 
      for(var i = 0; i < hashString.length; i++) {
         hashValue = 11 * hashValue + hashString.charCodeAt(i); 
         if(hashValue >= maxValue) {
            hashValue = hashValue % maxValue; 
            }
         }
      }
   return hashValue; 
   }
function ysm1(n) {
   var c = document.cookie; 
   var i =- 1; 
   var j = 0; 
   while((i = c.indexOf(n, j)) !=- 1) {
      if(i == 0) {
         break; 
         }
      else if(i > 1 && i < c.length) {
         if(c.charAt(i - 1) == ' ' && c.charAt(i - 2) == ';')break; 
         }
      j = i + 1; 
      }
   if(i ==- 1)return ''; 
   var s = i + n.length; 
   var e = c.indexOf(';', s); 
   if(e ==- 1)e = c.length; 
   return c.substring(s, e); 
   }
function ysm2(o, f, i) {
   if(i > 20)return ''; 
   var e = ''; 
   for(p in o) {
      if(typeof(p) == 'string' && p != null) {
         var x = (f != '' ? f + '.' + p : '.' + p ); 
         if(typeof(o[p]) == 'object' && o[p] != null) {
            e += ysm2(o[p], x, i + 1 ); 
            }
         else if(typeof(o[p]) == 'string' && o[p] != null) {
            e += x + ':' + escape(o[p]) + ';'; 
            }
         }
      }
   return e; 
   }
function ysm3(a, h, i, n, v) {
   var w = window; 
   var d = document; 
   var k = 'ysm_bbk' + a; 
   var ohc = ysm1(k + '='); 
   var c = ysm2(w.ysm_customData, '', 0); 
   if(c.length > 0) {
      var cd = escape(c.toString()); 
      var hc = ysm0(document.location.toString(), document.referrer.toString(), cd); 
      if(hc == 0 || hc != ohc) {
         var t = new Date(); 
         d.ysmBeaconPingImage = new Image(); 
         d.ysmBeaconPingImage.src = '//' + h + i + '?pv=1&cv=1&sn=' + n + '&sv=' + v + '&st=' + t.getTime().toString() + '&ad=' + a + '&cs=' + cd; 
         d.cookie = k + '=' + hc + '; path=/'; 
         }
      }
   }
function ReportYahooConversion() {
	if(typeof(pm_hasScriptRun) == 'undefined') {
	   var pm_hasScriptRun = true; 
	   ysm3(ysm_accountid, 'data.wa.perf.overture.com', '/image/ysmcc.gif', 'ysmcc.js', '1.9');
	   }
   }