var img = new Array();
var loaded = false;

function pre(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function load() {
	img['aboutus'] = pre('img/nav_aboutus.gif');
	img['aboutus_off'] = pre('img/nav_aboutus_off.gif');
	img['news'] = pre('img/nav_news.gif');
	img['news_off'] = pre('img/nav_news_off.gif');
	img['smallboxes'] = pre('img/nav_smallboxes.gif');
	img['smallboxes_off'] = pre('img/nav_smallboxes_off.gif');
	img['sb_castandcrew'] = pre('img/nav_2castandcrew.gif');
	img['sb_castandcrew_off'] = pre('img/nav_2castandcrew_off.gif');
	img['sb_stills'] = pre('img/nav_2stills.gif');
	img['sb_stills_off'] = pre('img/nav_2stills_off.gif');
	img['sb_sponsors'] = pre('img/nav_2sponsors.gif');
	img['sb_sponsors_off'] = pre('img/nav_2sponsors_off.gif');
	img['sb_filmfestivals'] = pre('img/nav_2filmfestivals.gif');
	img['sb_filmfestivals_off'] = pre('img/nav_2filmfestivals_off.gif');
	img['groundbeneath'] = pre('img/nav_groundbeneath.gif');
	img['groundbeneath_off'] = pre('img/nav_groundbeneath_off.gif');
	img['gb_castandcrew'] = pre('img/nav_2castandcrew.gif');
	img['gb_castandcrew_off'] = pre('img/nav_2castandcrew_off.gif');
	img['gb_stills'] = pre('img/nav_2stills.gif');
	img['gb_stills_off'] = pre('img/nav_2stills_off.gif');
	img['gb_sponsors'] = pre('img/nav_2sponsors.gif');
	img['gb_sponsors_off'] = pre('img/nav_2sponsors_off.gif');
	img['gb_industrysupport'] = pre('img/nav_2industrysupport.gif');
	img['gb_industrysupport_off'] = pre('img/nav_2industrysupport_off.gif');
	img['gb_filmfestivals'] = pre('img/nav_2filmfestivals.gif');
	img['gb_filmfestivals_off'] = pre('img/nav_2filmfestivals_off.gif');
	img['groundbeneath'] = pre('img/nav_groundbeneath.gif');
	img['otherfilms'] = pre('img/nav_otherfilms.gif');
	img['otherfilms_off'] = pre('img/nav_otherfilms_off.gif');
	img['contact'] = pre('img/nav_contact.gif');
	img['contact_off'] = pre('img/nav_contact_off.gif');
	
	img['ar'] = pre('img/ar.gif');
	img['ar_off'] = pre('img/ar_off.gif');
	img['ar2'] = pre('img/ar2.gif');
	img['ar2_off'] = pre('img/ar2_off.gif');
	loaded = true;
}

function on(arg) {
	if (loaded) {
		document.images[arg].src = img[arg+'_off'].src;
	}
	return true;
}

function off(arg) {
	if (loaded) {
		document.images[arg].src = img[arg].src;
	}
	return true;
}




<!-- PopUp Windows -->

var win = null;
function popUp(mypage,myname,w,h,scroll)
{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=1'+scroll+',resizable'
	win = window.open(mypage,myname,settings)
}

<!-- PopUp Images -->

function popUpImage(imageName,imageWidth,imageHeight,imageCaption) { 
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left=100,top=100"); 
	newWindow.document.open(); 
	newWindow.document.write('<html><title>CSS Popup Picture</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">'); 
	newWindow.document.write('<img src=../images/pictures/'+imageName+' border=0><br>'+imageCaption); 
	newWindow.document.write('</body></html>'); 
	newWindow.document.close(); 
	newWindow.focus(); 
}

//-->

