<!--
//Jean-Claude BELLAMY © 2004
nbLang=2;
var langue=new Array(nbLang);
var language=new Array(nbLang);
var strlang=new Array(nbLang);
var modifle=new Array(nbLang);
mois=new Array(nbLang);
mois[0]=new Array(12);
mois[1]=new Array(12);

mois[0][1]="janvier";
mois[0][2]="février";
mois[0][3]="mars";
mois[0][4]="avril";
mois[0][5]="mai";
mois[0][6]="juin";
mois[0][7]="juillet";
mois[0][8]="août";
mois[0][9]="septembre";
mois[0][10]="octobre";
mois[0][11]="novembre";
mois[0][12]="décembre";

mois[1][1]="january";
mois[1][2]="february";
mois[1][3]="march";
mois[1][4]="april";
mois[1][5]="may";
mois[1][6]="june";
mois[1][7]="july";
mois[1][8]="august";
mois[1][9]="september";
mois[1][10]="october";
mois[1][11]="november";
mois[1][12]="december";

langue[0]="fr";
langue[1]="en";
language[0]="français";
language[1]="english";
strlang[0]="langue";
strlang[1]="language";
modifle[0]="modifié le ";
modifle[1]="modified ";

local=false;
Curdir=getCurdir();
var libPage="";

function getLang() {
var curlang,numlang;
curlang=getCookie("lang");
if (curlang=="") {
	curlang="fr";
	newCookie("lang",curlang);}
if (curlang=="fr")
	{numlang=0;}
else {numlang=1;}
return numlang;
}

function setLang(num){
newCookie("lang",langue[num]);
document.location.reload(true);
}

function getRandom(n) {
k=Math.round(Math.random()*n)+1;
if (k>=n) {k=n-1;}
   return(k) }

function cadrage(n) {
   if (n<10) { return("0"+n); }
   else {return(n);}
} 

function getDateLang(alang,adate,heure) {
date=new Date(adate);
dd=date.getDate();
mm=eval(1+date.getMonth());
if (mm<10){mm='0'+mm;}
yy=date.getFullYear();
//if (alang=='fr') {d=dd+" "+mois[0][mm]+" "+yy;}
//else             {d=mois[1][mm]+" "+dd+" "+yy;} 
if (alang==0) {d=dd+"/"+mm+"/"+yy;}
else          {d=mm+"/"+dd+"/"+yy;} 
h="";
if (heure==1) {h=" "+cadrage(date.getHours())+":"+cadrage(date.getMinutes())+":"+cadrage(date.getSeconds())}
return(d+h);
}

//Création ou réaffectation d'un cookie
//dateExp est une chaine date d'expiration du cookie 
function newCookie(name,value) {
aujourdhui=new Date();
ty=aujourdhui.getFullYear()+1; //un an plus tard
tm=aujourdhui.getMonth();
td=aujourdhui.getDate();
nextday=new Date(ty,tm,td);
oldday=new Date(1970,1,1);
path="/";
if (value=="")	
	{dateExp=oldday.toGMTString();}
else
	{dateExp=nextday.toGMTString();}
p=name.indexOf('/');
if (p !=-1)	// Présence d'un chemin dans le nom du cookie
	{
	 path="/"+name.substring(0,p);
	 name=name.substring(p+1);
	}
if (p==0) {varpath="";}
else {varpath="; path="+path;}
nc=name+"="+escape(value)+varpath+"; expires="+dateExp;
document.cookie=nc;
}

function getCookie(Name) {
var search = Name + "=";
var cookie="";
if (document.cookie.length > 0) {// if there are any cookies
	offset = document.cookie.indexOf(search);       
	if (offset != -1) { // if cookie exists
		offset += search.length  // set index of beginning of value         
		end = document.cookie.indexOf(";", offset)  // set index of end of cookie value
		if (end == -1) end = document.cookie.length;
		cookie=unescape(document.cookie.substring(offset, end));
		}
	}
return(cookie);
}

function getAllCookies() {
var debut=0;
var ch=document.cookie;
var fin=ch.length;
var debut=0;
var lastcookie=getCookie("lastcookie");
var allCook="<UL>";
var courant="";
var select=false;
while (debut<fin) {
   pv=ch.indexOf(";",debut);
   if (pv<debut) {pv=fin;}
   courant=unescape(ch.substring(debut,pv));
   if (courant.indexOf("lastcookie",0)<0) {
      allCook=allCook+"<LI>";
      pl=courant.indexOf(lastcookie,0);
      select=((lastcookie.length>1)&&(pl>=0));
      if (select) {allCook=allCook+"<b>";}
      allCook=allCook+courant;
      if (select) {allCook=allCook+"</b>";}
      }
   debut=pv+1;
   }
allCook=allCook+"</UL>";
return(allCook);
}

function stocker(form) {
var nomcookie=form.nomcookie.value;
var phrase=form.phrase.value;
if (nomcookie.length==0) {
   alert("Vous n'avez pas tapé de nom de cookie !");
   }
else {
   newCookie(nomcookie,phrase);
   newCookie("lastcookie",nomcookie+"="+phrase);
   document.location.reload(true);
   }
}

function KBsearch(chaine){
first=chaine.charAt(0);
if (first.toUpperCase()=="Q") {n=1;} else {n=0;}
chaine=chaine.substring(n);
finalchaine="http://support.microsoft.com/?id="+chaine;
window.open(finalchaine,"newwindow");	
}

function setParam(param,value){
var URL,index;
if (value=='get'){
	value=document.recherche.search.value;
	for (index=0;index<document.recherche.moteur.length;index++) {
		if (document.recherche.moteur[index].checked){
			moteur=document.recherche.moteur[index].value;
			break;
			}
		}
	newCookie('moteur',moteur);			
	}
newCookie(param,value);
if (param!='lang') {window.location.reload(true);}
}

function go(mapURL,wName) {
window.name="parent";
window.open(mapURL,wName,'scrollbars=yes,resizable=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,width=600,height=350');
}

function replaceSpecialCar(URL,oldcar,newcar) {
var lURL,newURL,j,car;
lURL=URL.length;
newURL="";
for (j=0;j<lURL;j++) {
	car=URL.charAt(j);
	if (car==oldcar) {car=newcar;}
	newURL=newURL+car;
	}
return(newURL);
}

function getCurdir() {
var root,prot,p1,p2,p,URLdoc,URLhref,curlang;
//Test si ouverture en local
prot=document.location.protocol;
local=(prot.indexOf("file",0)>=0);
URLhref=document.location.href;
//Remplacement des "\" par des "/" sous IE en local
if (local) {URLhref=replaceSpecialCar(URLhref,"\\","/");}
//Par défaut, le répertoire courant est ".."
root="..";
p1=URLhref.indexOf("/fr/",0);
p2=URLhref.indexOf("/en/",0);
lang="fr";
if (p1>=0) {p=p1;}
else {
	if (p2>=0) {
		p=p2;
		lang="en";}
	else {
		root="";
		p=URLhref.lastIndexOf("/");
		}
	}
if (local){root=URLhref.substring(0,p);}
curlang=getCookie("lang");
if (curlang=="") {newCookie("lang",lang);}
return root;
}


function addbookmark(bookmarkurl,bookmarktitle){
if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

function displayHeader(isTech,isWin) {
	var i,curlang,dlm,lastmodif,URLhref,libelle,p,infos,msg;
	curlang=getCookie("lang");
	document.writeln('<div id="main">');
	document.writeln('<table border="0"><tr><td>&nbsp;</td></tr><tr>');
	i=0;
	if (isWin) {
		document.writeln('<td><a href="http://mvp.support.microsoft.com" target="_blank">');
		document.writeln('<img border=0 src="'+Curdir+'/gif/logoMVP.png"></a></td>');
		}
	document.writeln('<td valign="center" class="titre">'+document.title+'</td>');
	curhost=document.location.host.toLowerCase();
	if ((curhost!="www.bellamyjc.org") || (local)) {
		if (curlang=="fr") {msg="Miroir de ce document à l'adresse";}
		else {msg="Document mirror at address";}
		if (local) {
			URL=replaceSpecialCar(document.location.href,"\\","/");
			URL=URL.substring(Curdir.length);}
		else {URL=document.location.pathname+document.location.hash;}
		newAddress="http://www.bellamyjc.org"+URL;
		document.writeln('<td valign="bottom">'+msg+' :<br><a href="'+newAddress+'">'+newAddress+'</a></td>');
		}	
	document.writeln('</tr></table>');
	if (local) {
		if (curlang=="en") {msg="(site local browsing. Some downloading links may be absent)";}
		else {msg="(consultation locale du site. Certains liens de téléchargement peuvent être absents )";}
		infos='<br><br><center><span class="infosphp">'+msg+'</span></center><hr>';
		}
	else {
		infos='<script language="Javascript" src="'+Curdir+'/infos2js.php"></script>';			
		}
	if (!local && isWin)
		{
        if (curhost=="www.bellamyjc.org")
			{	 
 			 id1="83962a85-a859-4e17-9d9d-abe492190f09";	 
			 id2="f38e0bf4-61e4-453a-ae10-d2bd715cb47a";
			 id3="5b21b82b-3476-4c0d-a9c5-e0e895e7ffdb";	 
			 id4="";
			 id5="ed9e8ccd-1dbd-4d03-89e8-19b268d70f8e";
			}
		else
			{
  			 id1="d936390b-7b69-4a68-8c2f-53b0f681e76f";	 
			 id2="eba40655-eacd-4adc-b1eb-b69435da5095";
			 id3="0f444480-b5da-4dbf-8920-8dd08d941cf8"; 
			 id4="";
			 id5="c255df46-9fc7-489c-bcb7-0f7e8bc1b42b";
 			 }      
		img1="http://tracker.comscamp.com/Banner.ashx?Id=1765_71";
		//
		img2="http://tracker.comscamp.com/Banner.ashx?Id=1778_71";
		//
		img3="http://tracker.comscamp.com/Banner.ashx?Id=1790_71";	
		//
		img4="";
		//
		img5="http://tracker.comscamp.com/Banner.ashx?Id=1772_71";

		alt1="Les Techdays sont de retour en 2012";
		alt2="Internet Explorer 9 présente le World Wide Web d'Omar et Fred.";
		alt3="Téléchargez le SDK de Windows Azure !";
		alt4="";
		alt5="Testez gratuitement Windows Azure pendant 90 jours !";

		document.write('<table><tr>');

		document.write('<td><a href="http://www.comscamp.com/Tracker/Redirect.ashx?linkid='+id1+'" target="_blank">');
		document.write('<img border=1 src="'+img1+'" alt="'+alt1+'"></a>');
		document.write('</td>'); 

		document.write('<td><a href="http://www.comscamp.com/Tracker/Redirect.ashx?linkid='+id2+'" target="_blank">'); 
		document.write('<img border=1 src="'+img2+'" alt="'+alt2+'"></a>');
		document.write('</td>'); 
		
		document.write('<td><a href="http://www.comscamp.com/Tracker/Redirect.ashx?linkid='+id3+'" target="_blank">'); 
		document.write('<img border=1 src="'+img3+'" alt="'+alt3+'"></a>');
		document.write('</td>'); 
		
//		document.write('<td><a href="http://www.comscamp.com/Tracker/Redirect.ashx?linkid='+id4+'" target="_blank">'); 
//		document.write('<img border=1 src="'+img4+'" alt="'+alt4+'"></a>');
//		document.write('</td>');
		
		document.write('<td><a href="http://www.comscamp.com/Tracker/Redirect.ashx?linkid='+id5+'" target="_blank">'); 
		document.write('<img border=1 src="'+img5+'" alt="'+alt5+'"></a>');
		document.write('</td>');

		document.write('</tr></table>');
		
		}
	document.writeln(infos);
	dn=getCookie("displaynews");
	if (dn=="")
		{dn="ON";
		newCookie("displaynews",dn);}
	if (dn=="ON")
		{datenews=getCookie("datenews");
		URLNews=Curdir+"/"+curlang+"/news.html";
		go(URLNews,'JCB_news');
		}
	}

function getUrlTxt(url) {
var http = new ActiveXObject("microsoft.xmlhttp");
http.open("GET",url,false);
http.send();
var t = http.responseText
return t.replace(/</g,'&lt;')
}

function viewSource(file) {
nav=navigator.appName;
nav=nav.toLowerCase();
pMS=nav.indexOf("microsoft",0);
p=file.lastIndexOf(".");
ext=file.substring(p+1);
ext=ext.toLowerCase();
URLhref=document.location.href;
p=URLhref.lastIndexOf("/");
root=URLhref.substring(0,p)+"/"+file;
if (pMS>=0) {
	window.name="parent";
	newwin=window.open('','Source','scrollbars=yes,resizable=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,width=600,height=350');
	newwin.document.write("<pre>"+getUrlTxt(root)+"</pre>")
	}
else
	{if ((ext=="php") || (ext=="js")) {ext2=".txt";} else {ext2="";};
	URL="view-source:"+root+ext2;
	go(URL,'Source');
	}
}
// -->


