// Standard JavaScript - Copyright (C) 2007-2010 Charles A Upsdell, All Rights Reserved; www.upsdell.com
//
// This has JavaScript available to all pages.


// getElement - get element associated with an ID, or null if not found
function getElement ( id )
{
	var element = null;
	if ( (arguments.length == 0) || (id == "") )
		return( null );
	if ( document.getElementById )
		element = document.getElementById( id );
	else if ( document.all )
		element = document.all[id];
	return( element );
}


//	Function called when page has been loaded to do DHTML
function myOnLoad( )
  {
	if ( typeof(myJavaScriptEnabled) !== typeof(noSuchFunction) )
		myJavaScriptEnabled();
  }


// Scroll to a position, defaulting to top of page; return false if done
function myScrollTo ( left, top )
{
	if ( arguments.length < 1 )
		left = 0;
	if ( arguments.length < 2 )
		top = 0;
	var value = true;
	if ( typeof(window.scrollTo) !== typeof(noSuchFunction) )
	  {
	 	window.scrollTo( left, top );
		value = false;
	  }
	return( value );
}



