// JavaScript Document



/**
  * show or hide the file field based on the users selection of the type field
**/
function hideFile(val) {
	var disp = (val == '1') ? "none" : "block";

	$('fileHide').style.display = disp;
}



/*************************************************************************************
  * all the functions for the flash and javascript communication
**/
var flash;

/*
window.onload = function() {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		flash = window.comm;
	}else{
		flash = window.document.comm;
	}
	
	alert(flash);
	
}
*/




function nextItem() {
	flash.nextItem();
}

function previousItem() {
	flash.previousItem();
}

function goto(num) {
	showItemDetails(num);
	flash.goto(num);
}

function showItemDetails(itemID) {
	$('docListItem_'+itemID).fireEvent('click');
}

function highLightListItem(itemID) {

	var els = $$('div.on');
	for(var i=0; i<els.length; i++) {
		els[i].setStyle('background-color', '#FFFFFF');
		els[i].removeProperty('class');
	}
	
	$('docListItem_'+itemID).setProperty('class', 'on');
	$('docListItem_'+itemID).setStyle('background-color', '#EEEEEE');
}


/*************************************************************************************/





