
var nactions	= new Array('signin', 'search', 'locate', 'apply','contact');
var showing		= 0;
var upstyle		= 'url(/images/arrows/arrow_333_off.gif) no-repeat 136px center'
var downstyle	= 'url(/images/arrows/arrow_333_on.gif) no-repeat 136px center'

function reset_highlight(action) {
	for (var i = 0; i < nactions.length; i++) {
		var ndiv	= document.getElementById(nactions[i] + '_action');
		var ntd		= document.getElementById(nactions[i] + '_td');
		ndiv.style.background	= '#dcdee0';
		ntd.style.background	= '#dcdee0';
		ndiv.className			= 'inactive';
		ntd.className			= 'inactive';
	}
	
	if (showing) {
		document.getElementById(action + '_td').className			='active';
		document.getElementById(action + '_td').style.background	= '#bbbdbf';
		document.getElementById(action + '_action').style.background = '#bbbdbf';
	}
}

function show_hide(action) {
	if (showing) {
		showing = 0; return hide();
	} else {
		showing = 1; return show(action);
	}
}

function show(action) {
	for (var i = 0; i < nactions.length; i++) {
		var ndiv = document.getElementById(nactions[i] + '_action');
		ndiv.style.display		= 'block';
		ndiv.style.visibility	= 'visible';
		ndiv.style.background	= '#FFFAEB';
		document.getElementById(nactions[i]+'_a').style.background = downstyle;
	}
	
	document.getElementById('action_table').className				= 'active';
	document.getElementById('search_lineup').className				= 'active';
	document.getElementById('locate_lineup').className				= 'active';
	document.getElementById(action + "_td").style.background		= '#E4DBC0';
	document.getElementById(action + "_action").style.background	= '#E4DBC0';
}

function hide() {
	document.getElementById('action_table').className	= 'inactive';
	document.getElementById('search_lineup').className	= 'inactive';
	document.getElementById('locate_lineup').className	= 'inactive';
	
	for (var i = 0; i < nactions.length; i++) {
		var ndiv	= document.getElementById(nactions[i] + '_action');
		var ntd		= document.getElementById(nactions[i] + '_td');
		ndiv.style.display		= 'none';
		ndiv.style.visibility	= 'hidden';
		ndiv.style.background	= '#FFFAEB';
		ntd.style.background	= '#FFFAEB';
		document.getElementById(nactions[i]+'_a').style.background = upstyle;
	}
}

function zipexist(ele){
	if (document.getElementById(ele).value =="") {
		alert ("Please enter a zip code");
		return false;
	}
	return true;
}
