document.write('<meta name=\"viewport\" content=\"width=device-width; initial-scale=1.0\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://static.ctvnews.ca/bellmedia/common/css/common.css\" />');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/jquery-1.7.js\"></script>');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/jquery.cookie.js\"></script>');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/requireDependency.js\"></script>');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/jquery.polopoly.js\"></script>');
document.write('<script type=\"text/javascript\">');
document.write('var kruxID = \"ImoeZsch\";');
document.write('</script>');
document.write('<!-- END Krux Controltag -->');
document.write('<script>');
document.write('var vhBrand = {};');
document.write('vhBrand.id = \'ctvnews\';');
document.write('vhBrand.destinationCode = \'ctvnews_web\';');
document.write('requiresDependency(\'http://cauth.9c9media.com/auth5/axisAuthApi.js\', function() {});');
document.write('</script>');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://static.ctvnews.ca/bellmedia/common/css/elections.css\" media=\"screen\" />');
document.write('<script type=\"text/javascript\">');
document.write('requiresDependency(\'http://static.ctvnews.ca/bellmedia/common/js/elections.js\', function() {');
document.write('getGainsAndLosses = function(url){');
document.write('$.getJSON(url, function(data) {');
document.write('var parties = data.parties;');
document.write('if(parties != null && parties.length > 0){');
document.write('gainsAndLosses.length = 0;');
document.write('for(var i=0; i<parties.length; i++){');
document.write('var party = parties[i];');
document.write('party.colour = getPartyColour(party.name);');
document.write('gainsAndLosses.push(party);');
document.write('}');
document.write('}');
document.write('// Descending sort');
document.write('gainsAndLosses.sort(function(obj1, obj2){');
document.write('return obj2.seatsTotal - obj1.seatsTotal;');
document.write('});');
document.write('jQuery(\"#dynamicGainsAndLosses\").html(\'\');');
document.write('for ( var i = 0; i < gainsAndLosses.length; i ++ ){');
document.write('var party = gainsAndLosses[i];');
document.write('jQuery(\"#dynamicGainsAndLosses\").append(\'<article class=\"partyResult\">\'');
document.write('+  \'<dl class=\"party\' + party.colour + \' clearfix\">\'');
document.write('+     \'<dt class=\"partyName\">\' + getPartyDisplayName(party.name) +  \'</dt>\'');
document.write('+     \'<span class=\"seatTotal\"><span class=\"totalR\">Total</span><br>\'');
document.write('+     \'<dd class=\"currentResult\">\' + party.seatsTotal + \'</dd></span>\'');
document.write('+     \'<span class=\"eAndl\">\'');
document.write('+     \'<dt>Elected:</dt><dd>\' + party.seatsGained + \'</dd><br/>\'');
document.write('+     \'<dt>Leading:</dt><dd>\' + party.seatsLost + \'</dd>\'');
document.write('+     \'</span>\'');
document.write('+   \'</dl>\'');
document.write('+ \'</article>\');');
document.write('}');
document.write('});');
document.write('};');
document.write('});');
document.write('</script>                    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://static.ctvnews.ca/bellmedia/common/css/jquery.lightbox-0.4.css\" media=\"screen\" />');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/swfobject-2.2.js\" ></script>');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/lightbox/jquery.lightbox-0.4.min.js\" ></script>');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/jquery.validate-1.5.1.min.js\" ></script>');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/membership.js\" ></script>');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://static.ctvnews.ca/bellmedia/ctvnews/css/imageGallery.css\" media=\"screen\" />');
document.write('<!--[if IE 7]>');
document.write('<style>');
document.write('.content-secondary .videoPromoList .teaser .teaserTitle {margin-top: 0}');
document.write('.content-secondary .videoPromoList .teaser .teaserTitle, .content-secondary .videoPromoList .teaser .teaserTitle a {line-height: 1}');
document.write('.onlineExtras .right {float: left; margin-left: 0; width: auto}');
document.write('.onlineExtras .button {padding-right: 0.9em}');
document.write('.onlineExtras .arrow {position: absolute; margin-top: 5px; }');
document.write('.topAd .boxAd p {position: static!important}');
document.write('.fbpluginrecommendationsbarright {display: none!important}');
document.write('.element.time {display: none!important}');
document.write('</style>');
document.write('<![endif]-->                  <script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/detectMobile.js\" ></script>');
document.write('<script type=\"text/javascript\">');
document.write('if(!(window.console && console.log)) {');
document.write('console = {');
document.write('log: function(){},');
document.write('debug: function(){},');
document.write('info: function(){},');
document.write('warn: function(){},');
document.write('error: function(){}');
document.write('};');
document.write('}');
document.write('function outputLog(source, str) {');
document.write('try {');
document.write('if (isDebug) {');
document.write('if (console && console.log) {');
document.write('console.log(\"[ \" + source + \" ]=\" + str);');
document.write('}');
document.write('}');
document.write('} catch (e) {');
document.write('}');
document.write('}');
document.write('</script>');
document.write('<script type=\'text/javascript\'>');
document.write('var googletag = googletag || {};');
document.write('googletag.cmd = googletag.cmd || [];');
document.write('googletag.cmd.push(function() {');
document.write('googletag.pubads().collapseEmptyDivs(true);');
document.write('googletag.enableServices();');
document.write('});');
document.write('</script>              <link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon.png\">');
document.write('<link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon-57x57.png\" sizes=\"57x57\">');
document.write('<link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon-60x60.png\" sizes=\"60x60\">');
document.write('<link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon-72x72.png\" sizes=\"72x72\">');
document.write('<link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon-76x76.png\" sizes=\"76x76\">');
document.write('<link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon-114x114.png\" sizes=\"114x114\">');
document.write('<link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon-120x120.png\" sizes=\"120x120\">');
document.write('<link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon-144x144.png\" sizes=\"144x144\">');
document.write('<link rel=\"apple-touch-icon\" href=\"http://ctvnews.cookieless.ca/bellmedia/ctvnews/img/apple-touch-icon-152x152.png\" sizes=\"152x152\">                  <script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/detectMobile.js\" ></script>');
document.write('<meta name=\"google-site-verification\" content=\"BVIH8PHvX6dLxqFGRrD_T3oVQZfXshe-lIxUeEJ30eM\" />                <link rel=\"apple-touch-icon\" type=\"image/png\" href=\"http://static.ctvnews.ca/bellmedia/ctvnews/img/apple-touch-icon.png\" />');
document.write('<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"http://static.ctvnews.ca/bellmedia/ctvnews/img/apple-touch-icon-72x72.png\" sizes=\"72x72\"/>');
document.write('<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"http://static.ctvnews.ca/bellmedia/ctvnews/img/apple-touch-icon-114x114.png \" sizes=\"114x114\"/>');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://static.ctvnews.ca/bellmedia/common/css/ctvnews_layout.css\" media=\"screen\" />');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/jquery.pinable.js\" ></script>');
document.write('<link rel=\"icon\" type=\"image/ico\" href=\"http://static.ctvnews.ca/bellmedia/common/img/favicon.ico\" sizes=\"16x16\"/>');
document.write('<link rel=\"icon\" type=\"image/ico\" href=\"http://static.ctvnews.ca/bellmedia/common/img/32_ctvnewsfav.ico\" sizes=\"32x32\"/>');
document.write('<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"http://static.ctvnews.ca/bellmedia/common/img/64_ctvnewsfav.ico\" sizes=\"64x64\"/>');
document.write('<!--[if IE 7]>');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://static.ctvnews.ca/bellmedia/common/css/ie_ctvnews.css\" media=\"screen\" />');
document.write('<![endif]-->');
document.write('<meta name=\"msapplication-starturl\" content=\"http://www.ctvnews.ca/?cid=ie9_taskbar_ctvnews\" />');
document.write('<meta name=\"msapplication-tooltip\" content=\"CTV News \u2013 Canada and World News, Breaking News, Headlines, Business, Entertainment, Sports, Health, Politics and more\" />');
document.write('<meta name=\"msapplication-navbutton-color\" content=\"#0183fd\" />');
document.write('<meta name=\"msapplication-task\" content=\"name=CTV News Video Network;action-uri=http://www.ctvnews.ca/video;icon-uri=http://ctvnews.cookieless.ca/bellmedia/common/img/favicon.ico\" />');
document.write('<meta name=\"msapplication-task\" content=\"name=Entertainment;action-uri=http://www.ctvnews.ca/entertainment;icon-uri=http://ctvnews.cookieless.ca/bellmedia/common/img/favicon.ico\" />');
document.write('<meta name=\"msapplication-task\" content=\"name=Canada AM;action-uri=http://canadaam.ctvnews.ca/;icon-uri=http://ctvnews.cookieless.ca/bellmedia/common/img/favicon.ico\" />');
document.write('<meta name=\"msapplication-task\" content=\"name=Canada;action-uri=http://www.ctvnews.ca/canada;icon-uri=http://ctvnews.cookieless.ca/bellmedia/common/img/favicon.ico\" />');
document.write('<meta name=\"msapplication-task\" content=\"name=Health;action-uri=http://www.ctvnews.ca/health/health-headlines;icon-uri=http://ctvnews.cookieless.ca/bellmedia/common/img/favicon.ico\" />');
document.write('<style>');
document.write('.banner .container.twoColumns .col1 {max-width: 532px}');
document.write('.mainnavigation_wrapper {border-top: 0}');
document.write('.thinnav a.logo_ctvnews {background-image: url(\"http://www.ctvnews.ca/polopoly_fs/7.440098!/imageType/image/image.png\"); width: 72px; height: 35px }');
document.write('.thinnav { background-position:0 0; padding-top: 5px; height: 44px}');
document.write('.thinnav .list.element {padding-top: 5px}');
document.write('.links-search div.search.element a.close {top: 7px}');
document.write('.links-search div.search {padding-top: 8px}');
document.write('</style>');
document.write('<!--[if IE 7]>');
document.write('<style>');
document.write('.banner .container.twoColumns .col1 {display: none}');
document.write('.banner .search form {width: auto!important}');
document.write('</style>');
document.write('<![endif]-->                    <!--[if IE 8]>');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://static.ctvnews.ca/bellmedia/common/css/ie8_common.css\" media=\"screen\" />');
document.write('<![endif]-->');
document.write('<script type=\"text/javascript\" src=\"http://static.ctvnews.ca/bellmedia/common/js/mdetect.js\"></script>');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/ctv-styles-7.132\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/ontario2014-7.523345\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/video-bin-column-css-7.489853\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/bandage-rebrand-ctvnews-20130930-7.440100\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/banner-temp-7.298239\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/player-style-7.363763\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/mynews-7.555290\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/budget-css-7.379739\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/the-pope-mini-player-7.377289\" />');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.ctvnews.ca/cmlink/news-7.291979\" />');
document.write('<link href=\"http://static.ctvnews.ca/bellmedia/common/css/responsive_layout.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen, handheld, print, projection\" />');
document.write('<link href=\"http://static.ctvnews.ca/bellmedia/common/css/print.css\" rel=\"stylesheet\" type=\"text/css\" media=\"print\" />');
document.write('<!--[if IE]>');
document.write('<script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script><![endif]-->');
document.write('<!--[if lt IE 9]>');
document.write('<script>');
document.write('document.createElement(\'header\');');
document.write('document.createElement(\'nav\');');
document.write('document.createElement(\'section\');');
document.write('document.createElement(\'article\');');
document.write('document.createElement(\'aside\');');
document.write('document.createElement(\'footer\');');
document.write('document.createElement(\'hgroup\');');
document.write('</script>');
document.write('<![endif]-->');
document.write('<script type=\"text/javascript\">');
document.write('if(!(window.console && console.log)) {');
document.write('console = {');
document.write('log: function(){},');
document.write('debug: function(){},');
document.write('info: function(){},');
document.write('warn: function(){},');
document.write('error: function(){}');
document.write('};');
document.write('}');
document.write('</script>');
document.write('<script>');
document.write('window.Krux||((Krux=function(){Krux.q.push(arguments);}).q=[]);');
document.write('(function(){');
document.write('function retrieve(n){');
document.write('var m, k=\'kx\'+n;');
document.write('if (window.localStorage) {');
document.write('return window.localStorage[k] || \"\";');
document.write('} else if (navigator.cookieEnabled) {');
document.write('m = document.cookie.match(k+\'=([^;]*)\');');
document.write('return (m && unescape(m[1])) || \"\";');
document.write('} else {');
document.write('return \'\';');
document.write('}');
document.write('}');
document.write('Krux.user = retrieve(\'user\');');
document.write('Krux.segments = retrieve(\'segs\') && retrieve(\'segs\').split(\',\') || [];');
document.write('})();');
document.write('</script>');
document.write('<script type=\'text/javascript\'>');
document.write('var googletag = googletag || {};');
document.write('googletag.cmd = googletag.cmd || [];');
document.write('(function() {');
document.write('var gads = document.createElement(\'script\'); gads.async = true; gads.type = \'text/javascript\'; var useSSL = \'https:\' == document.location.protocol; gads.src = (useSSL ? \'https:\' : \'http:\') + \'http://www.ctvnews.ca//www.googletagservices.com/tag/js/gpt.js\';');
document.write('var node = document.getElementsByTagName(\'script\')[0];');
document.write('node.parentNode.insertBefore(gads, node); })();');
document.write('googletag.cmd.push(function() {');
document.write('googletag.defineOutOfPageSlot(\'http://www.ctvnews.ca/5479/ctv.ctvnews/home\',\'div-gpt-ad-outofpage-1-oop\').addService(googletag.pubads()).addService(googletag.companionAds());');
document.write('googletag.pubads().setTargeting(\"keyvalues\",[\"envr=prod\"]);');
document.write('googletag.pubads().collapseEmptyDivs(true);');
document.write('googletag.pubads().setTargeting(\"ksgmnt\", Krux.segments);');
document.write('googletag.pubads().setTargeting(\"u\", Krux.user);');
document.write('googletag.enableServices();');
document.write('});');
document.write('jQuery(document).ready(function(){');
document.write('for(var i=1; i < 3; i++){');
document.write('var idArray = [];');
document.write('var gptDivs = jQuery(\"div[id^=\'div-gpt-ad\']\");');
document.write('gptDivs.each( function(index, value){');
document.write('id = jQuery(this).attr(\"id\");');
document.write('idArray.push(id);');
document.write('});');
document.write('var actionedItems = [];');
document.write('gptDivs.each( function(index, value){');
document.write('var id = jQuery(this).attr(\"id\");');
document.write('//if not found in actionedItems');
document.write('if(jQuery.inArray(id, actionedItems) == -1){');
document.write('var indices = [];');
document.write('var idx = jQuery.inArray(id, idArray);');
document.write('while (idx != -1) {');
document.write('indices.push(idx);');
document.write('idx = jQuery.inArray(id, idArray, idx + 1);');
document.write('}');
document.write('if(indices.length > 1){');
document.write('//assign unique id for each div.');
document.write('var repeatingDivs = jQuery(\"div[id=\"+id+\"]\");');
document.write('var count = 0;');
document.write('repeatingDivs.each( function(index, value){');
document.write('if(count>0){');
document.write('var divId = jQuery(this).attr(\"id\");');
document.write('var uniqueCount = parseInt(divId.charAt(divId.length-1));');
document.write('divId = divId.slice(0, divId.lastIndexOf(\"-\")+1).concat(uniqueCount+1);');
document.write('jQuery(this).attr(\"id\", divId);');
document.write('}');
document.write('count++;');
document.write('});');
document.write('actionedItems.push(id);');
document.write('}');
document.write('}');
document.write('});');
document.write('}');
document.write('});');
document.write('</script>');
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"http://ctvnews.cookieless.ca/bellmedia/common/css/external.css\" />');

