function chPage() {
	urlPage = location.href;

		if (urlPage == "http://parentsaction.ca/" || urlPage == "http://www.parentsaction.ca/") { location.href = "home.html"; }

		if (urlPage.indexOf("index.html") != -1) { location.href = "home.html"; }
		if (urlPage.indexOf("/fr/agir.html") != -1) { location.href = "../en/action.html"; }
		if (urlPage.indexOf("/fr/avancees.html") != -1) { location.href = "../en/making_progress.html"; }
		if (urlPage.indexOf("/fr/communiquez.html") != -1) { location.href = "../en/contact.html"; }
		if (urlPage.indexOf("/fr/declaration.html") != -1) { location.href = "../en/declaration.html"; }
		if (urlPage.indexOf("/fr/faire_don.html") != -1) { location.href = "../en/make_donation.html"; }
		if (urlPage.indexOf("/fr/inscription.php") != -1) { location.href = "../en/inscription.php"; }
		if (urlPage.indexOf("/fr/journal.html") != -1) { location.href = "../en/newsletter.html"; }
		if (urlPage.indexOf("/fr/marche_monde.html") != -1) { location.href = "../en/marches.html"; }
		if (urlPage.indexOf("/fr/participez.html") != -1) { location.href = "../en/participate.html"; }
		if (urlPage.indexOf("/fr/realisation.html") != -1) { location.href = "../en/credits.html"; }
		if (urlPage.indexOf("/fr/test.html") != -1) { location.href = "../en/test_en.html"; }

		if (urlPage.indexOf("home.html") != -1) { location.href = "index.html"; }
		if (urlPage.indexOf("/en/action.html") != -1) { location.href = "../fr/agir.html"; }
		if (urlPage.indexOf("/en/making_progress.html") != -1) { location.href = "../fr/avancees.html"; }
		if (urlPage.indexOf("/en/contact.html") != -1) { location.href = "../fr/communiquez.html"; }
		if (urlPage.indexOf("/en/declaration.html") != -1) { location.href = "../fr/declaration.html"; }
		if (urlPage.indexOf("/en/make_donation.html") != -1) { location.href = "../fr/faire_don.html"; }
		if (urlPage.indexOf("/en/inscription.php") != -1) { location.href = "../fr/inscription.php"; }
		if (urlPage.indexOf("/en/newsletter.html") != -1) { location.href = "../fr/journal.html"; }
		if (urlPage.indexOf("/en/marches.html") != -1) { location.href = "../fr/marche_monde.html"; }
		if (urlPage.indexOf("/en/participate.html") != -1) { location.href = "../fr/participez.html"; }
		if (urlPage.indexOf("/en/credits.html") != -1) { location.href = "../fr/realisation.html"; }
		if (urlPage.indexOf("/en/test_en.html") != -1) { location.href = "../fr/test.html"; }
}

function chPageOld() {
	urlPage = location.href;
	pos = urlPage.indexOf("parentsaction.ca") + 16 ;
	nomPage = urlPage.substr(pos);
	
	switch (nomPage) {
		case "/index.html" : location.href = "/home.html"; break;
		case "/fr/agir.html" : location.href = "/en/action.html"; break;
		case "/fr/avancees.html" : location.href = "/en/making_progress.html"; break;
		case "/fr/communiquez.html" : location.href = "/en/contact.html"; break;
		case "/fr/faire_don.html" : location.href = "/en/make_donation.html"; break;
		case "/fr/inscription.php" : location.href = "/en/inscription.php"; break;
		case "/fr/journal.html" : location.href = "/en/newsletter.html"; break;
		case "/fr/marche_monde.html" : location.href = "/en/marches.html"; break;
		case "/fr/participez.html" : location.href = "/en/participate.html"; break;
		case "/fr/realisation.html" : location.href = "/en/credits.html"; break;
		case "/fr/test.html" : location.href = "/en/test_en.html"; break;

		case "/home.html" : location.href = "/index.html"; break;
		case "/en/action.html" : location.href = "/fr/agir.html"; break;
		case "/en/making_progress.html" : location.href = "/fr/avancees.html"; break;
		case "/en/contact.html" : location.href = "/fr/communiquez.html"; break;
		case "/en/make_donation.html" : location.href = "/fr/faire_don.html"; break;
		case "/en/inscription.php" : location.href = "/fr/inscription.php"; break;
		case "/en/newsletter.html" : location.href = "/fr/journal.html"; break;
		case "/en/marches.html" : location.href = "/fr/marche_monde.html"; break;
		case "/en/participate.html" : location.href = "/fr/participez.html"; break;
		case "/en/credits.html" : location.href = "/fr/realisation.html"; break;
		case "/en/test_en.html" : location.href = "/fr/test.html"; break;
	}
}

function recomail(lang) {
	if (lang == 1) {
			mail_str = "mailto:?subject=" + document.title;
			mail_str += "&body=Ce document peut vous intéresser :%0A%0a";
			mail_str += "\"" + document.title + "\"";
			mail_str += " est disponible ŕ l'adresse suivante :%0A%0a"; 
			mail_str += location.href;
		location.href = mail_str;
	} else {
			mail_str = "mailto:?subject=" + document.title;
			mail_str += "&body=Ce document peut vous intéresser :%0A%0a";
			mail_str += "\"" + document.title + "\"";
			mail_str += " est disponible ŕ l'adresse suivante :%0A%0a"; 
			mail_str += location.href;
		location.href = mail_str;
	}
}

/*
Random Image Link Script
By Website Abstraction (http://www.wsabstract.com)
and Java-scripts.net (http://www.java-scripts.net)
*/

function random_imglink(){
  var myimages=new Array()
  //specify random images below. You can have as many as you wish
  myimages[1]="http://www.parentsaction.ca/images/photo_top1_fr.jpg"
  myimages[2]="http://www.parentsaction.ca/images/photo_top2_fr.jpg"
  myimages[3]="http://www.parentsaction.ca/images/photo_top3_fr.jpg"

  var ry=Math.floor(Math.random()*myimages.length)

  if (ry==0)
     ry=1
     document.write('<img src="'+myimages[ry]+'" />')
}

