<!--

function show_item(item, elem_id, section, img_count) {
	elems = document.getElementById(elem_id).parentNode.getElementsByTagName('DIV');
	for (var i=0; i<elems.length; i++) {
		elems[i].className = "hide";
	}

	elems = item.parentNode.getElementsByTagName('DIV');
	for (var i=0; i<elems.length; i++) {
		elems[i].className = elems[i].className.replace(/ active/,"");
	}
	item.className += " active";

	document.getElementById(elem_id).className = "";
	document.getElementById(elem_id).scrollTop = 0;

	if (section == "prod") {
		show_prod_main();
		build_item_photos(elem_id, img_count);
	}
}


function show_prod_main() {
	document.getElementById('prod-upcoming-prj').style.display = 'none';
	document.getElementById('prod-vid').style.display = 'block';
	document.getElementById('prod-desc').style.display = 'inline';
}


function build_item_photos(elem_id, img_count) {
	var img_array = [];
	for (var i=1; i<img_count+1; i++) {
		img_array.push("/img/productions/" + elem_id.substr(5,elem_id.length) + "_" + i + ".jpg");
	}
	//var img_array = ["/img/productions/aftermath_1.jpg","/img/productions/aftermath_2.jpg"];
	var inner_html = "";
	for (var i=img_array.length; i>0; i--) {
		inner_html += "<span><a href='#' ";
		if (i==1) inner_html += "class='active' ";
		inner_html += "onclick='show_item_photo(this,\""+img_array[i-1]+"\");return false;'>"+i+"</a></span>";
	}
	document.getElementById('prod-current-img').src = img_array[0];
	document.getElementById('prod-vid-cmd').innerHTML = inner_html;
}

function show_item_photo(el,img_src) {
	document.getElementById('prod-current-img').src = img_src;
	for (var i=0; i < el.parentNode.parentNode.childNodes.length; i++) {
		el.parentNode.parentNode.childNodes[i].firstChild.className = "";
	}
	el.className = "active";
	el.blur();
}




-->