var DTech = new Object();
var win = null;

DTech.Functions = {
	
	init : function() {
		Event.onDOMReady(function() {
			DTech.Functions.formatNavigation();
			DTech.Functions.formatLists();
		});
	},
	
	formatNavigation : function() {
		if ($('content')) {
			if ($A($('content').classNames()).length > 0) {
				$('nav' + $A($('content').classNames())[0].split('-')[1]).addClassName('current');
			}
		}
	},
	
	formatLists : function() {
		$A(document.getElementsByClassName('records')).each(function(obj) {
			var count = 0;
			
			$A(obj.getElementsByTagName(obj.tagName.toLowerCase() == 'dl' ? 'dd' : 'tr')).each(function(dd) {
				if (count % 2 != 0) {
					$(dd).addClassName('alt');
				}
				
				count++;
			});
		});
	},
	
	popWindow : function(mypage, myname, w, h, scroll) {
		LeftPosition = (screen.width) ? (screen.width - w) / 2 : 0;
		TopPosition = (screen.height) ? (screen.height - h) / 2 : 0;
		settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',resizable';
		win = window.open(mypage, myname, settings);
	},


	map: function() {
		var domains = new Array(new Array('springgrove.samplefh.com', 'ABQIAAAAMdZp_NFg_FtI0G6h5LKbORSqsJMRNhUI2izrxcMIzhOmbVanORQICqAWQi9wWES0yk5Zjhnqh9rHfw'));
		
		DT.Maps.insert(domains);
	}
	
};


DTech.Functions.init();
