// JavaScript Document

function flashStartVideo(){
	// start the video shortly after page loads
	$("flashcontent").style.display = "block";
	$("dimmer").style.display = "block";	
	hideSelectBoxes();
}
function flashEndVideo(){
	// called by Flash Video at the end of the clip
	$("flashcontent").style.display = "none";
	$("dimmer").style.display = "none";
	showSelectBoxes();
}
//SPECIAL "getElementById" FUNCTION!
function $() {
  var elements = new Array();

  for (var i = 0; i < arguments.length; i++) {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);

    if (arguments.length == 1)
      return element;

    elements.push(element);
  }

  return elements;
}

function findPos(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		curtop = obj.offsetTop;
		while (obj = obj.offsetParent) {
			curtop += obj.offsetTop;
		}
	}
	return curtop
}
// ---------------------------------------------------

function showSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "visible";
	}
}

// ---------------------------------------------------

function hideSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
}

// ---------------------------------------------------

