// images list array for preloading (case studies rollovers)
p=new Array(
	"bt",
	"be",
	"bnfl",
	"ibcv"
	);

// generic popup function
 
function makePopup(targ,width,height) {
	winProps ='height='+height+',width='+width+',scrollbars=no,resizable=0';
	popUp = window.open(targ,'makepopup',winProps);
	popUp.resizeTo(width,height);
	if(parseInt(navigator.appVersion) >= 4) { 
		popUp.window.focus(); 
	} 
}



// rollover script


preloadFlag=false;

// creates new image object

function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; }}

// preloads images into objects
	
function preloadimages() {
	if(document.images) {
		for(i=0;i<p.length;i++) {
			var tmp=p[i]+"_on";
			tmp=newImage("images/"+p[i]+"_over.gif");
		}
		preloadFlag=true;
	}
}

// changes images on rollover/rollout

function swap(name,on) {
	if(document.images && preloadFlag) { // check that images are available and that we've finished preloading
		if(document.images[name]) { // check the immages exists within the document
			if(on) { // rollover
				document.images[name].src="images/"+name+"_over.gif";
			} else { // rollout
				document.images[name].src="images/"+name+"_off.gif";
			}
		}
	}
}
