﻿// JScript File


/** Given the name of a form and a query string,
 *  submit the form with the query string.
 *
 */
/*function query( query){
    var the_form = document.getElementById("search");
    if(!the_form) return;
    the_form.q.value = query;
    the_form.submit();
}  

*/

/** 
 *  Toggle the visibility of an element.
 *  id is the id of the element to toggle.
 *  flag is whether to set it visible or not, true yes, false no.
 */
function toggleVisible(id, flag) {  	
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (flag){
			document.getElementById(id).style.display = 'block';
		} else {
			document.getElementById(id).style.display = 'none';			
		}	
	} else { 
		if (document.layers) {	
			if (flag){
				document.id.display = 'block';
			} else {
				document.id.display = 'none';
			}
		} else {
			if (flag){
				document.all.id.style.display = 'block';
			} else {
				document.all.id.style.display = 'none';
			}
		}
	}
}

