
////
// browser detection stuff
////


if (navigator.appName == "Netscape") {
	var docREF = 'document.base.document';
} else {
	var docREF = 'document';
}


////
// image declaration and code for mouseovers
////

var moarray = ['about', 'press', 'conf', 'research', 'edu', 'vision', 'home'];
var activeImage;

for(count=0 ; count < moarray.length ; count++) {
	eval(moarray[count] + '_0 = new Image()');
	eval(moarray[count] + '_0.src = "../img/menu/m_' + moarray[count] + '_0.gif"');
	eval(moarray[count] + '_1 = new Image()');
	eval(moarray[count] + '_1.src = "../img/menu/m_' + moarray[count] + '_1.gif"');
}

function img_on(Img) { eval(docREF + "." + Img + ".src = " + Img + "_1.src");  }

function img_off(Img) { eval(docREF + "." + Img + ".src = " + Img + "_0.src");  }

function img_activate(Img) {
	eval(Img + '_0.src = "../img/menu/m_' + Img + '_1.gif"');	
	img_on(Img);
}


////
// Open window function
////

function openWindow(whatURL,width,height){

	// set default window size if we do not have inputs for both width and height
	if  ( !((width > 0) && (height > 0)) ) {
		width = 640;
		height = 480;
	}

	// open window
	features = 'status=no,toolbar=no,location=no,menu=no,resizable=yes,scrollbars=yes,width=' + width + ',height=' + height;
	csWindow = window.open(whatURL, 'csWindow', features);

	if (navigator.appName == "Netscape") {
		// focus
		if (window.focus) csWindow.focus();
	} else {
		// resize (neeeded in MSIE if Window was already open)
		if (window.resizeTo) csWindow.resizeTo(width,height);
		// focus (delay needed for MSIE)
		if (window.focus) setTimeout('csWindow.focus()',1000);
	}

}
