
var ck4t_client = {

	tag :	'*',
  classname :	'canoe_hyperklix_text',
  mode : 'zonegraph',
  linked_words : ['plasma','educator\'s aide','robin hood','calgary','rubik','figurine','bratz','star','digital cameras','radio satellite','gift','costco','art','computer services','apparel','pet shop','lithograph','lindsay lohan','scene it','aircanada','zac efron','home theater','halloween','sexy','party','movie theatre','parent','avril lavigne','lego','classic disney vol 3','pentium','playskool','patato head','theatre toronto','narnia','great','television show','dumbo','holiday','thrillers','gadget','lcd','sci fi','floam','london drugs','rental','pirates of the caribbean','mp3 player','perdre du poids','leap frog','games online trade','disney toy','news gossip','boy','transformers','blockbuster','evenflo','serigraph','mp3','puzzle','lastminute','children dvd','recreation','jay-z','cool','pocahontas','matchbox','dvd release','apple','on line','puppets','freeky','computers','ipod shuffle','for children','mattel','superclubs','graco','speaker','entertainment','the incredibles','classic disney volume 1','camera','athlon','horoscope','power ranger','gps car','disney','halloween costumes','barbie','minnie mouse','player','entertainment win','home','sports','kristen stewart','sears','blood','avi','aladdin','dinner','toys','lifestyle','still camera','cell phone','grandmother','school','sudoku','membership','dvd reviews','daughter','home daycare','net flix','dirty dancing','avent','cheap','fun','perfume','dream dazzler','conversion','sun tv','sunwing','card','conquest','relaxation','stand','olympus','download mp3 free','industry','mr. potato','scary','acai','scream','tourist attraction','trivial pursuit','danemark product','health','discovered','ornaments','starflix','8gb','animated movie','beyblade fierce battle','screen','classified','for child','music','discover spot','muppets','west jet','doll corolle','photos','playground','celebrity','rent movie','kid kraft','seasons premiere','food','baby','enjoy','boxes','natalie portman','beauty and the beast','sreen','movie theater','pyjamas','cinderella','entertainment trade','theater','imax movie','bidding','hd','imaginarium','pda','actor','microbreweries','horoscopes','gramco','cinema','winnie the pooh','car audio','zoo','brewery','scrabble','for kid','karaoke machine','camp rock','idea','life style','editorial','style','beer mondial','sony playstation','columnist','cat','weight lost','sweden product','mother','cologne','animals','blowout','accessories','vancouver','dolls','psp','love','event','cube world','design','play','convert','best by','outdoors','bojeux','jewellery','child','coming to disney dvd','the nightmare before christmas','characters','zip drive','literature','star wars','mt tremblant','aging','melody','air','personalized','carnival','free','little pony','accomodation','leonardo dicaprio','royalcaribbean','xbox','source','playstation3','acting','bruno','chapters','porcelain','casio','movie listings','elmo','indigo','cinemaclock','shoes','letters','fire','curtis','beer import','rent','cell phones','hit toy','musical','canon','celebrities','place','him','nikon','top 10 movies','television','notebook computer','spinmaster','son','leapster','nintendo','homework assistance','travel','outaouais','sleeping','doodle','brewer','holiday costumes','recession','monitor','portable electronics','vcr','online','westjet','download music','micron','hola sun','gastronomy','fujitsu','cd','tom cruise','rewarding inscription','feast','elmer','kid dvd','mariah carey','zapf creation','terminator','city place','movie reviews','refurbished','dvd rental','tasting','frugal','fisher price','lcd television','restaurant','first years','fear','zapf','macintosh','business','kid\'s movie','cruise','character','lamaze infant toys','games online win','teddy bear','classic disney vol 2','scariest','royal alexandra toronto','children','yahtzee','sony','lasvegas','disney aladin','rock','family movie','holasun','christmas','ipods','cuba','cult movies','model','gift certificate','nintendo wii','batman','wedding','ticketmaster canada','sitcom','16g','office party','movie trailer','denon','bunny','bid','planet toy','games','brasserie','expedia','entertainment magazines','brand name','tree','horror','hobby','production','hasbro','kate winslet','sculpture','home depot toy','energy juice','show business','dj equipment','mega auction','leapfrog','i pod','3d','cars','bandai','animated classics','marlintravel','online auction','curious george','celebrity news','dating','motorola','entertainer','brad pitt','electronic','her','film','ripper','cityplace','opportunities','live','beerfest','desktops','perez hilton','tyco','hardware','mom','toy story','book','dj','mix','parental assistance','cabbage patch','computer desktops','activity','last minute','miracle juice','royal alexandra theatre toronto','jewelry','chocolat','spongebob','unusual','car installation','wwe','mac','paranormal','paint','handbags','mp3 free','weather','collectible','pokemon','computer','reward','corolle','beer tasting','stockings','new product','news','cuddle','rumors','ibm','radio control','easy bake','concert','berry','shuffle','consumer electronics','life','lifewise','game cube','costume','xmas','fiding nemo','orchestra','happy','gps accessories','star flix','aircanadavacations','pleasure','1g','8g','flavor','tivo','coloring','toronto','epicurean','parenting','ipod','digital player','buzz bee toy','4gb','dinosaur','tonka','tools','babbysitter','laptop','theatre','compaq','husband','sex','robes','latest movies','entertainment fx','custom','gore','16gb','garland','x box360','bruin toy','cheap deals','beer event','first act','halloween ideas','basket','toy','caillou','fast lane','headphone','namco','wii','notebook','the hangover','fragrances','mega','movie showtime','canoe movies','nolitours','game','playmobile','costume ideas','and','a','jungle book','gothic','polly pocket','musical instruments','incredible hulk','blogs','chocolate','circus toy','nokia','samsung','redtag','season finale','canoe411','plush','raise','halloweentown','airfare','wall e','electronics','holidays','toolbox','skirt','cheap auctions','stores','money','montebello','hdtv','mp3 downloads','chris brown','jeux','item','gossip','gps accessory','west palm beach','nano','celebrity rumors','haunted','hard rock','iron man','states','1gb','tv series','unique','u2 bono','homes condos','halloween decorations','disney fairie','romance','boxing day','paris hilton','bono','projectors','singer','real estate','woman','fergie','hannah montana','scotch','boyfriend','send','opportunity','specials','autos','special','vaio','marina travel','imax','megabloks','entertainment trading','videogame','step 2','com','baby alive','antique','cameron diaz','breads','gastronomy fine food','hull ottawa','author','clothing','playmobil','rzone','johnny depp','classics films','ps3','beauty','look younger','digital camera','flowers','feel better','iphone','products','shopping','festival','celebrity gossip','animated film','stick','petshop','gamecube','transatholidays','scary movie','girlfriend','kids','mobile','stocking','carebears','ottawa','florida','vacations','acer','replica','rajeunissant','dad','writing','cabbage','classic disney vol 4','evil','cider','dora','album','mr patato','dining','desktop','classical music','discount disney','contest','top movies','costumes','radio shack','creepy','binoculars','sunquest','cars movie','u2','investment','floride','ontario','dog','microscope','motorsports','decor','star trek','mont tremblant','jessica simpson','robert pattinson','chemistry','cabbage patch kids','ipod video','vhs','opera','dvd online','dvd','little mermaid','cheese','games online bet','transformer','celebrity latest gossip','grandchildren','taylor swift','mondial biere','lcbo','scandal','celebrity pictures','science fiction','lg','desktop computer','romantic','actress','4g','knex','cars the movie','promotion','groceries','video','horse','ticketmaster','visitors','xvid','event montreal','radio','cat construction','poney','cartoon','aniston jennifer','megan fox','adviser','download','signaturevacations','video games','trucks','eat','euphony','breakfast','games online','toy brand','story','gps','ghost','games on line forex','guest list','martini','that\'s so raven','budget','discount','ice age','hifi','royal alexandra theatre','registration crown royal','dr seuss','daycare worker','crayola','ponyo','jack o lantern','children\'s video','games online forex','sampling','disney princess','job','pic','classic disney vol 5','download mp3','hp','gears of war','lite brite','gourmet','auto','tyra banks','birthday','divx','handheld pc','tv schedule','rencontre','32gb','painting','gifts','wildfire','bambi','apple products','jam','las vegas','edu science','rhum','theater toronto','swings','furreal','little','district 9','pet','ps2','beer','bandslam','animated dvd','baby-sitter','calego','online movie','halloween decor','heavy metal','assistance','handmade','eminem','mp3 files','vampire','games online fx','domino','inexpensive','panasonic','cranium','car video','canon toy','rent dvd','cube','picture','buy','tiff','servers','monster','itravel2000','movies','mexico','belairtravel','snow white','touch','dracula','car','care bears','amc','appartment','32g','degustation','box office','return from school','mickey mouse','showbiz','nightmare before christmas','city','ericsson','columnists','cineplex','childcare center','watches','quebec product','george clooney','grand toy','arts','mega blocks','hewlett packard','entertainment forex','nyco','performance','festivities','searstravel','jenna jameson','mixe','show biz','britney spears','appetizers','gift cards','ticketmaster toronto','rent movie online','selloffvacations','kid','animal','sport','sleeping beauty','nativity','toys r us','little tikes','homesandcondos','blackberry','jennifer hudson','lingerie','belair travel','housekeeper','lottery','hiring','father','wife','children\'s movie','disney animation','finding nemo','resume','collection classics','lion king','men','girl','family dvd','relationship','lotteries','caribbean','babies','colouring','wham','dragonball','toddler costumes','fantasia','career','playstation','present','soap opera','vtech','tv listing','amusement','gaming','dvd player','santa','baby einstein','cheetah girls','dora explorer','the last samurai','women','shows','draw','lunch','mp3 download','song','netflix','chronicles of narnia','mp3 music free','gerber','technology','after christmas','signature','yahoo','animation','flaveur biere caprice','temco','work','wrap','usb','blu ray','soldier','disney dvd','ipod nano','private daycare','kidkraft','luxury','movies on dvd','entertainment bet','disney 50th anniversary','cuddling','models','tv','doodle pro','autonet drive','action figures','sales','iomega','attraction','record','disney cars','claus','jobboom','toronto film festival','advisor','jessica alba','parliment','home theater installation','infant','quit','collector','donald duck','plasma television','christina aguilera','energy drink','band','giftware','pc games','moto','hollywood','bakugan','spooky','canadian tire','brew','chicken little','society','horror movie','entertainement','produit','the','registration','cell','birks','canada','united','pony','paparazzi','comment','disney movie','garden','marriage','hot product','madonna','tolly tot','software','pinocchio','cruises','bath','meccano','photo','books','robotic','sleep problems','stuffers','village','apartment','house','mary poppins','classic disney volume','deals','the exorcist','adult costumes','gin','inglourious basterds','zellers','bollywood','live longer','yves rocher','flirt','coldplay','go diego','dora toy','blog','electronic games','definition','webcam','120gb','airtransat','wine','marinatravel','dvd movie','training','dell','birthday partys','monopoly','movie review','toshiba','family','games online trading','collectibles','scanner','dlp','artist','angelina jolie','wrapping','120g','lover','auctions','xbox360','stereo','interactive','pc','recipe','lady gaga','free trial','halloween masks','sexuality','winter','monsters inc','audio','import','home depot','grandfather','specialized professional care','delivery','movie rental','jam showbiz','movie','george of the jungle','toddler','flirting','tv show','aqua doodle','ashley tisdale','freepay','mega bloks','disney 50th anniversary dvd','lilo and stitch'],
		
	loadCSS :	function(file_url)
	{		
	  var css = document.createElement('link');
	  css.rel = 'stylesheet';
	  css.type = 'text/css';
	  css.href = file_url;
	  
	  document.body.appendChild(css);
	},
	
	start :	 function() {
	  var oldonload = window.onload;
	  var self = this;
	  if (typeof (window.onload) != 'function') {
	    window.onload = function(){self._onload.call(self);}
	  }
	  else {
	    window.onload = function(){oldonload(); self._onload.call(self);}	
	  }
	},
	
	_browserHacks : function()
	{	
    if ( this.tag && this.tag != '*' ) {
      if ( window.ActiveXObject ) {
        var tag = this.tag.split(':');
        var prefix = tag[1]? tag[0] :	'canoeklix';
        document.body.innerHTML = '<html xmlns:'+ prefix + '>' + document.body.innerHTML;
	    
        if ( !tag[1] ) {
          var r1 = new RegExp('<'+ this.tag +'>', 'gi');
          var r2 = new RegExp('<\/'+ this.tag +'>', 'gi');
          document.body.innerHTML = document.body.innerHTML.replace(r1, "<canoeklix:"+ this.tag +">").replace(r2, "</canoeklix:"+ this.tag +">");
        }	
        else
          this.tag = tag[1];
      }
      else if ( typeof document.loadBindingDocument == 'function' ) {
        if ( document.getElementsByTagName(this.tag)[0] )
          this.tag = 'body';	
      }
    }
	},
	
	_onload :function()
	{
		this._browserHacks();
	
	  this.loadCSS('http://static.search.canoe.ca/s-ppc/css/hyperklix/default.css');

    var script = document.createElement('script');
    script.src = 'http://static.search.canoe.ca/s-ppc/js/hyperklix/HyperklixParser.js?v2';
    script.type = 'text/javascript';
	
		document.body.appendChild(script);
	},
	
	callback : function()
	{ 
		var parser = new HyperklixParser(this.tag, this.classname);

    if ( this.mode == 'zonegraph' ) {
      parser.findWords(this.linked_words);
    }
    else {
	    parser.parseDocument();
    }

    this.callServer(parser.wordlist);    
	},

  callServer : function(words)
  {
    var strw = '';
    for(var i=0; i < words.length; i++)
      strw += 'ch[' + i + ']=' + words[i] + '&';

    var script = document.createElement('script');
		script.src = 'http://www.canoeklix.com/hyperklix_server?21305733104c806611ce218&src=hyperklix:showbiz&lg=en&charset=cp1252&tag='+this.tag+'&classname='+this.classname+'&filter=showbiz&nads=2' + '&' + strw ;
		script.type = 'text/javascript';
		script.id = 'loadScript';
		document.body.appendChild(script);
  }
}	

ck4t_client.start();

