
var ck4t_client = {

	tag :	'*',
  classname :	'canoe_hyperklix_text',
  mode : 'zonegraph',
  linked_words : ['quebec concours','cours mastercam','cours solidworks','bromont','baie-comeau','trouver job','radio','paie','technique faune','hebergement web','embauche','hebergement mysql php','data recovery','sociologie','imprimerie','programeur','restauration milieu','technicienne entretien equipement','travail granby','offre emploi','animation','geomatique','administration','hi-fi','opportunite emploi','art','poste temps plein','fournisseur','industrie','t','kinesiologie','reprographie','general public license','tourisme','soudeur','travailler','oracle','website','pme','telecom','comment reparer un pc','protection','cegep st-laurent','qu','tresorerie','power builder','comment reparer son ordinateur','ecole nationale aerotechnique','extranet','virus','tach','acheter dell','marketing en ligne','acheter pc','hebergement','achet','assainissement eau','site','traitement','positionnement site internet','php','geographie','concours','logiciel','parc quebec','programmation web','technique','college edouard-montpetit','portail','histoire','acces','design','enseignement','travail bromont','granby bromont','cours catia','conception site web','nature','laboratoire','trafic','acheter delll','mathematique','television','programme','eau usee','commande num','creation site internet','solution sur mesure','poste permanent','materiel','technique nature','web','technicienne','ingenerie','job','construction aluminium','concours internet','trouver emploi','concours web','cours reparation ordinateurs personnels','pourvoirie','haute vitesse','municipalit','photocopieur','innovation','strategie','genie m','xbox','zec','acheter pc dell','acheter syst','h','recouvrement donn','changement climatique','production web','obtient dell','imprimeur','asp','solidworks','trouver travail','recuperation document','perfectionnement','technicien','technique amenagement','ets','nom de domaine','positionnement','ecole professionnelle metier','c','freeware','remuneration','poste temps partiel','gnu','lcd','hebergeur','host','travail temps partiel','apple','plasma','consultants','psychologie','ftp','traitement eau','remunere','pmp','glacier','aventure','film','usine ecole','reseau','recrutement','pc','connexion','script','comptabilite','langue','programmeurs','marketing','modem','programmation','informatique','technicien niveau','opportunit','solution d\'affaire','gagner des prix','ibm','technicien entretien equipement','dslr slr numerique','college maisonneuve','recuperation fichier','cyn','technologie','emploi estrie','ingenieur','ordinateur','science nature','hosting','licence libre','conception site internet','litt','travail','cegep maisonneuve','gratuit','acheter ordinateurs dell','dep','dao','achat ordinateur','worko','iphone','bandwidth','solo','mandat','partition','ressource naturelle','internet','microsoft','personnel','representant','langage','qualit','plein air','aec','videotron','cours autocad','peche','numerique','wcm','ministere','estrie','machine-outil','acheter ordinateurs personnels dell','recherche travail','donn','r','support clientele','apprentissage','poste temporaire','scripts','hebergeurs','filtration','paye','gagnant','technologie de l\'information','publicitaire','creation site web','biologie animale','agent','courriel','site web','recherche emploi','interactif','projet','html','industriel','d','installer','granby','retrouver fichiers','cours reparation d\'ordinateur','repr','bourse','dslr','qualification','installation','pco','javascript','fao','cr','ornithologie','sql','consultant','agentsolo','formation sur mesure','survie foret','concour','poste','server','temps partiel','telecommunication','emploi temporaire','secr','eau potable','positionnement site web','jde','workopolis','genie','ecole metier','mysql','oriente objet','recherche et d','formation temps plein','anthropologie','pressier','intranet','juridique','programmeur','hebergeur web','conception','comptabilit','travail estrie','cegep edouard-montpetit','java','extreme','gps','operateur','intelligence affaire','carriere','travail temps plein','eau','blackberry','technique milieu naturel','travail payant','choix de carriere','cours maison reparation ordinateur','science','chimie','sans fil','institut technologies information','programation','recherche job','systeme','acheter ordinateurs personnels','centre interpretation','achetez pc','cours','temps plein'],
		
	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?8599199434c806646e383e&src=hyperklix:technofr&lg=fr&charset=cp1252&tag='+this.tag+'&classname='+this.classname+'&filter=techno&nads=2' + '&' + strw ;
		script.type = 'text/javascript';
		script.id = 'loadScript';
		document.body.appendChild(script);
  }
}	

ck4t_client.start();

