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

DTech.Functions = {
	
	init : function() {
		Event.onDOMReady(function() {
			DTech.Functions.formatNavigation();
			DTech.Functions.formatLists();
		});
	},
	
	formatNavigation : function() {
		if ($('left')) {
			if ($A($('left').classNames()).length > 0) {
				$('nav' + $A($('left').classNames())[0].split('-')[1]).addClassName('current');
			}
		}
		
		if ($('full')) {
			if ($A($('full').classNames()).length > 0) {
				$('nav' + $A($('full').classNames())[0].split('-')[1]).addClassName('current');
			}
		}
	},
	
	formatLists : function() {
		$A(document.getElementsByClassName('records')).each(function(obj) {
			var count = 0;
			
			$A(obj.getElementsByTagName('dd')).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( 'westoaksfuneralhome.com', 'ABQIAAAAMdZp_NFg_FtI0G6h5LKbORQG48kTGuQDbq0EfKSvjUjWgrwl_BRKPycDBqDsLChxVSuWPuHjY6NFaA')
		);
		
		DT.Maps.insert(domains);
	}
	
};

DTech.Functions.init();