// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

// show all <dd> tags based on link of <dl> tag used in FAQs

function showall() {
	$("dd").toggle("slow");
}

// wordcount in Submissions
function wordcnt(w,x){
	var y=w.value;
	var r = 0;
	a=y.replace(/\s/g,' ');
	a=a.split(' ');
	for (z=0; z<a.length; z++) {if (a[z].length > 0) r++;}
	x.value=r;
	} 

// hide navigation buttons if record not saved
function ckey(){
	document.getElementById('backbot').style.visibility = "hidden";
	document.getElementById('nextbot').style.visibility = "hidden";
	document.getElementById('mapbot').useMap="";
}

function newwindow(){
	window.open('jex5.htm','jav','width=300,height=200,resizable=yes');
} 

function theme_visible(id){ 
	theme_table = 'theme_table' + id
	if( document.getElementById(theme_table).style.display != "none" ) {
		document.getElementById(theme_table).style.display = "none";
	    } else {
	    	document.getElementById(theme_table).style.display = "";
	    }
}

function theme_hide(id) {
  id.style.display = "none";
}

