/* check if client is Internet Exploder */
function browserIsIE() {

	var agt = navigator.userAgent.toLowerCase();

	this.ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

	if(this.ie) {
		return true;
	} else {
		return false;
	}
}

function addUploadBox(group_name,total_boxes) {

	var visible_count = document.getElementById(group_name + '_visible_count');
		
	// increment the visible count
	visible_count.value = parseInt(visible_count.value) + 1;
	
	var row = document.getElementById(group_name + '_row_' + visible_count.value);	

	/*
	if(browserIsIE()) {
		row.style.display = "block";
	} else {
		row.style.display = "table-row";
	}
	*/
	
	row.style.display = 'block';

	// if all boxes are shown, hide the 'add new options' link
	if(visible_count.value == total_boxes) {
		
		var link_div = document.getElementById(group_name + '_add');
		link_div.style.display = "none";
	}
}
