/**
 * Google Analytics
 */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1877133-6']);
_gaq.push(['_trackPageview']);

(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();



/**
 * Gets called when the user completes a step in the Flash movie. The stepNumber
 * param is the current step. stepNumber is 1 when the user enters the page,
 * 2 when it gets on the second step, and so on. Currently final step, i.e.
 * successful application is 4.
 */
 
 
 
var infoPas = function (stepNumber) {
    stepNumber = parseInt(stepNumber, 10);
	
	if (stepNumber === 1 && yahooReferer()) {
		_gaq.push(['_trackPageview', '/fotocard/mastercard/pas1_yahoo']);
    }
	
	else if (stepNumber === 2 && yahooReferer()) {
        _gaq.push(['_trackPageview', '/fotocard/mastercard/pas2_yahoo']);
    }
	
	else if (stepNumber === 3 && yahooReferer()) {
        _gaq.push(['_trackPageview', '/fotocard/mastercard/pas3_yahoo']);
    }

    else if (stepNumber === 4 && yahooReferer()) {
		window.location = "http://www.ing.ro/ing/multumiri-fotocard-yahoo.html"

    }
	
	else if (stepNumber === 4 && arboReferer()) {
		window.location = "http://www.ing.ro/ing/multumiri-fotocard-arbomedia-mastercard.html"

    }
	
	else if (stepNumber === 4) {
		window.location = "http://www.ing.ro/ing/multumiri-fotocard.html"

    }
};


var yahooReferer = function () {
    return window.location.href.indexOf("yahoo") > -1;
};

var arboReferer = function () {
    return window.location.href.indexOf("publicis") > -1;
};

var loadIntermediateYahooPixel = function () {
     var src = "http://ads.bluelithium.com/pixel?id=799174&t=2";

     (new Image(1, 1)).src = src;

     var image = document.createElement("img");
     image.src = src;
     image.width = 1;
     image.height = 1;
     document.body.appendChild(image);
};






