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

DTech.Functions = {
	
	init : function() {
		Event.onDOMReady(function() {
			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('www.lunnscolonial.com', 'ABQIAAAA1D7Fdkq4Hh94OivrhQI2pBQ8XeEGz4Z5jyWcnE1WjxayiUEbLxTLbvFYGQFGFWrasBYC0he_Qjdceg'),
				new Array('lunnscolonial.com', 'ABQIAAAA1D7Fdkq4Hh94OivrhQI2pBQ3DVhrcSd3R0R2i9ptPsj-Xt9fXRQOeRqxydVVtzWrqDjRljr2arZuIg'),
				new Array('preview.lunnscolonial.com', 'ABQIAAAA1D7Fdkq4Hh94OivrhQI2pBTGHu7IYO4qRz42sW_M9ViKGrNgrhTdJuMkofO4bnCxnS8YQRiZNq3iLg')
		);
		
		DT.Maps.insert(domains);
	}
	
};

DTech.Functions.init();
