
<!--
function externalLinks() {
	if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) { 
		var anchor = anchors[i]; 
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank";
	}
	updateYear();
} 
window.onload = externalLinks;

var protocol  = "mail" + "to" + ":" ;
var domain    = "@" + "rapi" + "dcal" + "." + "com" ;
var email     = "con" + "tact" + domain ;
var mailto    =  protocol + email ;

function translate() {
	var arr = location.href.split('/');
	var nextLoc = "";
	var i;
	var fileMode = (arr[0].indexOf("file")>-1);
	if (location.href.indexOf('fr/') > -1)	{
		for (i=arr.length-2; i>-1; i--) {	// start at last folder (skip page name)
			nextLoc = nextLoc + "../";
			if (arr[i]=="fr") break;
		}
		i++;	// point to first relative path element
		for (; i<arr.length; i++)	{
			nextLoc = nextLoc + arr[i];
			if (i<arr.length-1) nextLoc = nextLoc + "/";
		}
	} else {
		for (i=arr.length-2; i>-1; i--) {	// start at last folder (skip page name)
			if (i==2 && !fileMode) break;	// skip domain in http mode
			if (i==0) break;		// don't ../ up above /
			if (arr[i]=="") break; 	// double slash (should never happen)
			if (arr[i]=="www" || arr[i] == "Sites" || arr[i] == "Desktop") break;	// special cases for file mode
			nextLoc = nextLoc + "../";
		}
		nextLoc = nextLoc + "fr/";
		i++;	// point to first relative path element
		for (; i<arr.length; i++)	{
			nextLoc = nextLoc + arr[i];
			if (i<arr.length-1) nextLoc = nextLoc + "/";
		}
	}
	location=nextLoc;
}

function updateYear() {
	if (!document.getElementById) return;
	document.getElementById("cy").innerHTML = (new Date()).getFullYear();
} 

// -->
