﻿
String.prototype.trim = function() {
    a = this.replace(/^\s+/, '');
    return a.replace(/\s+$/, '');
}

//  Retrieve an element by it's ID attribute
//  NOTE: This function is used in place of
//  'document.getElementById() to support
//  Internet Explorer 4.01.

function getElementById( id ) {
	if( typeof( document.getElementById ) == "undefined" ) {
		for( var i = 0; i < document.all.length; i++ ) {
			var el = document.all( i );
			if( el.id == id ) {
				return el;
			}
		}
	}
	else {
		return document.getElementById( id );
	}
}


