var t;

function show(id){
	document.getElementById(id).style.display = document.getElementById(id).style.display == "block" ? "none":"block";
	time_out(id);
}
function time_out(id){
	setTimeout("document.getElementById('"+id+"').style.display = 'none'", 2000);
}

function time_out_topnav(id){
	t = setTimeout("document.getElementById('"+id+"').style.display = 'none'", 2000);
}

function resetTimer() {
	clearTimeout(t) 
	
}

function showContactMenu() {
	document.getElementById('contact_dropdown').style.display = "block";
}

function hideContactMenu() {	
	document.getElementById('contact_dropdown').style.display = "none";
}

function show_menu(id){
	var uls = document.getElementsByTagName('ul');
	for(i=0;i<uls.length;i++){
		if(uls[i].className == 'sub'){
			uls[i].style.display = "none";
		}
	}
	
	document.getElementById(id+'_subnav').style.display = "block";
	time_out(id+'_subnav');

}

function expand_paragraph(divID){
	/*
	img = document.getElementById("expand_" + divID);
	img.src = img.src.substr(img.src.lastIndexOf("/")+1) == "plus_white.gif" ? "../images/minus_white.gif" : "../images/plus_white.gif";
	*/
	box = document.getElementById(divID);
	box.style.display = box.style.display != "block" ? "block" : "none";
}

//variable to hold the number of popup boxes to use for the equipment_list.php 
var num_of_boxes = 6;

//method to popup windows for equipment_list.php
function expand_popup(divID){
	
	//for each of our windows, we want to first undisplay them all.
	//This ensures that if a user clicks on a different box that the current
	//box will get undisplayed.
	for(var i=0; i < num_of_boxes; i++) {
		
		//the only exception to this is if the user is trying to close the existing
		//box they are on.  In this case, don't reset it, let the code below manage that.
		if(i != divID) {
			box = document.getElementById(i);
			box.style.display = "none";
		}
	}
	box = document.getElementById(divID);
	box.style.display = box.style.display != "block" ? "block" : "none";
}

//variable to hold the number of popup boxes to use for the equipment_list.php 
var num_of_map_boxes = 10;

//method to popup windows for equipment_list.php
function expand_map_popup(divID){
	
	//for each of our windows, we want to first undisplay them all.
	//This ensures that if a user clicks on a different box that the current
	//box will get undisplayed.
	for(var i=0; i < num_of_map_boxes; i++) {
		
		//the only exception to this is if the user is trying to close the existing
		//box they are on.  In this case, don't reset it, let the code below manage that.
		if(i != divID) {
			box = document.getElementById(i);
			box.style.display = "none";
		}
	}
	box = document.getElementById(divID);
	box.style.display = box.style.display != "block" ? "block" : "none";
}

function rollover_submit(id, state){
	if(state == 0) {
		document.getElementById(id).style.background = "#A40703";
	}
	else {
		document.getElementById(id).style.background = "#C50804";
	}
	
}
function rollover_submit_off(id){
	document.getElementById(id).style.background = "#C50804";
}

function InsertFlash(width, height,path)
{
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+path+'"><param name="quality" value="high"><EMBED SRC="'+path+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"  WIDTH="'+width+'" HEIGHT="'+height+'" WMODE="TRANSPARENT" MENU="FALSE" BGCOLOR="#FFFFFF"></EMBED></object>');
}





