function lib_bwcheck(){ //Browsercheck (needed)
 this.ver=navigator.appVersion
 this.agent=navigator.userAgent
 this.dom=document.getElementById?1:0
 this.opera5=this.agent.indexOf("Opera 5")>-1
 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
 this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
 this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
 this.ie=this.ie4||this.ie5||this.ie6
 this.mac=this.agent.indexOf("Mac")>-1
 this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 this.ns4=(document.layers && !this.dom)?1:0;
 this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
 return this
}
var bw=new lib_bwcheck()

 

/***************************************************************************
Pour changer l'apparence, le positionnement modifiez dans la balise
de style divNewsCont. Attention il se peut que ce script ne fonctionne 
pas sous Netscape 4. 
********************************************************************************/

/****
Variables à définir
****/

//Choisissez le type de défilement 
//0 = Fade in - Fade out
//1 = Slide in - Fade out
//2 = Random 
nWorks = 1

//Si vous faites glisser les news vers un emplacement précis modifiez ces paramètres:
nSlidespeed = 4 //Vitesse de défilement en pixel
nNewsheight = 170 //Taille du défilement en pixel

nBetweendelay = 4000 //Délai avant fondu.
nFont = 'arial,helvetiva' //Police.
nFontsize = 11 //Taille de la police en pixel.
nFadespeed = 70 //Vitesse du fondu en milliseconde .

//Choisissez les couleurs dans les transitions, la 1ère est la couleur de l'arrière plan, la dernière est l'état de fin:
//Vous pouvez en choisir autant que vous le souhaitez
nColor=new Array('#FFFFFF', '#EEEEEE','#CCCCCC','#999999','#666666','#333333','#000000')

//Voici l'emplacement des textes, vous pouvez en ajouter autant que vous le désirez 
//link=equivaut au lien sur lequel vous voulez renvoyer
nNews_fr=new Array()
//Copier ces lignes autant que vous en désirez. Pensez à incrémenter en fonction:3,4,5,6 etc...
nNews_fr[0]=new Array()
nNews_fr[0]["text"]="Les immigrants gens d'affaires, qui représentent annuellement environ 10 % de l'immigration québécoise, se répartissent en trois grandes catégories : les investisseurs (80 %), les entrepreneurs (12 %) et les travailleurs autonomes (7 %).<br>Source CCMM"
nNews_fr[0]["link"]="http://www.ccmm.qc.ca/asp/contenu.asp?lang=1&GrSection=3&Rubrique=250&IdMenu=326"

nNews_fr[1]=new Array()
nNews_fr[1]["text"]="Depuis 1986, le programme 'Immigrants investisseurs' a contribué à injecter plus de 5 milliards de dollars dans l'économie québécoise. Plus de 2 200 entreprises réparties dans les 17 régions administratives du Québec ont bénéficié d'un apport financier totalisant 320 millions de dollars (...)<br>Source CCMM"
nNews_fr[1]["link"]="http://www.ccmm.qc.ca/asp/contenu.asp?lang=1&GrSection=3&Rubrique=250&IdMenu=326"

nNews_fr[2]=new Array()
nNews_fr[2]["text"]="En 2001, le revenu d'emploi moyen des Autochtones s'élevait à 19 132 $, soit 36 % de moins que la moyenne nationale de 29 769 $. L'écart était largement attribuable aux différences de facteurs qui influent sur la somme des gains entre les salariés autochtones et les autres salariés. <br>Source : Statistique Canada"
nNews_fr[2]["link"]="http://142.206.72.67/02/02e/02e_008d_f.htm"

nNews_fr[3]=new Array()
nNews_fr[3]["text"]="Environ un Canadien sur cinq, soit entre 19 et 23% de la population, pourrait appartenir &agrave; un groupe de minorit&eacute;s visibles d'ici 2017.<br><small><b>Source : Statistiques Canada</b></small>"
nNews_fr[3]["link"]="http://www.statcan.ca/"

nNews_fr[4]=new Array()
nNews_fr[4]["text"]="Le Gouvernement du Canada prévoit l'affectation de 75 millions de dollars au cours des cinq prochaines années pour améliorer l'intégration, dans le système canadien, de médecins, d'infirmiers et infirmières et d'autres praticiens de la santé formés à l'étranger.<br><Source : Citoyenneté et immigration Canada"
nNews_fr[4]["link"]="http://www.cic.gc.ca/francais/nouvelles/05/0513-f.html"

nNews_fr[5]=new Array()
nNews_fr[5]["text"]="Les principaux pays de naissance des nouveaux citoyens canadiens - la Chine, l'Inde, le Pakistan et les Philippines - figurent tous parmi les principaux pays sources des immigrants venus au Canada ces dernières années.<br>Source : Citoyenneté et immigration Canada"
nNews_fr[5]["link"]="http://www.cic.gc.ca/francais/observateur/issue07/05-citoyennete.html"


/* =========== ENGLAIS ====================*/
nNews_en=new Array()
//Copier ces lignes autant que vous en désirez. Pensez à incrémenter en fonction:3,4,5,6 etc...
nNews_en[0]=new Array()
nNews_en[0]["text"]="Business immigrants, who represent about 10% of Quebec's immigrants each year, are divided into three major categories: investors (80%), entrepreneurs (12%), and self-employed workers (7%). <br>Source CCMM"
nNews_en[0]["link"]="http://www.ccmm.qc.ca/documents/publications/laCite/2004_2005/mai05/laCite_laUne_immigrationAffaires_en.htm"

nNews_en[1]=new Array()
nNews_en[1]["text"]="Since 1986, the Immigrant investors programme has injected more than $5 billion into the Quebec economy. More than 2,200 companies in Quebec's 17 administrative regions have benefited from financial contributions totalling $320 million.<br>Source CCMM"
nNews_en[1]["link"]="http://www.ccmm.qc.ca/documents/publications/laCite/2004_2005/mai05/laCite_laUne_immigrationAffaires_en.htm"

nNews_en[2]=new Array()
nNews_en[2]["text"]="In 2001, average income of Aboriginal people at $19,132 was 36% below the national average of $29,769. This was due in large measure to differences between Aboriginal earners and other earners relating to factors that affect the amount of earnings.<br>Source : Statistiques Canada"
nNews_en[2]["link"]="http://142.206.72.67/02/02e/02e_008d_e.htm"

nNews_en[3]=new Array()
nNews_en[3]["text"]="The Conference Board of Canada estimates that the annual costs of unrecognized learning for visible minorities range between $2.2 billion and $3.4-billion.<br>Source:	Conference Board of Canada"
nNews_en[3]["link"]="http://www.conferenceboard.ca/"

nNews_en[4]=new Array()
nNews_en[4]["text"]="The Government of Canada's plans to help address shortages of health-care professionals by providing $75 million over the next five years to improve the integration of internationally trained doctors, nurses and other health-care professionals into the Canadian system.<br>Source: Citizenship and immigration Canada"
nNews_en[4]["link"]="http://www.cic.gc.ca/english/press/05/0513-e.html"

nNews_en[5]=new Array()
nNews_en[5]["text"]="The top source countries for new Canadian citizens (China, India, Pakistan and the Philippines) were all leading countries of immigrants to Canada in recent years.<br>Source: Citizenship and immigration Canada"
nNews_en[5]["link"]="http://www.cic.gc.ca/english/monitor/issue07/05-citizenship.html"
//par exemple ;-)

/********************************************************************************
Object code...Object constructors and functions...
********************************************************************************/
function makeNewsObj(obj,nest,font,size,color,news,fadespeed,betweendelay,slidespeed,works,newsheight){
    nest=(!nest) ? "":'document.'+nest+'.'
    this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0; 
    this.writeref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj+".document"):0;
 if(font){this.color=new Array(); this.color=eval(color); this.news=new Array(); this.news=eval(news)
  this.font=font; this.size=size; this.speed=fadespeed; this.delay=betweendelay; this.newsheight=newsheight;
  this.fadeIn=b_fadeIn;this.fadeOut=b_fadeOut; this.newsWrite=b_newsWrite; this.y=1
  this.slideIn=b_slideIn; this.moveIt=b_moveIt; this.slideSpeed=slidespeed; this.works=works
  if(bw.dom || bw.ie4){this.css.fontFamily=this.font; this.css.fontSize=this.size; this.css.color=this.color[0]}
 }
 this.obj = obj + "Object";  eval(this.obj + "=this"); return this
}

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x+px; this.css.top=this.y+px;}

function b_newsWrite(num,i){
 if (bw.ns4){
  this.writeref.write("<a href=\""+this.news[num]['link']+"\" target=\"myTarget\" style=\"text-decoration:none; font-size:"+this.size+"px\">"
   +"<font face=\""+this.font+"\" color=\""+this.color[i]+"\">"+this.news[num]['text']+"</font></a>")
  this.writeref.close()
 }else this.writeref.innerHTML = '<a id="'+this.obj+'link' +'" target="myTarget"  style="text-decoration:none; font-size:'+this.size+'px; color:'+this.color[i]+'" href="'+this.news[num]['link']+'">'+this.news[num]['text']+'</a>'
}
//Slide in
function b_slideIn(num,i){
 if (this.y>0){
  if (i==0){this.moveIt(0,this.newsheight); this.newsWrite(num,this.color.length-1)}
  this.moveIt(this.x,this.y-this.slideSpeed)
  i ++
  setTimeout(this.obj+".slideIn("+num+","+i+");",50)
 }else setTimeout(this.obj+".fadeOut("+num+","+(this.color.length-1)+")",this.delay)
}
//The fade functions
function b_fadeIn(num,i){
 if (i<this.color.length){
  if (i==0 || bw.ns4) this.newsWrite(num,i)
  else{
   obj = bw.ie4?eval(this.obj+"link"):document.getElementById(this.obj+"link")
   obj.style.color = this.color[i]
  }
  i ++
  setTimeout(this.obj+".fadeIn("+num+","+i+")",this.speed)
 }else setTimeout(this.obj+".fadeOut("+num+","+(this.color.length-1)+")",this.delay)
}

function b_fadeOut(num,i){
 if (i>=0){
  if (i==0 || bw.ns4) this.newsWrite(num,i) 
  else{
   obj = bw.ie4?eval(this.obj+"link"):document.getElementById(this.obj+"link")
   obj.style.color = this.color[i]
  }
  i --
  setTimeout(this.obj+".fadeOut("+num+","+i+")",this.speed)
 }else{
  num ++
  if(num==this.news.length) num=0
  works = !this.works?0:this.works==1?1:Math.round(Math.random())
  if(works==0) setTimeout(this.obj+".fadeIn("+num+",0)",500)
  else if (works==1){this.y=1; setTimeout(this.obj+".slideIn("+num+",0)",500)
  }
 }
}
/********************************************************************************************
The init function. Calls the object constructor and set some properties and starts the fade
*********************************************************************************************/
function fadeInit(lang){

 oNews = new makeNewsObj('divNews','divNewsCont',nFont,nFontsize,"nColor","nNews_"+lang,nFadespeed,nBetweendelay,nSlidespeed,nWorks,nNewsheight)
 oNewsCont = new makeNewsObj('divNewsCont')
 works = !oNews.works?0:oNews.works==1?1:Math.round(Math.random())
 if (works==0) oNews.fadeIn(0,0)
 else if (works==1) oNews.slideIn(0,0)
 oNewsCont.css.visibility = "visible"
}



//Calls the init function on pageload. 
//if(bw.bw) onload = fadeInit