// update hint box value
function display_hint( p_hint_text ) {
	document.getElementById( 'hint_box' ).innerHTML	= '<strong>Status</strong>: ' + p_hint_text;
}

// clear interval (if one has been set) & update hint box value using helper function
function reset_hint() {
	window.clearInterval( document.getElementById( 'hint_box' ).interval );
	display_hint( 'Ready...' );
}

// clear interval (if one has been set) & update hint box value using helper function
function show_hint( p_hint_text ) {
	window.clearInterval( document.getElementById( 'hint_box' ).interval );
	display_hint( p_hint_text );
}

// set new interval
function set_timeout() {
	document.getElementById( 'hint_box' ).interval = window.setInterval( 'reset_hint()', 2000 );
}

// call to external Javascript/PHP file and pass Parent ID
function update_child( p_parent_option /*, target_field*/) {

	// create new script element and set its relative URL (including ID argument)
	script = document.createElement( 'script' );
	script.src = 'lib/external.php?parent_id=' + p_parent_option.value;// + '&target=' + target_field;
	
	// attach (load) script element to document head
	document.getElementsByTagName( 'head' )[0].appendChild( script );
}