/* javascript functions for NEMO web */

// submitDate sets values of hidden form fields in index.jsp
function setDate( aDay, aMonth, aYear ) {
	document.getElementById( 'day' ).value = aDay ;
	document.getElementById( 'month' ).value = aMonth ;
	document.getElementById( 'year' ).value = aYear ;
	document.getElementById( 'calendar_form').submit() ;
}

function clearInput( e, aValue ) {
	if( e.value == aValue ){
		e.value='' ;
	}
	return ;
}

function adminSelect( e ) {
	var trElem = e.parentNode.parentNode ;
	
	var alertString = "e: " + e + "\n" ;
	var trClass = trElem.getAttribute( 'class' ) ;

	if( trClass == 'adminitem' ) {
		trElem.setAttribute( 'class', 'selectedadminitem' ) ;
	} else {
		trElem.setAttribute( 'class', 'adminitem' ) ;
	}

	return ;
}
