function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function ChangeMenuImages() {
	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) {
		search_over = newImage("/Images/search-over.gif");
		search_industrydirectory_over = newImage("/Images/search-industry-directory_o.gif");
		industrydirectory_over = newImage("/Images/industry-directory-over.gif");
		menu_10_industrydirectory_over = newImage("/Images/menu_10-industry-directory_.gif");
		menu_10_over = newImage("/Images/menu_10-over.gif");
        
		//I have preloaded the extra images for the top nav bar
		about_over = newImage("/Images/about_over.jpg");
		news_over = newImage("/Images/news_over.jpg");
		calendar_over = newImage("/Images/calendar_over.jpg");
		standard_over = newImage("/Images/standard_over.jpg");
		addit_over = newImage("/Images/addit_over.jpg");

		preloadFlag = true;
	}
}

timer = 0;
timer2 = 0;

function SwapTop(arg, name) {
	
	document.images["Top"].src = "/Images/" + name + "_over.jpg";
	current = arg;
	clearTimeout(timer);
	clearTimeout(timer2);
}

function EnterMenu() {
	clearTimeout(timer);
	clearTimeout(timer2);
}

function LeaveMenu() {
    timer = setTimeout("document.images['Top'].src = '/images/menu_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 = "/en/about/index.html"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) {  }
	if (current == 5) {  }
}

function linkTwo() {

	if (current == 1) { self.location = "/en/about/offer.html"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) {  }
	if (current == 5) {  }
}

function linkThree() {

	if (current == 1) { self.location = "/en/about/governance.html"; }
	if (current == 2) { self.location = "/en/news/index.html"; }
	if (current == 3) { self.location = "/en/calendar/standardsagendas.html"; }
	if (current == 4) { self.location = "/en/standards/standpersonallines.html"; }
	if (current == 5) {  }
}

function linkFour() {

	if (current == 1) { self.location = "/en/about/members.html"; }
	if (current == 2) { self.location = "/en/news/press.html"; }
	if (current == 3) { self.location = "/en/calendar/formsminutes.html";}
	if (current == 4) { self.location = "/en/perstand/standcomm.html"; }
	if (current == 5) {  }
}

function linkFive() {

	if (current == 1) { self.location = "/en/about/staff.html"; }
	if (current == 2) { self.location = "/en/news/industrynews.html"; }
	if (current == 3) { self.location = "/en/calendar/events.html"; }
	if (current == 4) { self.location = "/en/standards/standforms.html"; }
	if (current == 5) {  }
}

function linkSix() {

	if (current == 1) { self.location = "/en/about/howto.html"; }
	if (current == 2) { self.location = "/en/news/brochures.html"; }
	if (current == 3) { self.location = "/en/calendar/nationalminutes.html"; }
	if (current == 4) { self.location = "/en/perstand/webscreens.html"; }
	if (current == 5) {  }
}

function linkSeven() {

	if (current == 1) { self.location = "/en/about/contact.html"; }
        if (current == 2) {  }
	if (current == 3) { self.location = "/en/calendar/eventscourses.html"; }
	if (current == 4) { self.location = "/en/standards/xmlstand.html"; }
	if (current == 5) { self.location = "/en/additional/brokerlinks.html"; }
}

function linkEight() {

	if (current == 1) { self.location = "/en/news/annualreport.html"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) { self.location = "/en/standards/termstandards.html"; }
	if (current == 5) {  }
}

function linkNine() {

	if (current == 1) { self.location = "/en/about/faq.cfm"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) {  }
	if (current == 5) { self.location = "/en/additional/vendors.html"; }
}

function linkTen() {

	if (current == 1) { self.location = "/en/about/csionet.html"; }
	if (current == 2) {  }
	if (current == 3) {  }
	if (current == 4) {  }
	if (current == 5) { self.location = "/en/additional/insurcomp.html"; }
}
