var bName = navigator.appName;
var appVer = navigator.appVersion;
var userAgt = navigator.userAgent;

function get_info() {
	document.getElementById('project_info').style.display = 'block';
	if (bName == "Microsoft Internet Explorer" || (userAgt.match("Firefox") && appVer.match("Windows"))) {
	document.getElementById('project_text_msie').style.display = 'none';
	} else {
		document.getElementById('project_text').style.display = 'none';
	}
}

function get_text() {
	if (bName == "Microsoft Internet Explorer" || (userAgt.match("Firefox") && appVer.match("Windows"))) {
	document.getElementById('project_text_msie').style.display = 'block';
	} else {
		document.getElementById('project_text').style.display = 'block';
	}
	document.getElementById('project_info').style.display = 'none';
}

var project_img_on = 0;

function get_project_img(section_id,project_id,img_num) {

	img_height = img_array[img_num][4];
	img_caption = img_array[img_num][5];
	project_img_on = img_num;
	project_id_on = project_id;
	for(i=0;i<img_array.length;i++) {
		document.getElementById('project_thumb'+i).src = '/img/work/'+project_id+'/images/'+img_array[i][2];
	}
	document.getElementById('project_thumb'+img_num).src = '/img/work/'+project_id+'/images/'+img_array[img_num][3];
	document.getElementById('project_img').src = '/img/work/'+project_id+'/images/'+img_array[img_num][1];
		if (img_height < 420) {
			document.getElementById('project_img').style.top = (530-img_height)/2+'px';
		} else {
			document.getElementById('project_img').style.top = 0+'px';
		}
	document.getElementById('photo_caption').innerHTML = img_caption;
}

function highlight_thumb() {
	document.getElementById('project_thumb'+project_img_on).src = '/img/work/'+project_id_on+'/images/'+img_array[project_img_on][3];
}