	// JavaScript Document

	var drop_on = 0;
	
	function drop_nav(action) {
		obj = document.getElementById('project_nav_items');
		if (action=='toggle') {
			if (drop_on==0) {
				if (obj.style.display) obj.style.display = '';
				else obj.className = 'show';
				drop_on = 1;
			} else if (drop_on==1) {
				if (obj.style.display) obj.style.display = 'none';
				else obj.className = 'hide';
				drop_on = 0;
			}
		}	
		if (action=='show') {
			if (obj.style.display) obj.style.display = '';
			else obj.className = 'show';
			drop_on = 1;
		}	
		if (action=='hide') {
			if (obj.style.display) obj.style.display = 'none';
			else obj.className = 'hide';
			drop_on = 0;
		}
	}
	

	function flip(img,w,h) {

		o = document.getElementById('keyimage');
		o.removeAttribute('style');
		o.setAttribute('src',"/assets/blank.gif");
		o.setAttribute('src',img);
		o.setAttribute('height',h);
		o.setAttribute('width',w);
	
		if(w<220) {
			leftnum = ((220-w)/2) | 0;
			leftpos = "left: " + leftnum + "px;" ;
			o.setAttribute('style',leftpos);
			// IE6 needs the following - stoopid IE
			o.style.left = leftnum + "px";
		}

	}
		
	
	function viewmovie() {
	  popup = 'view_animation.php';
	  winname = window.open(popup,'myname','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=250,height=250');
	  windowstatus = 1;
	  if (window.focus) { winname.focus(); }
	}

	function popup(url,n,h,w) {
		hp = 0;
		vp = 0;
		if(screen){
			hp = (screen.width-w) / 2;
			vp = (screen.height-h) / 2;
		}
		winname=window.open(url, n,'width='+w+',height='+h+',left='+hp+',top='+vp+',scrollbars=yes,toolbar=no,menubar=no,resizable=no,statusbar=yes');
		windowstatus = 1;
		if (window.focus) { winname.focus(); }
	}

	function zoom(pid) {
		pagename = '/zoomimage.php?pid=' + pid;
		winname = window.open(pagename,'myname','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=980,height=900');
	}


	function show_bio(x,id) {

		sid = 'small_bio' + id;
		lid = 'large_bio' + id;
		
		s = document.getElementById(sid);
		l = document.getElementById(lid);

		switch (x) {
			case 's':
				s.setAttribute('style','display: none;');
				s.style.display = 'none'; // for IE6
				l.setAttribute('style','display: block;');
				l.style.display = 'block'; // for IE6
				break;
			case 'l':
				l.setAttribute('style','display: none;');
				l.style.display = 'none'; // for IE6
				s.setAttribute('style','display: block;');
				s.style.display = 'block'; // for IE6		
				break;
		}
	}

