
// BROWSER DETECTION
	var bn = navigator.appName; var bv = parseFloat(navigator.appVersion);
	var IE = (bn == "Microsoft Internet Explorer"); var IE3 = (IE && bv >= 3); var IE4 = (IE && bv >= 4); 
	var IE41 = (IE && bv >= 4 && navigator.appVersion.indexOf('MSIE 4.0;') < 0 && navigator.appVersion.indexOf('MSIE 4.01;') < 0);
	var NS = (bn == "Netscape"); var NS3 = (NS && bv >= 3); var NS4 = (NS && bv >= 4); var NS41 = (NS && bv >= 4.1);

// BROWSER FLAGS
	var ver4 = (IE4 || NS4) ? 1 : 0;
	var check_rollovers = (IE4 || NS4) ? 1 : 0;
	var check_layers = (IE41 || NS41) ? 1 : 0;
	var check_ticker = (IE41 || NS41) ? 1 : 0;
	var check_menus = (IE41 || NS41) ? 1 : 0;
	
// POPUP WINDOW CONTROLS
	function popcustom(file,title,x,y,sx,sy) {
		popup = window.open(file,title,'width=' + x + ',height=' + y + ',scrollbars,screenX=' + sx + ',screenY=' + sy + '');
		if (document.images) {popup.focus();}
	}
	function popblank(file) {
		popup = window.open(file,'blank','width=620,height=420,menubar,toolbar,location,status,resizable,scrollbars,screenX=30,screenY=30');
		if (document.images) {popup.focus();}
	}

// RANDOM IMAGE
	var n = 10; // default image
	var r = 3; // total number of images -1
	if (IE3 || NS3) {n = 9+(Math.round(Math.random()*r) + 1);} // Math.random does not work in NS2
	
	function random_image() {
		
	document.write('<a href="photos/' + n + '.html" onclick="popcustom(\'\',\'custom\',600,550,420,210);" target="custom">');
	document.write('<img src="photos/' + n + '.jpg" title="Click photo to enlarge" width=214 height=144 border=1 style="border-style: solid; border-color: #000000" ></a>');
	}
  