var Mint = new Object();
Mint.save = function() 
{
	var now		= new Date();
	var debug	= false; // this is set by php 
	if (window.location.hash == '#Mint:Debug') { debug = true; };
	var path	= 'http://www.nwkomp.com/mint/?record&key=354e5856333837306b6848377166536c527137323355426b31526c';
	//path 		= path.replace(/^https?:/, window.location.protocol);
  
  // trying a workaround for making it work with differing https domain
  if (window.location.href.match(/shop|xtv8|xtivate|anynas/))
  {
    //path = path.replace(/^http:\/\/www\.nwkomp\.com/, 'https://ssl.kundenserver.de/secure.nwkomp-netzwerk-versand.de/nwkompmed');    
    //path = path.replace(/^http:\/\/www\.nwkomp\.com\/mint/, 'https://shop/de/bounce_mint');
    path = path.replace(/^http:\/\/www\.nwkomp\.com\/mint/, window.location.protocol + '//' + window.location.host + '/de/bounce_mint'); 
  }
	
	// Loop through the different plug-ins to assemble the query string
	for (var developer in this) 
	{
		for (var plugin in this[developer]) 
		{
			if (this[developer][plugin] && this[developer][plugin].onsave) 
			{
				path += this[developer][plugin].onsave();
			};
		};
	};
	// Slap the current time on there to prevent caching on subsequent page views in a few browsers
	path += '&'+now.getTime();
	
	// Redirect to the debug page
	if (debug) { window.open(path+'&debug&errors', 'MintLiveDebug'+now.getTime()); return; };
	
	var ie = /*@cc_on!@*/0;
	if (!ie && document.getElementsByTagName && (document.createElementNS || document.createElement))
	{
		var tag = (document.createElementNS) ? document.createElementNS('http://www.w3.org/1999/xhtml', 'script') : document.createElement('script');
		tag.type = 'text/javascript';
		tag.src = path + '&serve_js';
		document.getElementsByTagName('head')[0].appendChild(tag);
	}
	else if (document.write)
	{
		document.write('<' + 'script type="text/javascript" src="' + path + '&amp;serve_js"><' + '/script>');
	};
};
if (!Mint.SI) { Mint.SI = new Object(); }
Mint.SI.Referrer = 
{
	onsave	: function() 
	{
		var encoded = 0;
		if (typeof Mint_SI_DocumentTitle == 'undefined') { Mint_SI_DocumentTitle = document.title; }
		else { encoded = 1; };
		var referer		= (window.decodeURI)?window.decodeURI(document.referrer):document.referrer;
		var resource	= (window.decodeURI)?window.decodeURI(document.URL):document.URL;
		return '&referer=' + escape(referer) + '&resource=' + escape(resource) + '&resource_title=' + escape(Mint_SI_DocumentTitle) + '&resource_title_encoded=' + encoded;
	}
};
if(!Mint.SS) { Mint.SS = new Object(); }

Mint.SS.Performance = 
{
  onsave : function()
  {
    // Return the conversion value if set.
    // (Query-string-pair)
    
    result = "";
    
    if(typeof mint_conversion_value != "undefined") 
    {
      result += "&mint_conversion_value="+mint_conversion_value;
    }

    if(typeof mint_conversion_id != "undefined")
    {
      result += "&mint_conversion_id="+mint_conversion_id;
    }

    if(typeof mint_product_ids != "undefined")
    {
      result += "&mint_product_ids="+encodeURIComponent(mint_product_ids);
    }

          result += "&MintPerformancePepperIdentifier=f6656e94dbb1cd25fcc0c8067221a926";
    
    
    return result;
  }
};
Mint.save();

