function qsformOnSubmit() {
	           var form = document.forms.qsform;
	           var opt = StdGetFieldValue("SchDbName", "qsform");
	           if (opt=="-") return false;
	           //if (opt=="rsmi") form.SchScope.value = "T";
	           //if (opt=="training") form.action = "training-search-results.pag";
	           //if (opt=="events") form.action = "events-search-results.pag";
	           return true;
	       }
	           
function qsformSubmit() {
	           var form = document.forms.qsform;
	           if (form.onsubmit()) form.submit();
}

function qsValidate() {
	return true;
}


/*Show or hide an element from a collection 

	collection = ids of the elements in the collection
	item = id of the element to show
*/
function showHideElement(collection,itemToShow) {

		if(collection.length==0) return;
		
    	var element=document.getElementById(itemToShow);
		if(element==null) return;

		/* Hide all the content, showing the tab selected */
	    for (var n=0; n<collection.length; n++) {
				
	    	var sid=collection[n];
	    	element	=document.getElementById(sid);    	
	    	
			if (itemToShow == element.id) {
				element.style.display = 'block';
				}

			else { 			
				element.style.display = 'none';
				}
				
		}

}


