// preload images for rollovers
var imgList=new Array();
function preload() {
    for(i=0; i < preload.arguments.length; i++) {
        imgList[i]=new Image();
        imgList[i].src=preload.arguments[i];
    }
}


// activate navigation element for section and preload main nav
function activate(base, section, subsection) {
	if (document.images) {
		if (section != '') document.images[section].src =base + '/images/interface/' + section + '_a.gif';
		if (subsection != '') document.images['subnav_' + subsection].src =base + '/images/interface/subnav_' + subsection + '_a.gif';
	}
	
	preload(base +'/images/interface/home_h.gif',base +'/images/interface/visit_h.gif', base +'/images/interface/exhibitions_h.gif',base +'/images/interface/events_h.gif',
	        base +'/images/interface/community_h.gif',base +'/images/interface/press_h.gif',
	        base +'/images/interface/hire_h.gif',base +'/images/interface/support_h.gif');
}

// navigation rollovers
function roll(base,dir,img,state) {
	if (document.images) {
		if (document.images[img].src.indexOf('_a.') < 0) {
			if (dir =='interface'||dir =='banners') {
				document.images[img].src =base + '/images/' + dir +'/' + img + '_' + state;
			};
		}
	}
}


// launch pop-up
function popup(url, width, height){
	var popUpWin = window.open(url, 'popup', 'width=' + width + ',height=' + height + ',toolbar=no, location=no, directories=no, menubar=no,scrollbars=no,resizable=no');
	popUpWin.focus();
}