function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function LoadMenuImages() {
	if (document.images) {
		fr_template_02_apropos_over = newImage("/images/frMenu/fr_template_02-apropos_over.gif");
		apropos_over = newImage("/images/frMenu/apropos-over.gif");
		nouvelles_over = newImage("/images/frMenu/nouvelles-over.gif");
		calendrier_over = newImage("/images/frMenu/calendrier-over.gif");
		normes_over = newImage("/images/frMenu/normes-over.gif");
		servicesadd_over = newImage("/images/frMenu/servicesadd-over.gif");
		recherche_over = newImage("/images/frMenu/recherche-over.gif");
		repertoire_over = newImage("/images/frMenu/repertoire-over.gif");
		portail_over = newImage("/images/frMenu/portail-over.gif");
		commentaires_over = newImage("/images/frMenu/commentaires-over.gif");

		//I have preloaded the extra images for the top nav bar
		about_over = newImage("/images/frMenu/about_over.jpg");
		news_over = newImage("/images/frMenu/news_over.jpg");
		calendar_over = newImage("/images/frMenu/calendar_over.jpg");
		standard_over = newImage("/images/frMenu/standard_over.jpg");
		addit_over = newImage("/images/frMenu/addit_over.jpg");

		preloadFlag = true;
	}
}

timer = 0;
timer2 = 0;

function SwapTop(arg, name) {
	
	document.images["Top"].src = "/images/frMenu/" + name + "_over.jpg";
	current = arg;
	clearTimeout(timer);
	clearTimeout(timer2);
}

function EnterMenu() {
	clearTimeout(timer);
	clearTimeout(timer2);
}

function LeaveMenu() {
    timer = setTimeout("document.images['Top'].src = '/images/frMenu/fr_template_02.gif'", 1000);
	timer2 = setTimeout("current = -1", 1000);
}

//The next section contains all of the links for the top menu.

function linkOne() {

	if (current == 1) { self.location = "/fr/about/index.html"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) {  }
	if (current == 5) {  }
}

function linkTwo() {

	if (current == 1) { self.location = "/fr/about/offer.html"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) {  }
	if (current == 5) {  }
}

function linkThree() {

	if (current == 1) { self.location = "/fr/about/governance.html"; }
	if (current == 2) { self.location = "/fr/news/index.html"; }
	if (current == 3) {  self.location = "/fr/calendar/agendas.html";}
	if (current == 4) { self.location = "/fr/standards/standpersonallines.html"; }
	if (current == 5) {  }
}

function linkFour() {

	if (current == 1) { self.location = "/fr/about/members.html"; }
	if (current == 2) { self.location = "/fr/news/press.html"; }
	if (current == 3) { self.location = "/en/about/formsmeetings.html"; }
	if (current == 4) { self.location = "/fr/standards/standcomm.html"; }
	if (current == 5) {  }
}

function linkFive() {

	if (current == 1) { self.location = "/fr/about/staff.html"; }
	if (current == 2) { self.location = "/fr/news/industrynews.html"; }
	if (current == 3) { self.location = "/fr/calendar/events.html"; }
	if (current == 4) { self.location = "/fr/standards/standforms.html"; }
	if (current == 5) {  }
}

function linkSix() {

	if (current == 1) { self.location = "/fr/about/howto.html"; }
	if (current == 2) { self.location = "/fr/news/brochures.html"; }
	if (current == 3) { self.location = "/fr/calendar/nationalminutes.html"; }
	if (current == 4) { self.location = "/fr/standards/webscreens.html"; }
	if (current == 5) {  }
}

function linkSeven() {

	if (current == 1) { self.location = "/fr/about/contact.html"; }
	if (current == 2) {  }
	if (current == 3) { self.location = "/fr/calendar/eventscourses.html"; }
	if (current == 4) { self.location = "/fr/standards/xmlstand.html"; }
	if (current == 5) { self.location = "/fr/additional/brokerlinks.html"; }
}

function linkEight() {

	if (current == 1) { self.location = "/fr/about/annualreport.html"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) { self.location = "/fr/standards/termstandards.html"; }
	if (current == 5) {  }
}

function linkNine() {

	if (current == 1) { self.location = "/fr/about/faq.cfm"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) {  }
	if (current == 5) { self.location = "/fr/additional/vendors.html"; }
}

function linkTen() {

	if (current == 1) { self.location = "/fr/about/csionet.html"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) {  }
	if (current == 5) { self.location = "/fr/additional/insurcomp.html"; }
}