




<!DOCTYPE html>
<html>
    <head>
        <noscript>
            <meta http-equiv="refresh" content="0;URL='/ctrd/click/newjump2.do?affiliate=66076&subid=thecanalsblog.com&terms=the%20canal%20blog&ai=lXAG6FMeC9Nyau864pE8fJrXvTgk_Y_9pL-xTxv0YkAx1VouGfSAQZXgS-stRHLSWvPWnV2ITpatVw7a1gRtnQrvzDYH-hqJwwluxJaYfsbwXRUbIoKqPa5nURj9EXNeY4Nsq-k5OBVQQQhZd0Cn76B5t9YZol3U3eazgbHXe3QrP-1a9pFHFtPCuHuRNY-A0HcstLCStBITzZ1XQCKqyxBfLwQGuXNVUUMFt2-hs-Upw0jviJjACm2RixE9q42wmNUARaQNPm7TP_T2x-4ZTiGYA4HfVKdQSr5oAjYYAxdGXygeO3Lvck2pZcDiAEaZVqhcAsWuoL5GQU4c0SiELwZ6gEhekP86HRgre3xIRBwvOiw_LTVEtQJS-d-NKST5&tr=I-WDeSHQlJs&version=1.1&njs=1'" />
        </noscript>
        <meta http-equiv="refresh" content="1;URL='/ctrd/click/newjump2.do?affiliate=66076&subid=thecanalsblog.com&terms=the%20canal%20blog&ai=lXAG6FMeC9Nyau864pE8fJrXvTgk_Y_9pL-xTxv0YkAx1VouGfSAQZXgS-stRHLSWvPWnV2ITpatVw7a1gRtnQrvzDYH-hqJwwluxJaYfsbwXRUbIoKqPa5nURj9EXNeY4Nsq-k5OBVQQQhZd0Cn76B5t9YZol3U3eazgbHXe3QrP-1a9pFHFtPCuHuRNY-A0HcstLCStBITzZ1XQCKqyxBfLwQGuXNVUUMFt2-hs-Upw0jviJjACm2RixE9q42wmNUARaQNPm7TP_T2x-4ZTiGYA4HfVKdQSr5oAjYYAxdGXygeO3Lvck2pZcDiAEaZVqhcAsWuoL5GQU4c0SiELwZ6gEhekP86HRgre3xIRBwvOiw_LTVEtQJS-d-NKST5&tr=I-WDeSHQlJs&version=1.1'" /> 
        <script>
            if ("false" == 'true') {
                window.onbeforeunload = function() {
                    return '';
                };
            }
            var loggingEnabled = "false";
            var console = console || {
                "log": function() {}
            }; // IE8 support
            if (loggingEnabled === "false") {
                console = {
                    "log": function() {}
                }; // IE8 support
            }
            if (!Array.isArray) {
                Array.isArray = function(vArg) {
                    return Object.prototype.toString.call(vArg) === "[object Array]";
                };
            } // IE8 support
            function setCookie(cname, exsecs) {
                var d = new Date();
                d.setTime(d.getTime() + (exsecs * 1000));
                var expires = "expires=" + d.toUTCString();
                document.cookie = cname + "=1; " + expires;
            }
            function getCookie(cname) {
                var name = cname + "=";
                var ca = document.cookie.split(';');
                for (var i = 0; i < ca.length; i++) {
                    var c = ca[i];
                    while (c.charAt(0) == ' ')
                        c = c.substring(1);
                    if (c.indexOf(name) == 0)
                        return c.substring(name.length, c.length);
                }
                return "";
            }
            function clicktrackCatcher(json) {
                console.log("json:" + json);
                if (json == null || json.dsxout == null || json.dsxout.results == null || json.dsxout.results.listing == null) {
                    console.log("navigating to bak page using history:");
                    window.history.back();
                } else {
                    if (typeof(JSON) !== 'undefined')
                        console.log(JSON.stringify(json));
                    var listing = json.dsxout.results.listing;
                    console.log("listing:" + listing);
                    if (Array.isArray(json.dsxout.results.listing))
                        listing = json.dsxout.results.listing[0];
                    var listingRedirect = listing.redirect + "&bc=1";
                    console.log("modifiedRedirectUrl::" + listingRedirect);
                    document.location.replace(listingRedirect);
                }
            }
        </script>
        <title>Loading....</title>
    </head>
    <body>
        <script type="text/javascript">
            var waitTime = 250;
            var isTestClick = false;
            console.log("isTestClick:" + isTestClick);
            console.log("waitTime:" + waitTime);
            setTimeout(function() {
                if ("false" == 'true') {
                    window.onbeforeunload = {};
                }
                // new cookie (listId) to control back button Ad
                var listId = "1462294122251_102_445_3061542_1";
                console.log("listId:" + listId);
                var listIdCookie = getCookie(listId);
                console.log("listIdCookie:" + listIdCookie);
                if (listIdCookie === "1" && history.length > 1) {
                    console.log("It was new window! Show new ad");
                    document.cookie = listId + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
                    var aff = "dbinternaltest";
                    var origAff = "66076";
                    //In case of back click subAffiliate contains the original Aff so overriding. 
                    if ("" === "1") {
                        origAff = "thecanalsblog.com";
                    }
                    var product = "";
                    var listId = "1462294122251_102_445_3061542_1";
                    console.log("ListId::" + listId + " backButtonClickAff::" + aff + " origAff::" + origAff + " Product::" + product);
                    var ey = document.createElement('script');
                    ey.type = 'text/javascript';
                    ey.src = "http://www.td553.com" + '/intent/get?callback=clicktrackCatcher&product=' + product + '&Hits_Per_Page=1&b=' + parseInt(Math.random() * 1000000) + '&terms=the+canal+blog&affiliate=' + aff + '&subid=' + origAff + '&output=full&serveurl=' + encodeURIComponent(document.location.href )+ '&adultsearch=false&useJsonArray=true&adultfilter=on&format=json';
                    document.getElementsByTagName('head')[0].appendChild(ey);
                    console.log("Ey::" + ey.src);
                } else { //Either cookie expired or fresh redirection
                    console.log("Cookie doesn't exists!");
                    if (history.length > 1) {
                        if ("" === "1") {
                            console.log("Back Click, so redirecting in new window.")
                            if ("false" !== "true") {
	                        	 console.log("Setting backtracking cookie.")
	                        	 setCookie(listId, 60 * 60); // sixty minutes
                            }else{
                           	 	console.log("Not Setting backtracking cookie hence it is test click.")
                            }
                            document.location.href="/ctrd/click/newjump2.do?affiliate=66076&subid=thecanalsblog.com&terms=the%20canal%20blog&ai=lXAG6FMeC9Nyau864pE8fJrXvTgk_Y_9pL-xTxv0YkAx1VouGfSAQZXgS-stRHLSWvPWnV2ITpatVw7a1gRtnQrvzDYH-hqJwwluxJaYfsbwXRUbIoKqPa5nURj9EXNeY4Nsq-k5OBVQQQhZd0Cn76B5t9YZol3U3eazgbHXe3QrP-1a9pFHFtPCuHuRNY-A0HcstLCStBITzZ1XQCKqyxBfLwQGuXNVUUMFt2-hs-Upw0jviJjACm2RixE9q42wmNUARaQNPm7TP_T2x-4ZTiGYA4HfVKdQSr5oAjYYAxdGXygeO3Lvck2pZcDiAEaZVqhcAsWuoL5GQU4c0SiELwZ6gEhekP86HRgre3xIRBwvOiw_LTVEtQJS-d-NKST5&tr=I-WDeSHQlJs&version=1.1";
                        } else {
                            console.log("Redirecting in same window. No back tracking required")
                            document.location.replace("/ctrd/click/newjump2.do?affiliate=66076&subid=thecanalsblog.com&terms=the%20canal%20blog&ai=lXAG6FMeC9Nyau864pE8fJrXvTgk_Y_9pL-xTxv0YkAx1VouGfSAQZXgS-stRHLSWvPWnV2ITpatVw7a1gRtnQrvzDYH-hqJwwluxJaYfsbwXRUbIoKqPa5nURj9EXNeY4Nsq-k5OBVQQQhZd0Cn76B5t9YZol3U3eazgbHXe3QrP-1a9pFHFtPCuHuRNY-A0HcstLCStBITzZ1XQCKqyxBfLwQGuXNVUUMFt2-hs-Upw0jviJjACm2RixE9q42wmNUARaQNPm7TP_T2x-4ZTiGYA4HfVKdQSr5oAjYYAxdGXygeO3Lvck2pZcDiAEaZVqhcAsWuoL5GQU4c0SiELwZ6gEhekP86HRgre3xIRBwvOiw_LTVEtQJS-d-NKST5&tr=I-WDeSHQlJs&version=1.1");
                        }
                    } else {
                    	 console.log("Redirecting in new window.")
                         if ("false" !== "true") {
                        	 console.log("Setting backtracking cookie.")
                        	 setCookie(listId, 60 * 60); // sixty minutes
                         }else{
                        	 console.log("Not Setting backtracking cookie hence it is test click.")
                         }
                        document.location.href="/ctrd/click/newjump2.do?affiliate=66076&subid=thecanalsblog.com&terms=the%20canal%20blog&ai=lXAG6FMeC9Nyau864pE8fJrXvTgk_Y_9pL-xTxv0YkAx1VouGfSAQZXgS-stRHLSWvPWnV2ITpatVw7a1gRtnQrvzDYH-hqJwwluxJaYfsbwXRUbIoKqPa5nURj9EXNeY4Nsq-k5OBVQQQhZd0Cn76B5t9YZol3U3eazgbHXe3QrP-1a9pFHFtPCuHuRNY-A0HcstLCStBITzZ1XQCKqyxBfLwQGuXNVUUMFt2-hs-Upw0jviJjACm2RixE9q42wmNUARaQNPm7TP_T2x-4ZTiGYA4HfVKdQSr5oAjYYAxdGXygeO3Lvck2pZcDiAEaZVqhcAsWuoL5GQU4c0SiELwZ6gEhekP86HRgre3xIRBwvOiw_LTVEtQJS-d-NKST5&tr=I-WDeSHQlJs&version=1.1";
                    }
                }
            }, waitTime);
        </script>
        
        <img src="http://www.advconversion.com/convtrack/conversion/set.do?affId=66076&subAffiliate=thecanalsblog.com&id=73014&campaignId=98322&adgroupId=560525&aId=1297985&keywordId=0&keyword=the%20canal%20blog&ecnCategoryId=0&ecnSubCategoryId=0&ecnCreativeId=0&listId=1462294122251_102_445_3061542_1&clickIp=sWO3tAP/dTqBZdbOXS%2BfjQ%3D%3D" width=1 height=1 />
        
    </body>
</html>
