//  Onload, set form button mouseovers.
window.onload = function () {

	// Be sure we can do this.
	if ( document.getElementsByTagName ) {

		// Get the buttons.
		var inputs = document.getElementsByTagName("INPUT");

		// If the page has INPUT tag, search for those with CLASS="ButtonOff"
		// and attach the events.
		if( inputs ) {

			for ( i = 0; i < inputs.length;  i++) {

				var node = inputs[i];

				if (node.className == "buttonOff") {
					node.onmouseover = function() {
						this.className = this.className.replace("buttonOff", "buttonOn");
					}
					node.onmouseout = function() {
						this.className = this.className.replace("buttonOn", "buttonOff");
					}
				}
			}
		}

		// Get the anchor tags.
		var anchors = document.getElementsByTagName("A");

		// If the page has anchor tags, search for those with CLASS="email"
		// and change the value of the HREF attribute.
		if( anchors ) {

			for ( i = 0; i < anchors.length;  i++) {

				var node = anchors[i];
				var thisClassName = node.className.substr( 0, 5 );

				if (thisClassName == 'email') {

					var thisRecipient = node.className.substr( 6 );
					var userNameArray = new Array();
					userNameArray['query'] = 'inqu1rINg_minds';
					userNameArray['guru'] = 'clientoL0gy';

					var userName = userNameArray[thisRecipient];
					node.href = 'mailto:' + userName + '@' + 'triche-osborne.com';
				}
			}
		}
	}
}