﻿
/// <reference path="cookie.js" />

function goCoupon( tracking, type ) {

    var axel = Math.random() + "";
    var num = axel * 1000000000000000000;
    var spotpix = new Image();
    spotpix.src = 'http://fls.doubleclick.net/activityi;src=1651433;type=digrno;cat=fbmcpn;ord=' + num + '?';

    if (tracking != "") {
        Tracking.Action(tracking);
    }

    if (type == "Coupon075") {
        var count = Cookie.get('C075');

        if (count < 2) {
            count++;
            Cookie.set('C075', count, 5000);
        }
    }
    else if (type == "Coupon150") {
        var count = Cookie.get('C150');

        if (count < 2) {
            count++;
            Cookie.set('C150', count, 5000);
        }
    }
}